Bug 977350 - Log events will not be collected if target log file doesn't exist at the time the resource is started by the plug-in container
Summary: Log events will not be collected if target log file doesn't exist at the time...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.1.2
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: DR01
: JON 3.2.1
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On: 977352
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-24 11:21 UTC by bkramer
Modified: 2018-12-01 14:22 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-05-08 17:43:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Knowledge Base (Solution) 406713 0 None None None Never

Description bkramer 2013-06-24 11:21:20 UTC
Description of problem:
Newly added monitoring server "test-jboss-managed-server" is not started so there is no test-jboss-managed-server folder under domain/servers. When we enable event monitoring, the following message will be logged:

ERROR [ResourceContainer.invoker.daemon-1] (core.pluginapi.event.log.LogFileEventResourceComponentHelper)- LOGFILE: Logfile at location /opt/app/jboss-eap-6.1/domain/servers/test-jboss-managed-server/log/server.log does not exist or is not readable. Can not start watching the event log.

and the events will not be captured.


Version-Release number of selected component (if applicable):
JBoss ON 3.1.2

How reproducible:
Always

Steps to Reproduce:
1. Import JBoss 6.1 in domain mode into JBoss ON inventory;
2. Create new managed server "test-jboss-managed-server";
3. Before above server is started, enable log monitoring (test-jboss-managed-server resource -> Inventory -> Connection Settings);
4. check domain/servers and confirm that test-jboss-managed-server folder does not exist;


Actual results:
The error message will be logged:

ERROR [ResourceContainer.invoker.daemon-1] (core.pluginapi.event.log.LogFileEventResourceComponentHelper)- LOGFILE: Logfile at location /opt/app/jboss-eap-6.1/domain/servers/test-jboss-managed-server/log/server.log does not exist or is not readable. Can not start watching the event log.

and no events are captured.


Expected results:
No errors are logged and events are properly captured.

Additional info:
If the server is first started and then log monitoring is enabled, then events are captured properly.

Comment 3 Thomas Segismont 2014-01-30 17:17:00 UTC
Fixed in master

commit b4c048f8dfe3aab6f4c8347e856b80f40e66f29a
Author: Thomas Segismont <tsegismo>
Date:   Thu Jan 30 18:15:50 2014 +0100

Changed the warning message to indicate that the poller will be started even if the file does not exist

Changed the poller implementation to support "bad" files (non existing or file is a directory): event polling will start as soon as a regular file is found

Comment 4 Jirka Kremser 2014-01-31 10:54:09 UTC
commit in the release branch: 3e109d407

Comment 5 Simeon Pinder 2014-02-18 15:08:19 UTC
Moving to ON_QA as available for testing in the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=336752

Note: the installed version is still JON 3.2.0.GA by design and this represents part of the payload for JON 3.2.1 also known as cumulative patch 1 for 3.2.0.GA.  How this will be delivered to customers is still being discussed.

Comment 6 Jan Bednarik 2014-02-25 17:52:03 UTC
Moving to VERIFIED

Verified on JON 3.2.1 DR01 (Build Number : c758688:4c03150) and EAP 6.0, EAP 6.1, EAP 6.2

Followed the steps and verified that instead of former ERROR message there is a new "info" message (LOGFILE: Logfile at location /home/hudson/jboss-eap6-domain/domain/servers/test-jboss-managed-server3/log/server.log does not exist or is not readable. The poller will be started but no events will be polled until the file is created.) and that after the log file is created the events are logged.

Comment 7 Mike Foley 2014-05-08 17:43:50 UTC
JON 3.2.1 released week of 5/5/2014


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