Bug 995345

Summary: Misleading mod_cluster error log : All workers are in error state --- mod_proxy_cluster.c(2193)
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: rbrackma
Component: mod_clusterAssignee: Jean-frederic Clere <jclere>
Status: CLOSED EOL QA Contact: Michal Karm Babacek <mbabacek>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.1.0CC: bperkins, jpallich, msochure
Target Milestone: DR2   
Target Release: EAP 6.4.9   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1338636 (view as bug list) Environment:
Last Closed: 2019-08-19 12:44:43 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:
Embargoed:
Bug Depends On:    
Bug Blocks: 1338636    

Description rbrackma 2013-08-09 07:11:11 UTC
Description of problem:
Misleading error log when using "CreateBalancers 1" and "ProxyPass /" in VHost and the called context does not exist http://VHost1-Apache/notExistingApp :
[error] proxy: CLUSTER: (balancer://mycluster-vhost1). All workers are in error state
should be
[warn] proxy: CLUSTER: (balancer://mycluster-vhost1). Context not available

This potentially pollutes the error log and as the LogLevel is on maximum, there is nothing to tweak...

Version-Release number of selected component (if applicable):
mod_cluster 1.2.4 (shipped with EAP 6.1.0)

How reproducible:
When using muliple preconfigured Virtualhosts in Apache (each VHost logs into it's own logs), mod_cluster needs to be configured with "CreateBalancers 1".
In addition to that you need to add a ProxyPass into the configuration of your VHost like this :
"ProxyPass / balancer://mycluster-vhost1/ stickysession=JSESSIONID|jsessionid nofailover=On".
In my scenario the VHost are listening on the same port (80) and are distinguished by ServerName/ServerAlias. (I ignore the VHosts that are configured on the JBoss side : UseAlias 0)

Mod_cluster adds dynamically the contexts as JBoss propagates them to Apache, therefore we do not know the context names beforehand and we have to ProxyPass slash ("/") meaning we pass everything to the backend JBoss...
For the same reason we can not use "# ProxyPassMatch /no-not-forward-here !"

Let's imagine the following scenario :
JBoss (IP-JBoss) has only one application deployed /myapp and tells Apache (IP-Apache) to propagate it via VHost1-Apache.

When calling http://VHost1-Apache/myapp everything is OK.
When I kill JBoss and call http://VHost1-Apache/myapp again, I would expect a "All workers are in error state" as I'm presenting a SESSIONID for a node that is not there, which is the case. OK. 
After restarting JBoss and calling http://VHost1-Apache/myapp everything is OK again.
And now the ISSUE :
When calling http://VHost1-Apache/notExistingApp I will see the following error log of VHost1 :
[debug] mod_proxy_cluster.c(2193): proxy: byrequests balancer FAILED
[error] proxy: CLUSTER: (balancer://mycluster-vhost1). All workers are in error state

After checking with the dev team, this error log is only logging, but does not have any impact on the workers (no restart, no nothing). Therefore this log should be modified and the LogLevel should also be lowered.


Actual results:
[error] proxy: CLUSTER: (balancer://mycluster-vhost1). All workers are in error state

Expected results:
[warn] proxy: CLUSTER: (balancer://mycluster-vhost1). Context not available

Additional info: