Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dat doctor crashes when running inside docker container #1171

Closed
mkroehnert opened this issue Mar 16, 2020 · 5 comments
Closed

dat doctor crashes when running inside docker container #1171

mkroehnert opened this issue Mar 16, 2020 · 5 comments

Comments

@mkroehnert
Copy link

I am reporting:

  • a bug or unexpected behavior

Bug Report

Please give us details about your installation to assist you. Run dat -v to see the version of Dat you are using.

  • Operating system: Alpine linux x64 (from node:10-alpine Docker image)
  • Node Version: v10.19.0
  • Dat Version: 13.13.1
  • Dat Doctor: v2.1
  • Docker: 19.03.5, build 633a0ea838f10e000b7c6d6eed1623e6e988b5bc

Docker image: https://gitlab.com/mkroehnert/dat-doctor-docker

Note: I had to use the Alpine image with Node10, because newer versions would not allow me to build some of the native extensions successfully (e.g. utp-native).

Expected behavior

  • build docker image docker build -t dat/doctor .
  • run docker image docker run --network host -it --rm dat/doctor (running with host network to prevent NAT issues)
  • run dat doctor in docker tty
  • select test to run
  • test finishes successfully

Actual behavior

  • build docker image docker build -t dat/doctor .
  • run docker image docker run --network host --interactive --tty --rm dat/doctor
  • run dat doctor in docker tty
  • select basic test
  • test does not finish and dat doctor crashes with a segfault

Debug Logs

/ $ DEBUG=dat* dat doctor
  dat Dat DEBUG mode engaged, enabling quiet mode +0ms
  dat dat 13.13.1 +42ms
  dat node v10.19.0 +1ms
Welcome to Dat Doctor!

Software Info:
  linux x64
  Node v10.19.0
  Dat Doctor v2.1.2
  dat v2020-03-14T07:38:16.269Z dat Dat DEBUG mode engaged, enabling quiet mode

Running Basic Tests (Checks your Dat installation and network setup)

⠙ Who am I?  dat-doctor ERROR -  Default Dat port did not work (3282), using random port +0ms
✔ Your address is: 178.7.231.189:44304
  The default Dat port (3282) in use, using random port.
  This may impact Dat's connectivity if you have a firewall.
✔ Loaded native modules
✔ Resolved Dat Doctor Server
⠼ Looking for Doctor on the Dat network...  dat-doctor Discovered doctor, 45.55.78.106:8887 +0ms
  dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +1ms
⠙ Connecting to Dat Doctor, 45.55.78.106:8887  dat-doctor Connection established to doctor +562ms
⠼ Connected to Dat Doctor!  dat-doctor Connection closed +109ms
  dat-doctor ERROR -  Default Dat port did not work (3282), using random port +918ms
✔ Successful data transfer with Dat Doctor via TCP
⠧ Looking for Doctor on the Dat network...  dat-doctor Discovered doctor, 45.55.78.106:8887 +284ms
  dat-doctor Trying to connect to doctor, 45.55.78.106:8887 +1ms
Segmentation fault (core dumped)

Issues I checked before reporting this issue:
#841
#858
#1158

@okdistribute
Copy link
Collaborator

okdistribute commented Mar 27, 2020

Can you try in the latest dat with ndoe 12? We are also no longer supporting dat-doctor.

@mkroehnert
Copy link
Author

Hi @okdistribute I will try with the lates version and report the result here.

One additional note, I was not using dat-doctor package but dat doctor that is built into the dat cli.

@mkroehnert
Copy link
Author

@okdistribute here are the compilation result, when switching to the node:12-alpine Docker image:

https://gitlab.com/mkroehnert/dat-doctor-docker/snippets/1958240

Basically, the utp-native module fails to compile.

When I run dat doctor in the generated image, I still get a segmentation fault in the basic test.

Basic Test:

/ $ dat doctor
Welcome to Dat Doctor!

Software Info:
  linux x64
  Node v12.16.1
  Dat Doctor v2.1.2
  dat v13.13.1

Running Basic Tests (Checks your Dat installation and network setup)

✖ Who am I?
    ERROR: Could not detect public ip / port
✔ Loaded native modules
✔ Resolved Dat Doctor Server
✔ Successful data transfer with Dat Doctor via TCP
⠙ Connecting to Dat Doctor, 45.55.78.106:8887Segmentation fault (core dump

The Peer-to-Peer test seems to run:

/ $ dat doctor
Welcome to Dat Doctor!

Software Info:
  linux x64
  Node v12.16.1
  Dat Doctor v2.1.2
  dat v13.13.1

To start a new Peer-to-Peer test, press ENTER.
Otherwise enter test ID.
>
✖ Who am I?
    ERROR: Could not detect public ip / port
✔ Loaded native modules

Running a new Peer-to-Peer test

To check connectivity with another computer, run the command:

  dat doctor 1580ff674295b824fd80ebf7f1dd57358646a0ed716d77913de43637e28a6698

Trying to Connect:
  46.5.5.180:3282

@mkroehnert
Copy link
Author

Just realized what was meant with dat doctor is no longer supported.

I installed dat@next, where this command was removed.
Since I solved the sync issue that I wanted to test with this image, this issue can stay closed.

@okdistribute
Copy link
Collaborator

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants