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

systemctl can't start indiwebmanager.service #63

Open
guilleortas opened this issue Sep 29, 2024 · 12 comments
Open

systemctl can't start indiwebmanager.service #63

guilleortas opened this issue Sep 29, 2024 · 12 comments

Comments

@guilleortas
Copy link

Hi, I couldn't find any issues regarding this. The problem I'm facing is that systemctl cannot start the service.

indiweb is installed and works just fine when called normally from the terminal. However, the command 'sudo systemctl status indiwebmanager.service' shows 'inactive (dead)' I can't get it work start normally. I've tried restarting the service, disabling it, rebooting the device a bunch of times and completely removing the service from systemctl, but nothing seems to work.

I want to clarify this is the second install I performed of indiweb. The first worked without issue. Both were done on RPi 4b 4GB.

Any ideas? Thanks!

@bluthen
Copy link

bluthen commented Oct 1, 2024

Maybe can see why if you do:
sudo journalctl -u indiwebmanager

@guilleortas
Copy link
Author

There is nothing at all on the journald log

@WLR86
Copy link

WLR86 commented Oct 4, 2024

Make sure you set the right user (default : User=Pi) line 8 in /etc/systemd/system/indiwebmanager.service

@guilleortas
Copy link
Author

yep, I had set my username on there

@bluthen
Copy link

bluthen commented Oct 7, 2024

What happens if you try to run it manually then?

As your user:

/usr/local/bin/indi-web -v 

@guilleortas
Copy link
Author

If I launch it directly using the full path as my user it works without issue.
I have created a version of the systemctl service changing the executable to just "echo helloworld" and does not work either, any ideas?
The status of the service always stays at 'inactive (dead)' and there are no logs

@bluthen
Copy link

bluthen commented Oct 8, 2024

start copy and pasting stuff, status, your actual file, etc.

@guilleortas
Copy link
Author

guilleortas commented Oct 9, 2024

First of all, thank you for your help. My username is astromaker. Contents of /etc/systemd/system/indiwebmanager.service:

[Unit]
Description=INDI Web Manager
After=multi-user.target

[Service]
Type=idle
# MUST SET YOUR USERNAME HERE.
User=astromaker
ExecStart=/usr/local/bin/indi-web -v
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target

Commands issued in this order:

sudo chmod 644 /etc/systemd/system/indiwebmanager.service
sudo systemctl daemon-reload
sudo systemctl enable indiwebmanager.service
sudo reboot

(wait for reboot)

sudo systemctl status indiwebmanager.service

Output:

○ indiwebmanager.service - INDI Web Manager
     Loaded: loaded (/etc/systemd/system/indiwebmanager.service; enabled; preset: enabled)
     Active: inactive (dead)

Contents of journalctl:

sudo journalctl -u indiwebmanager
-- No entries --

If I run indiserver by calling it using the full path /usr/local/bin/indi-web -v it works just fine, but systemctl does not run it for the life of me.

@bluthen
Copy link

bluthen commented Oct 9, 2024

Maybe there is an issue with it starting enabled services at startup? What if you start it manually using systemctl? Does that start it?

sudo systemctl start indiwebmanager

You are using Raspberry Pi OS?

When you test it are you using any python virutal environments? Using anything like pyenv?

Really weird there is nothing at all in status. Looks like it isn't trying to start it to begin with. Maybe after a manual start there is some output?

@guilleortas
Copy link
Author

Yes, I'm using Raspberry Pi OS, not using any virtual environments as per the readme instructions.
When I run sudo systemctl start indiwebmanager it never returns, seems like it never runs/starts the service

@bluthen
Copy link

bluthen commented Oct 9, 2024

I'm not sure why it behaving so differently for you. Maybe I'll have a fire up the latest raspberry pi os and try it out.

What if you change type in the service file to simple? idle I believe waits until everything has started, maybe you got something else not starting?

Type=simple

@guilleortas
Copy link
Author

Yeah, no dice. Thank you so much for your help, though.
At this point I'm just starting it manually every time the system boots up.

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

3 participants