Bug 779319 (SOA-1707)

Summary: ERROR messages show up when rule agent can't contact the BRMS
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Jaroslaw Kijanowski <kijanowski>
Component: Documentation, JBoss RulesAssignee: Jaroslaw Kijanowski <kijanowski>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.0 ER5   
Target Milestone: ---   
Target Release: 5.0.0 CR1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1707
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-09 08:23:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Jaroslaw Kijanowski 2009-12-11 10:53:54 UTC
Date of First Response: 2010-02-08 19:43:41
project_key: SOA

Not sure this is a bug, more likely a logging issue in Drools, however IMO it should be at least documented and eventually the log severity might be changed.

Detailed description of the QS I use is here:
https://docspace.corp.redhat.com/clearspace/docs/DOC-27544

The BRP uses a rule agent to get a rule package. This rule agent is configured to maintain a local cache, just in case the BRMS server goes down.
When I run the QS for the first time, the rule package is downloaded and put in to the cache dir. So far so good.
When I stop the BRMS server,  I would expect that the rule agent grabs the local cached copy letting me know with an INFO, eventually WARN message, but what I get are following messages: 

05:46:58,593 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Was an error contacting http://10.16.94.36:8080/jboss-brms/org.drools.guvnor.Guvnor/package/soa/LATEST. Reponse header: {}
05:46:58,594 ERROR [LogAgentEventListener] AgentName = 'insuranceconfig' Exception: Was unable to reach server.
java.io.IOException: Was unable to reach server.
	at org.drools.agent.URLScanner.hasChanged(URLScanner.java:155)
	at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:119)
	at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
	at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
	at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
	at org.drools.agent.RuleAgent$2.run(RuleAgent.java:516)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
05:46:58,595 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Falling back to local cache.
05:46:58,753 INFO  [LogAgentEventListener] AgentName = 'insuranceconfig' Applying changes to the rulebase.
05:46:58,753 INFO  [LogAgentEventListener] AgentName = 'insuranceconfig' Creating a new rulebase as per settings.
05:46:58,754 INFO  [LogAgentEventListener] AgentName = 'insuranceconfig' Adding package called soa
05:47:28,351 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Was an error contacting http://10.16.94.36:8080/jboss-brms/org.drools.guvnor.Guvnor/package/soa/LATEST. Reponse header: {}
05:47:28,351 ERROR [LogAgentEventListener] AgentName = 'insuranceconfig' Exception: Was unable to reach server.
java.io.IOException: Was unable to reach server.
	at org.drools.agent.URLScanner.hasChanged(URLScanner.java:155)
	at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:119)
	at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
	at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
	at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
	at org.drools.agent.RuleAgent$2.run(RuleAgent.java:516)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
05:47:28,352 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Falling back to local cache.
05:47:58,352 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Was an error contacting http://10.16.94.36:8080/jboss-brms/org.drools.guvnor.Guvnor/package/soa/LATEST. Reponse header: {}
05:47:58,353 ERROR [LogAgentEventListener] AgentName = 'insuranceconfig' Exception: Was unable to reach server.
java.io.IOException: Was unable to reach server.
	at org.drools.agent.URLScanner.hasChanged(URLScanner.java:155)
	at org.drools.agent.URLScanner.getChangeSet(URLScanner.java:119)
	at org.drools.agent.URLScanner.loadPackageChanges(URLScanner.java:96)
	at org.drools.agent.RuleAgent.checkForChanges(RuleAgent.java:410)
	at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:362)
	at org.drools.agent.RuleAgent$2.run(RuleAgent.java:516)
	at java.util.TimerThread.mainLoop(Timer.java:512)
	at java.util.TimerThread.run(Timer.java:462)
05:47:58,354 WARN  [LogAgentEventListener] AgentName = 'insuranceconfig' Falling back to local cache.

====================================

Just to be clear, the local cache is used successfully, it's just the logging at the ERROR level and stack trace, that might cause confusion.

Comment 1 David Le Sage 2010-02-09 00:43:41 UTC
I have documented this issue for the Release Notes document. Here is the draft text:

https://jira.jboss.org/jira/browse/SOA-1707

    The BRP Rule Agent is designed to use a local cached copy of a rules package if the BRMS
    is offline. At the moment, when this happens, error messages are generated, which might
    confuse users. These messages can be ignored as the locally cached copy is, in fact, being used
    successfully.