Bug 973782 - Agent startup script fails at reboot
Summary: Agent startup script fails at reboot
Status: NEW
Alias: None
Product: RHQ Project
Classification: Other
Component: Agent
Version: 4.5
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Nobody
QA Contact: Mike Foley
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-12 17:47 UTC by Elias Ross
Modified: 2020-04-27 01:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed:

Attachments (Terms of Use)

Description Elias Ross 2013-06-12 17:47:04 UTC
/etc/rc3.d/S93rhq-agent: line 160: cd: ../init.d: No such file or directory
Starting RHQ Agent...
ERROR! Cannot find the RHQ Agent start script
Not found: //bin/rhq-agent.sh

-bash-4.1$ ls -l /etc/rc3.d/S93rhq-agent
lrwxrwxrwx 1 root root 19 Nov  8  2012 /etc/rc3.d/S93rhq-agent -> ../init.d/rhq-agent

I'm guessing because there's a double link here, it's causing confusion:

_DOLLARZERO=`readlink $_READLINK_ARG "$0" 2>/dev/null|| echo "$0"`

$_READLINK_ARG needs to be -f (at least on systems that support it.)

Comment 1 Heiko W. Rupp 2013-06-18 12:30:26 UTC
what is your system in question here? OS/X 10.7 does not know about -f, so this can't be it :)

Red Hat Enterprise Linux 6 also seems to do fine with option -e

-f, --canonicalize
              canonicalize by following every symlink in every component of the given name recursively; all but the last
              component must exist

-e, --canonicalize-existing
              canonicalize by following every symlink in every component of the given name recursively,  all  components
              must exist

Comment 2 Elias Ross 2013-06-18 15:18:58 UTC
Looks like this is from my patched version, not the version in the main RHQ tree. Looks like I commented it out because the agent wasn't working on RHEL 5. But this is needed of course.

# -e option not supported on RHEL 5.4
# if [ "x${_LINUX}${_SOLARIS}${_CYGWIN}" != "x" ]; then
   # _READLINK_ARG="-e"
# fi

You can close this out, if you aren't supported RHEL 5.

Comment 3 Elias Ross 2013-06-18 15:20:54 UTC
Also, for those finding this issue, the fix seems to be to update coreutils on those systems:


but I haven't confirmed this.

Note You need to log in before you can comment on or make changes to this bug.