amonagent icon indicating copy to clipboard operation
amonagent copied to clipboard

Bug: Debian/Ubuntu - Agent failed to start

Open DerDanilo opened this issue 8 years ago • 5 comments

Every time I restart the amon instance the amonagent on it doesn't start properly anymore. I then have to remove and reinstall the amonagent package to get it working again.

Any idea why this happens? Installation is done with root, so I don't get the issue with the "permission denied".

Feb  1 19:43:02 mon amonagent[2718]: time="2018-02-01T19:43:02+01:00" level=info msg="Starting Amon Agent (Version: 0.7.5.3)\n"
Feb  1 19:43:02 mon amonagent[2718]: time="2018-02-01T19:43:02+01:00" level=fatal msg="Failed to verify pid directory  mkdir /var/run/amonagent: permission denied"

DerDanilo avatar Feb 01 '18 20:02 DerDanilo

@DerDanilo I will take a look whenever I have the time. Switched to a new python based release pipeline and some small issues here and there still remain. https://github.com/amonapp/amonagent/blob/master/build.py

And this is the line that should take care of the error you see: https://github.com/amonapp/amonagent/blob/master/packaging/init.sh#L36

Can you tell me your Debian/Ubuntu distro version?

martinrusev avatar Feb 02 '18 10:02 martinrusev

Ubuntu 16.04

I just changed the user in the systemd service file and now it seems to work fine. The package seems to install with root, starting the service with root and on reboot tries to start the service with the amonagent user. Is there a problem starting the service with root rights?

ghost avatar Feb 06 '18 12:02 ghost

@dschwabeS11 Thanks for the report. Will check the build pipeline to see what the issue might be. Starting any service with root rights is a no go in an Enterprise scenario with strict permissions

martinrusev avatar Feb 06 '18 12:02 martinrusev

Starting any service with root rights is a no go in an Enterprise scenario with strict permissions

Of course. I meant in connection with amonagent as I only see this as a temporary workaround.

DerDanilo avatar Feb 06 '18 19:02 DerDanilo

This should be fixed with #26

Grisu118 avatar Feb 09 '18 19:02 Grisu118