Ports to expose when running dat doctor in docker?
See original GitHub issueHi, I’m trying to put together a 🐳 docker-ized container for dat (source here) and am having problems with finding the right ports to expose so that dat doctor
will run properly. End goal for me is to be able to run something like docker run --rm -it -v $PWD:/home/dat dat-docker dat share
to share files via dat across computers rather than just on localhost, in a cross-platform way (via docker)!
I’m aware of #588 and have looked at the dat-doctor js file, which points me to opening up port 3282, but I’m still getting the error below when running DEBUG=dat* dat doctor
inside my docker container. Error message in Linux below:
user@host:~$ cd ~/path/to/git-cloned/dat-docker && docker build -f Dockerfile -t dat .
.
.
.
user@host:~$ docker run --rm --it -v $PWD:/home/dat -P dat bash
dat@b4fd286d4b55:~$ DEBUG=dat* dat doctor
dat dat 13.8.1 +0ms
dat node v8.2.1 +2ms
dat-doctor [info] Looking up public server address +36ms
[info] Testing connection to public peer
dat-doctor Attempting connection to doctor, doctor1.publicbits.org +51ms
dat-doctor Attempting connection to doctor, doctor1.publicbits.org +1ms
dat-doctor Discovered doctor, 45.55.78.106:8887 +522ms
dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +0ms
dat-doctor Discovered doctor, 45.55.78.106:8887 +2ms
dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +0ms
dat-doctor Connection established to doctor +736ms
[info] TCP ONLY - success!
dat-doctor Connection closed +249ms
dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +3s
dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +5s
[error] FAIL - Connection timeout, fail.
[error] FAIL - Unable to connect to public server.
[error] FAIL - Data was not echoed back from public server.
[info] End of phase one (Public Server), moving on to phase two (Peer to Peer via DNS)
[info] Public IP: 130.195.253.36
[info] Your public port was consistent across remote multiple hosts
To test p2p connectivity login to another computer and run:
dat doctor 42eaec7408c2ee9334c6d176d51c785fc2fac208a248c2547e53cc017e3f4c58
Waiting for incoming connections... (local port: 3282)
Can someone point me to where in the dat-sphere I should look at to find the port (or port ranges) I’ll need to open up/expose to get dat doctor
working?
Issue Analytics
- State:
- Created 6 years ago
- Reactions:1
- Comments:7 (2 by maintainers)
Top GitHub Comments
I’ve tried a localized non-docker installation on my linux computer, and it seems that dat doctor can’t connect to UTP either… So this might be a firewall issue I’m up against. I’m trying this in a university setting so that could be why.
Still would be useful to know what ports I would need to workaround things. I just realized UTP refers to Micro Transport Protocol - µTP (implemented through libutp and utp-native in dat), rather than the User Datagram Protocol - UDP. Somehow I thought it was a misspelling for some reason before 😆. Confusing too that µTP appears to be some variant of UDP 😕
Is there some other debugging command I can run to diagnose the situation? Ala
iptables
or something else?@weiji14 Have you tried running the docker image using
-p 3282:3282 -p 8887:8887
instead of-P
?