Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new install nebula graph and nebula studio on docker - cant create connections #103

Closed
Jayuda opened this issue Feb 11, 2022 · 9 comments
Closed

Comments

@Jayuda
Copy link

Jayuda commented Feb 11, 2022

Hello guys,
I have fresh install nebula graph from docker-compose and run nebula studio also from docker. But i cant create connection from nebula studio to nebula graph.

Show error :
image

Any sugesstion ?
Thanks

@wey-gu
Copy link
Contributor

wey-gu commented Feb 11, 2022

Hi Jayuda, Welcome to the community!

What host address did you fill in the studio form?

Also could you help ensure the version of nebula-graph and studio matched?

ref: https://docs.nebula-graph.io/2.6.2/nebula-studio/deploy-connect/st-ug-connect/

For now it should be nebula-graph(v2.6.2) and nebula-studio(v3)

@Jayuda
Copy link
Author

Jayuda commented Feb 11, 2022

Thanks for fast respond Mr. @wey-gu
I has make sure nebula graph v2.62 and nebula studio v3

Here docker-compose.yaml

version: '3.4'
services:
  metad0:
    image: vesoft/nebula-metad:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=metad0
      - --ws_ip=metad0
      - --port=9559
      - --ws_http_port=19559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://metad0:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9559
      - 19559
      - 19560
    volumes:
      - ./data/meta0:/data/meta
      - ./logs/meta0:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  metad1:
    image: vesoft/nebula-metad:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=metad1
      - --ws_ip=metad1
      - --port=9559
      - --ws_http_port=19559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://metad1:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9559
      - 19559
      - 19560
    volumes:
      - ./data/meta1:/data/meta
      - ./logs/meta1:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  metad2:
    image: vesoft/nebula-metad:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=metad2
      - --ws_ip=metad2
      - --port=9559
      - --ws_http_port=19559
      - --data_path=/data/meta
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://metad2:19559/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9559
      - 19559
      - 19560
    volumes:
      - ./data/meta2:/data/meta
      - ./logs/meta2:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  storaged0:
    image: vesoft/nebula-storaged:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=storaged0
      - --ws_ip=storaged0
      - --port=9779
      - --ws_http_port=19779
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://storaged0:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9779
      - 19779
      - 19780
    volumes:
      - ./data/storage0:/data/storage
      - ./logs/storage0:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  storaged1:
    image: vesoft/nebula-storaged:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=storaged1
      - --ws_ip=storaged1
      - --port=9779
      - --ws_http_port=19779
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://storaged1:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9779
      - 19779
      - 19780
    volumes:
      - ./data/storage1:/data/storage
      - ./logs/storage1:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  storaged2:
    image: vesoft/nebula-storaged:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --local_ip=storaged2
      - --ws_ip=storaged2
      - --port=9779
      - --ws_http_port=19779
      - --data_path=/data/storage
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - metad0
      - metad1
      - metad2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://storaged2:19779/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9779
      - 19779
      - 19780
    volumes:
      - ./data/storage2:/data/storage
      - ./logs/storage2:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  graphd:
    image: vesoft/nebula-graphd:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --port=9669
      - --local_ip=graphd
      - --ws_ip=graphd
      - --ws_http_port=19669
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - storaged0
      - storaged1
      - storaged2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://graphd:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - "9669:9669"
      - 19669
      - 19670
    volumes:
      - ./logs/graph:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  graphd1:
    image: vesoft/nebula-graphd:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --port=9669
      - --local_ip=graphd1
      - --ws_ip=graphd1
      - --ws_http_port=19669
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - storaged0
      - storaged1
      - storaged2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://graphd1:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9669
      - 19669
      - 19670
    volumes:
      - ./logs/graph1:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE

  graphd2:
    image: vesoft/nebula-graphd:v2.6.2
    environment:
      USER: root
      TZ:   "${TZ}"
    command:
      - --meta_server_addrs=metad0:9559,metad1:9559,metad2:9559
      - --port=9669
      - --local_ip=graphd2
      - --ws_ip=graphd2
      - --ws_http_port=19669
      - --log_dir=/logs
      - --v=0
      - --minloglevel=0
    depends_on:
      - storaged0
      - storaged1
      - storaged2
    healthcheck:
      test: ["CMD", "curl", "-sf", "http://graphd2:19669/status"]
      interval: 30s
      timeout: 10s
      retries: 3
      start_period: 20s
    ports:
      - 9669
      - 19669
      - 19670
    volumes:
      - ./logs/graph2:/logs
    networks:
      - nebula-net
    restart: on-failure
    cap_add:
      - SYS_PTRACE
  
  console:
    image: vesoft/nebula-console:v2.6.0
    entrypoint: ""
    command: 
      - sh
      - -c
      - |
        sleep 3 &&
        nebula-console -addr graphd -port 9669 -u root -p nebula -e 'ADD HOSTS "storaged0":9779,"storaged1":9779,"storaged2":9779' &&
        sleep 36000
    depends_on:
      - graphd
    networks:
      - nebula-net

networks:
  nebula-net:

And docker run for nebula studio :
docker run --name nebula-studio --restart=always --network=nebula_nebula-net -p 7001:7001 -d vesoft/nebula-graph-studio:v3

@wey-gu
Copy link
Contributor

wey-gu commented Feb 11, 2022

Aha, you could try with my side project: https://github.com/wey-gu/nebula-up , after you docker-compose down your existing ones, then run curl -fsSL nebula-up.siwei.io/install.sh | bash you will have studio + nebula ready to be used ;-), not in single compose though.

@Jayuda
Copy link
Author

Jayuda commented Feb 14, 2022

hello @wey-gu ,
I have try your project nebula-up with all new container, and now show error failed: failed to open connection, error: failed to open transport, error: dial tcp 0.0.0.0:9669: connect: connection refused

I have try with 127.0.0.1 and localhost also show that error. But i try directly with scrypt golang server ready and connected.

@wey-gu
Copy link
Contributor

wey-gu commented Feb 14, 2022

Dear @Jayuda ,
Thanks for trying that out!
The address should be your eth0's(or another name like ens0 of the first NIC) address with port 9669 instead of 127.0.0.1
Could you give that a try?

@wey-gu
Copy link
Contributor

wey-gu commented Feb 14, 2022

I have try with 127.0.0.1 and localhost also show that error. But i try directly with scrypt golang server ready and connected.

The reason 127.0.0.1 works from golang but not working from studio is that the studio will call this address from the nebula-http-gateway container(127.0.0.1 wont reach out to the host network namespace) while your golang server is from the host network namespace.

@Jayuda
Copy link
Author

Jayuda commented Feb 14, 2022

sorry mr. @wey-gu i check on log error at graphd show

Could not open the file: /sys/fs/cgroup/memory/memory.limit_in_bytes

any clue ?

@Jayuda
Copy link
Author

Jayuda commented Feb 14, 2022

curl -fsSL nebula-up.siwei.io/install.sh | bash

Dear @Jayuda , Thanks for trying that out! The address should be your eth0's(or another name like ens0 of the first NIC) address with port 9669 instead of 127.0.0.1 Could you give that a try?

yes, work well.
But i dont take any answer about error memory limit - i just recreate everything and all work well.
Thanks mr @wey-gu

@Jayuda Jayuda closed this as completed Feb 14, 2022
@wey-gu
Copy link
Contributor

wey-gu commented Feb 14, 2022

sorry mr. @wey-gu i check on log error at graphd show

Could not open the file: /sys/fs/cgroup/memory/memory.limit_in_bytes

any clue ?

Answered in the compose issue, it's caused by vesoft-inc/nebula#3278 .

In nebula-up it's already fixed with the latest v2.6.2 image.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants