Bug #15697
closed
Command not found when running "rudder agent enable -s"
Added by Philip Seeger about 5 years ago.
Updated about 5 years ago.
Description
Rudder fails to re-enable and start the agent in some cases.
# rudder agent enable -s
/opt/rudder/share/commands/../lib/common.sh: line 44: service: command not found
Bug #1: The systemd detection fails:
# systemctl list-units --type service --all ${service}.service 2>&1 | grep -q "^${service}.service"; echo $?
1
# systemctl list-units --type service --all ${service}.service 2>&1
UNIT LOAD ACTIVE SUB DESCRIPTION
● rudder.service loaded failed failed LSB: Rudder server
LOAD = Reflects whether the unit definition was properly loaded.
ACTIVE = The high-level unit activation state, i.e. generalization of SUB.
SUB = The low-level unit activation state, values depend on unit type.
1 loaded units listed.
To show all installed unit files use 'systemctl list-unit-files'.
Bug #2: The "service" compatibility wrapper is detected but not executed.
- Target version set to 5.0.14
As for #2:
# $SSH $HOST rudder agent start
/opt/rudder/share/commands/../lib/common.sh: line 46: service: command not found
error: start service rudder-agent failed
# $SSH $HOST PATH=/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin rudder agent start
ok: start service rudder-agent succeeded
I was going to use your rudder-dev script to provide a fix but it keeps failing atm.
- Pull Request set to https://github.com/Normation/rudder-agent/pull/248/commits/14076bd3d8032835cdf971c67aae032fe28dc8bb
- Description updated (diff)
I was going to use your rudder-dev script to provide a fix but it keeps failing atm.
I'm interested in the failure, I'm willing to fix it.
Can you tell me more about the problem ?
- Category set to Agent
- Status changed from New to Pending technical review
- Assignee set to Alexis Mousset
Hi Benoît. I should note that I haven't used that script previously, so it's likely that I'm using it wrong. After installing some missing dependencies and completing the config file, the branch command failed with a backtrace and (I believe; haven't saved the output) "No JSON object could be decoded".
This error happens when the redmine token in the configuration file is not valid, I should replace this with an error message
rudder-dev stack trace fixed by #15699
- Status changed from Pending technical review to Pending release
- Fix check changed from To do to Checked
- Subject changed from rudder agent enable -s: /opt/rudder/share/commands/../lib/common.sh: line 44: service: command not found to Command not found when running "rudder agent enable -s"
- Name check changed from To do to Reviewed
- Status changed from Pending release to Released
This bug has been fixed in Rudder 5.0.14 which was released today.
Also available in: Atom
PDF