Bug 727959 - FileNotFoundException in RHQ Agent's log
Summary: FileNotFoundException in RHQ Agent's log
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Content
Version: 4.2
Hardware: All
OS: All
high
medium
Target Milestone: ---
: RHQ 4.3.0
Assignee: Stefan Negrea
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks: rhq42 758753 jon310-sprint11, rhq44-sprint11 788736
TreeView+ depends on / blocked
 
Reported: 2011-08-03 19:18 UTC by Mike Foley
Modified: 2018-11-29 19:25 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 788736 (view as bug list)
Environment:
Last Closed: 2013-08-31 10:49:02 UTC
Embargoed:


Attachments (Terms of Use)
RHQ Agent log (112.21 KB, application/octet-stream)
2011-08-03 19:18 UTC, Mike Foley
no flags Details

Description Mike Foley 2011-08-03 19:18:18 UTC
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)

Comment 1 Charles Crouch 2011-08-25 14:28:20 UTC
Setting to high, for eng. to determine if it is still an issue

Comment 2 John Sanda 2011-09-28 15:26:28 UTC
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?

Comment 3 Heiko W. Rupp 2011-09-28 16:06:43 UTC
Mike could you tell what you were trying to do when this showed up?

Were you trying to inventory scripts (script plugin)?

Comment 4 John Sanda 2011-09-28 19:11:56 UTC
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

Comment 5 Mike Foley 2011-09-29 18:19:36 UTC
tested with files with and without rw permission.  could not reproduce.

Comment 8 Stefan Negrea 2012-02-08 22:20:53 UTC
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.

Comment 10 Heiko W. Rupp 2013-08-31 10:49:02 UTC
Closing as this was implemented in RHQ 4.3 and has not been reopened since.


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