Failed to enable unit: unit file husarnet.service does not exist

I am unable to start the husarnet post installation on my Ubuntu 18.04.
I am running the following command, following the installation instructions:

curl -s https://install.husarnet.com/install.sh | sudo bash

At the end I get the following message:
Screenshot 2023-05-19 140619
As you can also see, I tried manually starting the daemon without success. If I run sudo husarnet status it says that the daemon is not running.

I also re-flashed the whole OS and tried it on the fresh 18.04 on my Jetson with the same results.

Additionally, I tried installing Husarnet by manually setting up the repos and total manual installation, all without results.

If I run sudo systemctl enable husarnet, I get the following error message: “Failed to enable unit: Unit file husarnet.service does not exist.”

Any idea what might be causing it?

Thank you.

I meet the same problem. Did you have some solutions?

Hello @mrcube3, @sunyuan789

Thanks for the report. I’ll try to reproduce this, right now I can’t.

You can try executing:

sudo husarnet daemon service-install

To install systemctl service manually.

Please provide the output of the command if it fails.

BR,
Szymek

Hi Szymek,

Thank you for the quick response! It seems that it has partially fixed the issue, the daemon now runs but now I am stuck on joining:
image
I had a look at the trouble shooting guide ( Understanding Husarnet Status and Troubleshooting | Husarnet) but it does not help.

Hello mrcube3,

To troubleshoot, I will need the logs from journalctl -u husarnet and husarnet status output
You can share them here or alternatively you can send them to support@husarnet.com

BR,
ympek

Hi ympek, Szymek,

Thank you for your help. I reflashed the OS and on the new install it works fine with Szymek’s suggestion. I am able to join fine.
Not sure what happened with the old OS as it is identical to this new one :man_shrugging:

Have a nice day!

1 Like

Hello ympek , i have the same problem . Here’s the output for journalctl -u husarnet
simbiot@simbiot-jetson-nano-1:~$ journalctl -u husarnet
– Logs begin at Thu 2023-03-02 13:58:02 CET, end at Tue 2024-05-28 10:57:21 CEST. –
mai 28 09:43:19 simbiot-jetson-nano-1 systemd[1]: Started Husarnet Client.
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: NAME:
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: Husarnet CLI daemon - Control the local dae
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: USAGE:
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: Husarnet CLI daemon command [command option
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: COMMANDS:
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: status Display cur
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: join Connect to
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: logs Display and
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: notifications Manage noti
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: wait Wait until
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: start, up start husar
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: stop, down stop husarn
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: restart, down restart hus
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: setup-server, change-dashboard Connect you
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: whitelist Manage whit
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: hooks Manage hook
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: genid, genID, genId, gen-id Generate a
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: service-install install ser
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: service-uninstall remove serv
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: help, h Shows a lis
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: OPTIONS:
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]: --help, -h show help (default: false)
mai 28 09:43:19 simbiot-jetson-nano-1 husarnet[15258]:
mai 28 09:43:22 simbiot-jetson-nano-1 systemd[1]: husarnet.service: Service hold-off time over, sched
mai 28 09:43:22 simbiot-jetson-nano-1 systemd[1]: husarnet.service: Scheduled restart job, restart co
mai 28 09:43:22 simbiot-jetson-nano-1 systemd[1]: Stopped Husarnet Client.
mai 28 09:43:22 simbiot-jetson-nano-1 systemd[1]: Started Husarnet Client.
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: NAME:
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: Husarnet CLI daemon - Control the local dae
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: USAGE:
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: Husarnet CLI daemon command [command option
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: COMMANDS:
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: status Display cur
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: join Connect to
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: logs Display and
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: notifications Manage noti
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: wait Wait until
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: start, up start husar
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: stop, down stop husarn
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: restart, down restart hus
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: setup-server, change-dashboard Connect you
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: whitelist Manage whit
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: hooks Manage hook
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: genid, genID, genId, gen-id Generate a
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: service-install install ser
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: service-uninstall remove serv
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: help, h Shows a lis
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: OPTIONS:
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]: --help, -h show help (default: false)
mai 28 09:43:22 simbiot-jetson-nano-1 husarnet[15288]:
mai 28 09:43:26 simbiot-jetson-nano-1 systemd[1]: husarnet.service: Service hold-off time over, sched
mai 28 09:43:26 simbiot-jetson-nano-1 systemd[1]: husarnet.service: Scheduled restart job, restart co
mai 28 09:43:26 simbiot-jetson-nano-1 systemd[1]: Stopped Husarnet Client.
mai 28 09:43:26 simbiot-jetson-nano-1 systemd[1]: Started Husarnet Client.
lines 1-56

And for husarnet status
simbiot@simbiot-jetson-nano-1:~$ husarnet status
INFO: Daemon does not seem to be running

Do you want to restart Husarnet Daemon now? [y/N]:

Thank you

Hello Ralph,
Husarnet consists of two binaries - husarnet (/usr/bin/husarnet) and husarnet-daemon (/usr/bin/husarnet-daemon). The latter is meant to run as systemd service in your OS, not the first one. Judging by logs you are trying to run husarnet binary as a daemon, which will not work.

What steps did you perform in order to install Husarnet?
I think systemd service file is corrupt. Can you check its contents (the path will be something like /etc/systemd/system/husarnet.service, you can check actual path by using systemctl status husarnet

BR,
ympek

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.