Created attachment 516565 [details]
RHQ Agent log
Description of problem: FileNotFoundException in RHQ Agent's log
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Review of Agent log file
2011-08-03 15:15:21,888 WARN [ResourceContainer.invoker.nonDaemon-2] (rhq.plugins.jbossas5.script.ScriptComponent)- Failed to compute the SHA256 digest of the script: /home/mfoley/Downloads/rhq-agent/classpath.sh
java.io.FileNotFoundException: classpath.sh (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Setting to high, for eng. to determine if it is still an issue
I believe that this is a file permissions issue. The agent currently does not check whether or not the file is readable. Mike can you please confirm whether or not classpath.sh is readable by the agent?
Mike could you tell what you were trying to do when this showed up?
Were you trying to inventory scripts (script plugin)?
When generating the initial change set, if a file is not readable, it is skipped and excluded from the change set since we cannot compute the SHA for the file.
When generating a drift change set, if we detect a new file that is not readable, we skip it as well since we cannot compute the SHA. Now if an existing file that is already being monitored for drift has its permissions changed such that it is no longer readable, then it is treated and recorded as a deleted file entry.
commit hash: 786eb9d50b9c8beebf5a9a7edf18e8ba82ef79cd
tested with files with and without rw permission. could not reproduce.
The discovery process was not using the home directory for the JBoss instance as relative path for the file. Instead it was defaulting to the home directory of the agent installation. Since the file was not found among the agent files, it would throw an exception during SHA256 computation.
I visually inspected the rest of this component and this was the only occurrence of the problem.
master branch commit:
Closing as this was implemented in RHQ 4.3 and has not been reopened since.