AcalaNetwork/subway

docker version timeout

Closed this issue · 4 comments

Reproduce

first start a local mandala node

docker run -it --rm -p 9944:9944 -p 9933:9933 ghcr.io/acalanetwork/mandala-node:sha-104e277 --dev --ws-external --rpc-port=9933 --rpc-external --rpc-cors=all --rpc-methods=unsafe -levm=debug --pruning=archive --instant-sealing

start a normal subway on port 9955

ENDPOINTS=ws://localhost:9944 PORT=9955 cargo run

open polkadotjs https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A9955#/explorer, everything works fine.

then close normal subway, start a docker version instead

docker run \
  -e ENDPOINTS=ws://localhost:9944 \
  -e PORT=9955 \
  -p 9955:9955 \
  acala/subway:sha-7c1610c

open (or refresh) polkadotjs https://polkadot.js.org/apps/?rpc=ws%3A%2F%2Flocalhost%3A9955#/explorer, and app won't load with timeout error

Screenshot 2023-03-09 at 14 55 22

I suspect it might have something to do with 80 port, since if we change to ENDPOINTS=wss://acala-rpc.dwellir.com, same issue still happens. Changing it to ENDPOINTS=wss://acala-rpc.dwellir.com:443 makes it work. However we can't add 443 to localhost

those 2 dockers are not at the same network. you need to start subway with -e ENDPOINTS=ws://host.docker.internal:9944

ENDPOINTS=ws://host.docker.internal:9944

oh right that's a nice catch!

Curious why ENDPOINTS=wss://acala-rpc.dwellir.com doesn't work either, it has to bee ENDPOINTS=wss://acala-rpc.dwellir.com:443

I think the port is required