nebula-docker-compose icon indicating copy to clipboard operation
nebula-docker-compose copied to clipboard

Console exists right away - conn issue

Open imrefazekas opened this issue 3 years ago • 5 comments

Branch: master, latest OS: MacOS 12.5.1 Comp: M1 MBP Rosetta: no Docker: 4.11.1

vii@VII-Max nebula-docker-compose % docker-compose up
[+] Running 11/7
 ⠿ Network nebula-docker-compose_nebula-net     Created                                                                                                                                                                                                                    0.0s
 ⠿ Container nebula-docker-compose-metad0-1     Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-metad2-1     Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-metad1-1     Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-storaged2-1  Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-storaged0-1  Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-storaged1-1  Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-graphd-1     Created                                                                                                                                                                                                                    0.0s
 ⠿ Container nebula-docker-compose-graphd2-1    Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-graphd1-1    Created                                                                                                                                                                                                                    0.1s
 ⠿ Container nebula-docker-compose-console-1    Created                                                                                                                                                                                                                    0.0s
Attaching to nebula-docker-compose-console-1, nebula-docker-compose-graphd-1, nebula-docker-compose-graphd1-1, nebula-docker-compose-graphd2-1, nebula-docker-compose-metad0-1, nebula-docker-compose-metad1-1, nebula-docker-compose-metad2-1, nebula-docker-compose-storaged0-1, nebula-docker-compose-storaged1-1, nebula-docker-compose-storaged2-1
nebula-docker-compose-console-1    | 2022/08/23 15:27:47 Fail to initialize the connection pool, host: graphd, port: 9669, failed to open connection, error: failed to open transport, error: dial tcp 172.22.0.9:9669: connect: connection refused
nebula-docker-compose-console-1    | panic: Fail to initialize the connection pool, host: graphd, port: 9669, failed to open connection, error: failed to open transport, error: dial tcp 172.22.0.9:9669: connect: connection refused
nebula-docker-compose-console-1    |
nebula-docker-compose-console-1    | goroutine 1 [running]:
nebula-docker-compose-console-1    | log.Panicf(0xc0001d80c0, 0xbb, 0x0, 0x0, 0x0)
nebula-docker-compose-console-1    | 	/usr/local/go/src/log/log.go:345 +0xc0
nebula-docker-compose-console-1    | main.main()
nebula-docker-compose-console-1    | 	/usr/src/main.go:535 +0xb0b
nebula-docker-compose-console-1 exited with code 2

imrefazekas avatar Aug 23 '22 15:08 imrefazekas

Could you please try changing sleep 3 into sleep 60 or something longer and see what happens?

  console:
    image: vesoft/nebula-console:nightly
    entrypoint: ""
    command: 
      - sh
      - -c
      - |
        sleep 60 && ...

Docker desktop will help emulate x86_64 image into arm64 and the console should be fine.

Actually, this console container is only for doing a one-time ADD HOSTS 0 thing to activate storage hosts in the first run, maybe at that initial go, the cluster isn't that ready in 3 seconds.

wey-gu avatar Aug 24 '22 02:08 wey-gu

and changed sleep 3 to 20. The result is the same. 30 the same. 60 the same.

I've made wait the console for all graphd images

    depends_on:
      - graphd
      - graphd1
      - graphd2

and changed sleep to 45, it worked. Thanks for the help.

Btw do you consider to release an ARM64 of console and vesoft/nebula-graph-studio images? ARM64 machines on AWS are very cost-effective...

imrefazekas avatar Aug 24 '22 05:08 imrefazekas

Thanks @imrefazekas ,

We should have added this dependency of console to graphd, would you mind create a PR for that?

Regarding the arm64 image for console/studio, we could do that(I may use some time to do it later!), https://github.com/vesoft-inc/nebula-console/issues/174 , https://github.com/vesoft-inc/nebula-studio/issues/60

Before that, you could download its arm64(even for darwin) binary to your m1 macOS, too(I am doing it so)

https://github.com/vesoft-inc/nebula-console/releases :)

wey-gu avatar Aug 24 '22 05:08 wey-gu

BTW, for playing it on the laptop, I created a nebula-up with some level of ease, too.

While most of them are x86_64 images, only studio, dashboard, and NebulaGraph core were tested on M1 macOS for now(I am an m1 MBP user, too, though).

And, welcome to the nebulaGraph community @imrefazekas !

wey-gu avatar Aug 24 '22 06:08 wey-gu

created https://github.com/vesoft-inc/nebula-docker-compose/pull/128

wey-gu avatar Aug 26 '22 02:08 wey-gu