-
I installed cross-seed using npm on the following system: "cross-seed search" works perfectly. "sudo systemctl start cross-seed" followed by "sudo journalctl -u cross-seed" throws the following error: Jul 24 15:47:59 Cross-Seed systemd[1]: Started cross-seed daemon. It restarts and throws that error again. I tried it on Ubuntu 21.04 and different node versions as well. The issue remains. I then tried "ExecStart=/usr/bin/node cross-seed daemon" from the service file directly in terminal and it works. How do I get the daemon to work? Please find attached the config files and log |
Beta Was this translation helpful? Give feedback.
Replies: 14 comments 1 reply
-
Systemd units run in a different context/environment than your shell, with a different PATH. You need to provide an absolute path to |
Beta Was this translation helpful? Give feedback.
-
I don't see anything regarding that in the installation guide. What's the best way to do it, given a typical installation following your guide? |
Beta Was this translation helpful? Give feedback.
-
Works fine to start the daemon |
Beta Was this translation helpful? Give feedback.
-
@bakerboy448, your version doesn't work for me either. And following @mmgoodnow guidance, you don't have an absolute path to cross-seed either, or am I not seeing something there? Here's my code for reference: |
Beta Was this translation helpful? Give feedback.
-
The command which cross-seed Should help you find an absolute path. |
Beta Was this translation helpful? Give feedback.
-
@mmgoodnow Thanks. The result is /usr/bin/cross-seed So should the following line work? |
Beta Was this translation helpful? Give feedback.
-
Only one way to find out! |
Beta Was this translation helpful? Give feedback.
-
@mmgoodnow, that didn't work either. Same issue: So, it looks like even if I provide the absolute path of /usr/bin/cross-seed, it still looks for /cross-seed. Any other ideas why that may be? |
Beta Was this translation helpful? Give feedback.
-
Did you install cross-seed globally with |
Beta Was this translation helpful? Give feedback.
-
Yes. npm list --location=global cross-seed |
Beta Was this translation helpful? Give feedback.
-
I was able to reproduce your error message in my own shell, by doing:
That got me the Given that, I think the systemd unit is still trying to invoke Try changing it to |
Beta Was this translation helpful? Give feedback.
-
You might even be able to shorten it to |
Beta Was this translation helpful? Give feedback.
-
I was using daemon-reload between the steps. So the problem is definitely not that. I tried those solutions once again (even if I was positive I tried them before), and it didn't work either... No matter how I change ExecStart paths, the issue is still the same: Error: Cannot find module '/cross-seed'. It looks like it ignores completely the path I provide, which is weird, to say the least. |
Beta Was this translation helpful? Give feedback.
-
this really feels like a daemon-reload issue or something similar. Maybe you have multiple unit files, and you're editing the first one and running the second? I was able to reproduce the error message you're getting, only with:
Several other ExecStarts worked perfectly:
|
Beta Was this translation helpful? Give feedback.
this really feels like a daemon-reload issue or something similar. Maybe you have multiple unit files, and you're editing the first one and running the second?
I was able to reproduce the error message you're getting, only with:
ExecStart=/usr/bin/node cross-seed daemon
ExecStart=node cross-seed daemon
Several other ExecStarts worked perfectly:
ExecStart=cross-seed daemon
ExecStart=/usr/bin/cross-seed daemon
ExecStart=node /usr/bin/cross-seed daemon
ExecStart=/usr/bin/node /usr/bin/cross-seed daemon