Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to configure a JBoss AS 7.1.1 cluster in domain mode with mod_cluster at the apache2 proxy. All hosts are running Ubuntu and are Rackspace Cloud Servers.

My problem is that when I hit my app at http://project.example.com/ I just get a 503

JBoss log reports:

org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [MEM: MEM: Can't read node: {4}] sending command STATUS to proxy proxy-ip/proxy-ip:6666, configuration will be reset

The mod_cluster management page has this information:

DUMP output

balancer: [1] Name: main-server-group Sticky: 1 [JSESSIONID]/[jsessionid] remove: 0 force: 0 Timeout: 0 maxAttempts: 1
node: [1:1],Balancer: main-server-group,JVMRoute: slave:server-two,LBGroup: [],Host: project-jb-node1,Port: 8159,Type: ajp,flushpackets: 0,flushwait: 10,ping: 10,smax: 26,ttl: 60,timeout: 0
node: [2:2],Balancer: main-server-group,JVMRoute: master:server-one,LBGroup: [],Host: project-jb-master,Port: 8009,Type: ajp,flushpackets: 0,flushwait: 10,ping: 10,smax: 26,ttl: 60,timeout: 0
node: [3:3],Balancer: main-server-group,JVMRoute: master:server-two,LBGroup: [],Host: project-jb-master,Port: 8159,Type: ajp,flushpackets: 0,flushwait: 10,ping: 10,smax: 26,ttl: 60,timeout: 0
node: [4:4],Balancer: main-server-group,JVMRoute: slave:server-one,LBGroup: [],Host: project-jb-node1,Port: 8009,Type: ajp,flushpackets: 0,flushwait: 10,ping: 10,smax: 26,ttl: 60,timeout: 0

INFO output:

Node: [1],Name: slave:server-two,Balancer: main-server-group,LBGroup: ,Host: project-jb-node1,Port: 8159,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 100
Node: [2],Name: master:server-one,Balancer: main-server-group,LBGroup: ,Host: project-jb-master,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 100
Node: [3],Name: master:server-two,Balancer: main-server-group,LBGroup: ,Host: project-jb-master,Port: 8159,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 100
Node: [4],Name: slave:server-one,Balancer: main-server-group,LBGroup: ,Host: project-jb-node1,Port: 8009,Type: ajp,Flushpackets: Off,Flushwait: 10,Ping: 10,Smax: 26,Ttl: 60,Elected: 0,Read: 0,Transfered: 0,Connected: 0,Load: 100

After a restart the apache error.log has:

[Sun May 26 19:17:51 2013] [notice] Apache/2.2.22 (Ubuntu) mod_cluster/1.2.0.Final configured -- resuming normal operations
[Sun May 26 19:17:52 2013] [warn] manager_handler STATUS error: MEM: Can't read node
[Sun May 26 19:17:53 2013] [warn] manager_handler STATUS error: MEM: Can't read node
[Sun May 26 19:17:55 2013] [warn] manager_handler STATUS error: MEM: Can't read node
[Sun May 26 19:18:00 2013] [warn] manager_handler STATUS error: MEM: Can't read node
[Sun May 26 19:18:26 2013] [error] proxy: CLUSTER: (balancer://main-server-group). All workers are in error state

If I hit http://project.example.com/index.html I get this in the apache error.log:

[Sun May 26 19:34:33 2013] [warn] proxy: No protocol handler was valid for the URL /index.html. If you are using a DSO version of mod_proxy, make sure the proxy submodules are included in the configuration using LoadModule.

The hostnames (project-jb-master etc) are mapped to IPs in /etc/hosts and I can connet using telnet and can ping.

Googling around this I find lots of mentions of the instance-id so I set this in the full-ha profile:

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="${jboss.node.name}" native="false">
    <connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>
    <connector name="ajp" protocol="AJP/1.3" scheme="http" socket-binding="ajp"/>
    <virtual-server name="default-host" enable-welcome-root="false">
        <alias name="localhost"/>
        <alias name="project.example.com"/>
    </virtual-server>
</subsystem>

but the original message is still there.

share|improve this question
    
I since set explicit names for each JVM using system properties. No improvement. –  Simon Gibbs May 26 '13 at 21:15

1 Answer 1

Set your Apache HTTP Server to LogLevel debug. Then you will be able to see in the error_log, what messages are AS7 instances sending. Furthermore, update to mod_cluster 1.2.6. It is fully backward compatible with 1.2.4 and it contains tons of important bug fixes.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.