Closed longfin closed 3 years ago
Update to @longfin
This was an issue in the Dockerfile at: https://github.com/planetarium/NineChronicles.Standalone/blob/99a61c61f1a3a9aaf312ee6b87da648d081e6b56/Dockerfile#L34 in which the Docker image is built with a default host of "0.0.0.0". So if a port parameter is not given in the docker run command, the image takes its default host.
Removing ["host", "0.0.0.0" ] will take care of this issue; however, the greater issue is that the docker container is not working consistently when connecting to the TURN relay server and stops working after 15-min max. Specifically, receiving most recent blocks through TURN works initially, but after 5-10 minutes, connections to the TURN servers are disconnected. Here are some symptoms I recorded when comparing the two options (Docker vs. non-Docker).
A. As you can see below, this is the lsof list of 9c-headless when running without Docker (plain dotnet run execution). The port connection to the peers and ice-servers(nat-stun-port) are all "ESTABLISHED" and stable.
B. When running on the Docker container on the other hand, its connection to peers are stable, but the ice-server connections are often disconnected.
C. Interestingly, the lsof list inside the container shows connection to the peers but no connection to the ice-server.
This leads me to believe that:
I feel that this is a porting issue when running the docker but the issue still occurs even when using the "--net=host" option. I'm tempted to think this might be a UDP issue but it's only a suspicion and need more evidence to support this thought.
With the above options,
NineChronicles.Standalone.Executable
didn't seem to use the TURN relay server(--ice-server
).