question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Ports to expose when running dat doctor in docker?

See original GitHub issue

Hi, 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:closed
  • Created 6 years ago
  • Reactions:1
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
weiji14commented, Aug 18, 2017

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?

1reaction
ralphtheninjacommented, Aug 9, 2017

@weiji14 Have you tried running the docker image using -p 3282:3282 -p 8887:8887 instead of -P?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Ports to expose when running dat doctor in docker? · Issue #841
Hi @weiji14, Dat's default port is 3282. It looks like you are exposing it correctly. The dat doctor tries to connect via TCP...
Read more >
How to EXPOSE Port on running container
Port expose and publish has to happen when a container is created. Just stop the existing container and create a new one in...
Read more >
How To Expose or Publish Docker Ports
Learn Docker expose ports concepts. Know how to use EXPOSE, --expose, -p, or –P commands to expose or publish Docker ports.
Read more >
Running in Containers | InterSystems IRIS Data Platform 2022.2
Default values in InterSystems containers are exposed through the standard label mechanism so that needed information can be discovered using the docker inspect ......
Read more >
Docker Entrypoint script cannot get ...
But for some reason The entrypoint script cannot find the enviromental variables provided by mariadb container such as the DB_PORT_3306_TCP_ADDR ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found