Bug 727959
Summary: | FileNotFoundException in RHQ Agent's log | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Mike Foley <mfoley> | ||||
Component: | Content | Assignee: | Stefan Negrea <snegrea> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Mike Foley <mfoley> | ||||
Severity: | medium | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 4.2 | CC: | hrupp, loleary, tfonteyn | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | RHQ 4.3.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | |||||||
: | 788736 (view as bug list) | Environment: | |||||
Last Closed: | 2013-08-31 10:49:02 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 734807, 758753, 782579, 788736 | ||||||
Attachments: |
|
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: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=abe7b89ee8c154446555000f6c4da37086b7e213 Closing as this was implemented in RHQ 4.3 and has not been reopened since. |
Created attachment 516565 [details] RHQ Agent log Description of problem: FileNotFoundException in RHQ Agent's log Version-Release number of selected component (if applicable): How reproducible: 100% Steps to Reproduce: 1. Review of Agent log file 2. 3. Actual results: Expected results: Additional info: 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 java.io.FileInputStream.<init>(FileInputStream.java:137) at org.rhq.core.util.MessageDigestGenerator.calcDigest(MessageDigestGenerator.java:255) at org.rhq.core.util.MessageDigestGenerator.calcDigestString(MessageDigestGenerator.java:291) at org.rhq.plugins.jbossas5.script.ScriptComponent.discoverDeployedPackages(ScriptComponent.java:222) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:537) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:636)