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

dohnut.service: Main process exited, code=exited, status=1/FAILURE #25

Open
realknotworking opened this issue Feb 3, 2021 · 6 comments
Labels
bug Something isn't working

Comments

@realknotworking
Copy link

Hi. Trying to get this working on a Rasperry Pi 3 B+ running the latest Raspian OS. Followed the instructions for setting up Dohnut with systemd (https://help.commons.host/dohnut/systemd/), systemctl status dohnut.socket shows the socket is active, systemctl status dohnut.service shows the status as "activating" (rather than active):

$ systemctl status dohnut.service
● dohnut.service - Dohnut DNS over HTTPS proxy
  Loaded: loaded (/etc/systemd/system/dohnut.service; static; vendor preset: enabled)
  Active: activating (start) since Wed 2021-02-03 11:35:25 EST; 1s ago
Main PID: 23024 (node)
   Tasks: 7 (limit: 2063)
  CGroup: /system.slice/dohnut.service
          └─23024 npm

Test dig fails with:

$ dig @127.0.0.1 -p 53000 example.com

; <<>> DiG 9.11.5-P4-5.1+deb10u2-Raspbian <<>> @127.0.0.1 -p 53000 example.com
; (1 server found)
;; global options: +cmd
;; connection timed out; no servers could be reached

Error log:

Feb 03 09:42:05 raspberrypi systemd[1]: Starting Dohnut DNS over HTTPS proxy...
Feb 03 09:42:08 raspberrypi dohnut[30609]: Trace: Error: Cannot collect fds meant for pid 30609 in pid 30621
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Object.module.exports.collect (/home/dohnut/n/lib/node_modules/dohnut/node_modules/socket-activation/src/systemd.js:32:11)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at parseOptions (/home/dohnut/n/lib/node_modules/dohnut/source/cli.js:78:43)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at main (/home/dohnut/n/lib/node_modules/dohnut/source/cli.js:213:25)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Object.<anonymous> (/home/dohnut/n/lib/node_modules/dohnut/source/cli.js:251:1)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Module._compile (node:internal/modules/cjs/loader:1108:14)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1137:10)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Module.load (node:internal/modules/cjs/loader:973:32)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Function.Module._load (node:internal/modules/cjs/loader:813:14)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at Module.require (node:internal/modules/cjs/loader:997:19)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at require (node:internal/modules/cjs/helpers:92:18)
Feb 03 09:42:08 raspberrypi dohnut[30609]:     at /home/dohnut/n/lib/node_modules/dohnut/source/cli.js:254:13
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR! code 1
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR! path /home/dohnut
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR! command failed
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR! command sh -c dohnut "--config" "/etc/dohnut/options.json"
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR! A complete log of this run can be found in:
Feb 03 09:42:08 raspberrypi dohnut[30609]: npm ERR!     /home/dohnut/.npm/_logs/2021-02-03T14_42_08_246Z-debug.log
Feb 03 09:42:08 raspberrypi systemd[1]: dohnut.service: Main process exited, code=exited, status=1/FAILURE
Feb 03 09:42:08 raspberrypi systemd[1]: dohnut.service: Failed with result 'exit-code'.

Any ideas what the problem might be?

@qoelet
Copy link
Member

qoelet commented Feb 3, 2021

I wonder if the file descriptor being collected here is meant for the parent; the socket activation library is complaining that the pid provided by systemd is a mismatch with the current process's pid. cc @sebdeckers

@qoelet qoelet added the bug Something isn't working label Feb 3, 2021
@realknotworking
Copy link
Author

Thank you qoelet for the quick reply. I still have it installed, I'd be happy to tweak the code on my Pi to see if we can get it running.

@qoelet
Copy link
Member

qoelet commented Feb 4, 2021

@realknotworking could you share what's in /etc/dohnut/options.json?

@realknotworking
Copy link
Author

This is what it installed

{
  "doh": ["commonshost"],
  "bootstrap": ["1.1.1.1", "8.8.8.8", "9.9.9.9"],
  "countermeasures": ["spoof-queries", "spoof-useragent"],
  "datagram-protocol": "udp4"
}

@qoelet
Copy link
Member

qoelet commented Feb 8, 2021

@realknotworking thanks. I managed to get my hands on an old RPi 3, let me see if I can reproduce the issue over the weekend.

@realknotworking
Copy link
Author

Okay, thanks for staying after it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants