[转帖]AS7 Cluster Howto - JBoss AS 7.1 - Project Documentation Editor_MQ, Tuxedo及OLTP讨论区_Weblogic技术|Tuxedo技术|中间件技术|Oracle论坛|JAVA论坛|Linux/Unix技术|hadoop论坛_联动北方技术论坛  
网站首页 | 关于我们 | 服务中心 | 经验交流 | 公司荣誉 | 成功案例 | 合作伙伴 | 联系我们 |
联动北方-国内领先的云技术服务提供商
»  游客             当前位置:  论坛首页 »  自由讨论区 »  MQ, Tuxedo及OLTP讨论区 »
总帖数
1
每页帖数
101/1页1
返回列表
0
发起投票  发起投票 发新帖子
查看: 9143 | 回复: 0   主题: [转帖]AS7 Cluster Howto - JBoss AS 7.1 - Project Documentation Editor        上一篇   下一篇 
unknsnow
注册用户
等级:上士
经验:272
发帖:78
精华:0
注册:2012-2-10
状态:离线
发送短消息息给unknsnow 加好友    发送短消息息给unknsnow 发消息
发表于: IP:您无权察看 2018-5-8 17:51:39 | [全部帖] [楼主帖] 楼主

Go to start of metadata

Version

Please use the newest JBoss EAP 6.1.0.Final to follow this document, or you'll meet a lot of bugs.

In this article, I'd like to show you how to setup JBoss AS7 in domain mode and enable clustering so we can get HA (high availability) and session replication among the nodes. It's a step to step guide so you can follow the instructions in this article and build the sandbox by yourself.

Preparation & Scenario

Preparation

Scenario

Download JBoss AS7

Domain Configuration

Interface config on master

Interface config on slave

Master

Slave

Setup HornetQ

Dry Run

Deployment

Cluster Configuration

Testing

Additional Resources

Special Thanks

Preparation & Scenario

Preparation

We need to prepare two hosts (or virtual hosts) to do the experiment. We will use these two hosts as follows:

Install Fedora 16 on them (Another linux version may also work, but I'll use Fedora 16 in this article)

Make sure the hosts are in same local network

Make sure that they can access each other via different TCP/UDP ports (it's better to turn off firewall and disable SELinux during the experiment or they will cause network problems).

Scenario

Here are some details on what we are going to do:

Let's call one host 'master' and the other one 'slave'.

Both master and slave will run AS7, and master will run as domain controller, slave will under the domain management of master.

Apache httpd will be run on master, and we'll enable the mod_cluster module in httpd. The as7 on master and slave will form a cluster and be discovered by httpd.

We will deploy a demo project into domain and verify that the project is deployed into both master and slave by domain controller. Thus we could confirm that domain management provide us a single point to manage the deployments across multiple hosts in a single domain.

We will access the cluster URL and verify that httpd has distributed the request to one of the as7 host. This helps us confirm that the cluster is working properly.

We will try to make a request to the cluster, and if the request is forwarded to master as7, we then kill the as7 process on master. After that we will go on requesting cluster and we should see that the request has been forwarded to slave, but the session has not been lost. Our goal is to verify the HA is working and sessions are replicated.

After the previous step has been completed we reconnect the master as7 by restarting it. We should see the master as7 is registered back into cluster, and we should also see slave as7 recognizes master as7 as domain controller again and connects to it.

Please don't worry if you cannot digest so all the details now. Let's move on and you will get the points step by step.

Download JBoss AS7

First we should download the AS7 from website:

The version I downloaded is 7.1.0.CR1b, please don't use the version prior to this one, or you will meet this bug when running in clustering mode:

After the download has completed, I have the zip file:

Then I unzipped the package to master and try a test run:

If everything ok we should see AS7 successfully startup in domain mode:

Now exit as7 and let's repeat the same steps on slave host. Finally we get AS7 run on both master and slave, then we can move onto the next step.

Domain Configuration

Interface config on master

In this section we'll setup both master and slave for them to run in domain mode. And we will configure master to be the domain controller.

First open the host.xml in master as7 for editing:

The default settings for interface in this file is like:

We need to change the address to the management interface so slave can connect to master. The public interface allows the application to be accessed by non-local HTTP, and the unsecured interface allows remote RMI access. My master's ip address is 10.211.55.7, so I change the config to:

Interface config on slave

Now we will setup interfaces on slave. First we need to remove the domain.xml from slave, because slave will not act as domain controller and is under the management of master. I just rename the domain.xml so it won't be processed by as7:

From AS 7.1.Final you don't need to rename domain.xml anymore.

Then let's edit host.xml. Similar to the steps on master, open host.xml first:

The configuration we'll use on slave is a little bit different because we need to let slave as7 connect to master as7. First we need to set the hostname. We change the name property from:

Then we need to modify domain-controller section so slave as7 can connect to master's management port:

As we know, 10.211.55.7 is the ip address of master.

Finally, we also need to configure interfaces section and expose the management ports to public address:

10.211.55.2 is the ip address of the slave. Refer to the domain controller configuration above for an explanation of the management, public, and unsecured interfaces.

It is easier to turn off all firewalls for testing, but in production, you need to enable the firewall and allow access to the following ports: TBD

Security Configuration

If you start as7 on both master and slave now, you will see the slave as7 cannot be started with following error:

Because we haven't properly set up the authentication between master and slave. Now let's work on it:

Master

In bin directory there is a script called add-user.sh, we'll use it to add new users to the properties file used for domain management authentication:

As shown above, we have created a user named 'admin' and its password is '123123'. Then we add another user called 'slave':

We will use this user for slave as7 host to connect to master.

Notice that the username must be equal to the name given in the slaves host element. That means that for each additional host you need a user.

In newer versions of JBoss AS7, the add-user.sh will let you choose the type of the user. Here we need to choose 'Management User' type for both 'admin' and 'slave' account:

Slave

In slave we need to configure host.xml for authentication. We should change the security-realms section as following:

We've added server-identities into security-realm, which is used for host authentication when slave tries to connect to master. Because the slave's host name is set as 'slave', so we should use the 'slave' user's password on master. In the secret value property we have 'MTIzMTIz=', which is the base64 code for '123123'. You can generate this value by using a base64 calculator such as the one at http://www.webutils.pl/index.php?idx=base64.

Then in domain controller section we also need to add security-realm property:

So the slave host could use the authentication information we provided in 'ManagementRealm'.

Setup HornetQ

The newer version of JBoss AS7 has enforced the security checking for HornetQ. So you need to some additional configuration in domain controller. Open domain.xml of master and find:

This is the config for hornetq, we need to put 'cluster-user' and 'cluster-password' into it:

There are two "<subsystem xmlns="urn:jboss:domain:messaging:1.3">" config sections in domain.xml. One is for "<profile name="full">" and another for "full-ha". If you have activated both of these two profiles, then you should put the 'cluster-user' and 'cluster-password' settings in both of them.

The 'cluster-user' and 'cluster-password' settings are just user-defined values; you can choose whatever you want. The authentication scheme used by HornetQ here is simple: when a host connects to domain controller, the HornetQ instance running on domain controller will tell the host its 'cluster-user' and 'cluster-password' settings. Then the connected host's HornetQ instance will use this setting to communicate and form a cluster with other HornetQ instances running in the domain. This is a simple but effective way to prevent some outsiders from participating on this domain's HornetQ cluster.

If you do not want to use this security scheme, just disable it in "<subsystem xmlns="urn:jboss:domain:messaging:1.3">":

Dry Run

Now everything is set for the two hosts to run in domain mode. Let's start them by running domain.sh on both hosts. If everything goes well we should see the following in the log on master:

That means all the configurations are correct and the two hosts are running in domain mode now as expected. Hurrah!

Deployment

Now we can deploy a demo project into the domain. I have created a simple project located at:

We can use git command to fetch a copy of the demo:

In this demo project we have a very simple web application. In web.xml we've enabled session replication by adding following entry:

And it contains a jsp page called put.jsp which will put current time to a session entry called 'current.time':

Then we could fetch this value from get.jsp:

It's an extremely simple project but it could help us to test the cluster later: We will access put.jsp from cluster and see the request are distributed to master, then we disconnect master and access get.jsp. We should see the request is forwarded to slave but the 'current.time' value is held by session replication. We'll cover more details on this one later.

Let's go back to this demo project. Now we need to create a war from it. In the project directory, run the following command to get the war:

It will generate cluster-demo.war. Then we need to deploy the war into domain. First we should access the http management console on master (Because master is acting as domain controller):

It will popup a windows prompting you to input an account name and a password; we can use the 'admin' account we've just added. After logging in we will see the 'Server Instances' window. By default there are three servers listed, which are:

server-one

server-two

server-three

We can see server-one and server-two are in running status and they belong to main-server-group; server-three is in idle status, and it belongs to other-server-group.

All these servers and server groups are set in domain.xml on master as7. What we are interested in is the 'other-server-group' in domain.xml:

We could see this server-group is using 'ha' profile, which then uses 'ha-sockets' socket binding group. It enable all the modules we need to establish the cluster later (including infinispan, jgroup and mod_cluster modules). So we will deploy our demo project into a server that belongs to 'other-server-group', so 'server-three' is our choice.

In newer version of JBoss AS7, the profile 'ha' changes to 'full-ha':

Let's go back to domain controller's management console:

Now server-three is not running, so let's click on 'server-three' and then click the 'start' button at bottom right of the server list. Wait a moment and server-three should start now.

Now we should also enable 'server-three' on slave: From the top of menu list on left side of the page, we could see now we are managing master currently. Click on the list, and click 'slave', then choose 'server-three', and we are in slave host management page now.

Then repeat the steps we've done on master to start 'server-three' on slave.

server-three on master and slave are two different hosts, their names can be different.

After server-three on both master and slave are started, we will add our cluster-demo.war for deployment. Click on the 'Manage Deployments' link at the bottom of left menu list.

(We should ensure the server-three are running on both master and slave)

Then enter 'Manage Deployments' page, click 'Add Content' at top right corner. Then we should choose our cluster-demo.war and follow the instruction to add it into our content repository.

Now we can see cluster-demo.war is added. Next we click 'Add to Groups' button and add the war to 'other-server-group' and then click 'save'.

After waiting a few seconds, the management console should tell you that the project is deployed into 'other-server-group'.:

Please note we have two hosts participate in this server group, so the project should be deployed in both master and slave now - that's the power of domain management.

Now let's verify this by trying to access cluster-demo from both master and slave. They should all work now:

Now that we have finished the project deployment and see the usages of domain controller, we will then head up for using these two hosts to establish a cluster

Why the port number is 8330 instead of 8080? Please check the settings in host.xml on both master and slave:

The port-offset is set to 250, so 8080 + 250 = 8330

Now we quit the as7 process on both master and slave. We have some work left on host.xml configurations. Open the host.xml of master, and make the following modifications to the servers section changing from:

We've set auto-start to true so we don't need to enable it in management console each time as7 restart. Now open slave's host.xml, and modify the server-three section:

Besides setting auto-start to true, we've renamed the 'server-three' to 'server-three-slave'. We need to do this because mod_cluster will fail to register the hosts with same name in a single server group. It will cause name conflict.

After finishing the above configuration, let's restart two as7 hosts and go on to cluster configuration.

Cluster Configuration

We will use mod_cluster + apache httpd on master as our cluster controller here. Because AS7 has been configured to support mod_cluster out of box so it's the easiest way.

The AS7 domain controller and httpd are not necessary to be on same host. But in this article I just install them all on master for convenience.

First we need to ensure that httpd is installed:

And then we need to download newer version of mod_cluster from its website:

Jean-Frederic has suggested to use mod_cluster 1.2.x. Because 1.1.x it is affected by CVE-2011-4608 With mod_cluster-1.2.0 you need to add EnableMCPMReceive in the VirtualHost.

This is in conflict with cluster module. Then we need to make httpd listen to public address so we can do the testing. Because we installed httpd on master host we know the ip address of it:

Then we do the necessary configuration at the bottom of httpd.conf:

For more details on mod_cluster configurations please see this document:

Testing

If everything goes well we can now start the httpd service:

We should see the request is distributed to one of the hosts(master or slave) from the as7 log. For me the request is sent to master:

Now I disconnect master as7 by using the management interface. Select 'runtime' and the server 'master' in the upper corners.

Select 'server-three' and kick the stop button, the active-icon should change.

Killing the server by using system commands will have the effect that the Host-Controller restart the instance immediately!

Then wait for a few seconds and access cluster:

Now the request should be served by slave and we should see the log from slave as7:

From the get.jsp we should see that the time we get is the same we've put by 'put.jsp'. Thus it's proven that the session has been correctly replicated to slave.

Now we restart master as7 and should see the host is registered back to cluster.

It doesn't matter if you found the request is distributed to slave at first time. Then just disconnect slave and do the testing, the request should be sent to master instead. The point is we should see the request is being redirected from one host to another and the session is held.

Additional Resources

If you'd like to understand how to set multiple httpd load balancers in a cluster, please refer to this article: Setting multiple mod_cluster load balancers in clustering environment

This article is focusing on AS7 domain mode + mod_cluster integration. If you are interested in using AS7 with mod_jk, please check Using mod_jk with JBoss AS7

If you want to know how to develop an application with AS7, please check [Developing JSF Project Using JBoss AS7, Maven and IntelliJ]

Special Thanks

Wolf-Dieter Fink has contributed the updated add-user.sh usages and configs in host.xml from 7.1.0.Final.

Jean-Frederic Clere provided the mod_cluster 1.2.0 usages.

Misty Stanley-Jones has given a lot of suggestions and helps to make this document readable.

Labels parameters

Looking for a label? Just start typing.

A couple of things.

1. Am I correct that the first half of this demo shows session replication, while the other half shows HTTP front-end clustering? If not, what is the second part showing?

2. I am really confused how you knew the proper way to encode the password for the host.xml file. I tried to read carefully but didn't see this mentioned as a requirement.

3. Is it possible to do any of this configuration using the Management CLI instead of editing the XML directly? We are trying to discourage people from editing the XML.

Permalink

1. The demo project itself is a very simple web app that has session replication config enabled in web.xml:

At first half of the article we've setup two hosts and make them form a domain. master is acting as domain controller+host and slave is a host that under the control of master. We then use the domain controller to deploy the web project with one click on both master and slave (by HTTP management console). So we are showing the functions provided by domain controller at this point: Provides a central point to management the project deployments across all the hosts in domain.

Then we use mod_cluster module in http to connect with two AS7 hosts to form a cluster. And then we create a scenario by disconnecting a host that is accepting requests to test the failover are working correctly, and sessions are replicated to the other host. Actually this is achieved by Infinispan, JGroup and mod_cluster modules together, which are defined in domain.xml. They are just configured out of box.

I should explain more details on the clustering in article. I'll add them soon.

2. It's described in this doc:

https://docs.jboss.org/author/display/AS7/Admin+Guide#AdminGuide-Secret

I just use bash command to generate the base64 encoded message. I'll add more details on this one.

3. Most of the configurations in this article could not be done by using CLI. Because these are the configurations that should be completed before server start(Like IP bindings, etc).

Permalink

I was wondering when i start the slace host controller i get the follow message

[Server:malcolm] 20:34:34,179 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) Operation ("add") failed - address: ([("interface" => "unsecure")]) - failure description: "JBAS014763: any-address is required"

why am i getting this error I am jboss 7.1 final on wondows. is this saying that my host can not connect to the unsecure interface. I notice that I also do not see my servers on the domain control panel.

Permalink

Sorry I couldn't reproduce your problem on my machines. Maybe posting host.xml on both your master and slave to https://gist.github.com/ and provide a link here could be more helpful for me to investigate your problem.

Permalink

Hi Weinan;

Thanks for the cluster guide. It was really helpfull in getting everything set up. However I used a Windows XP pro OS, and the MS Loopback adapter with 3 custom IP's. I then used these as my "servers". All goes well and the clustering from the JBoss 7.1 AS servers works well. However when I try to setup the httpd server I run into problems.

I first tried a already installed Apache HTTP server with the mod_x.so mentioned just copied from the mod_cluster zip file, and the config you mentioned. No dice. Then I tried both the 1.20 mod cluster httpd and the 1.1.3 without any success. I can get the default "IT WORKS" page, but it seems not to forward to the JBoss AS 7.1 when trying to access cluster_demo.

Here are the questions I have. If you are not running the httpd on the same server as the master jboss, what is the ip supposed to be for the following:

Listen <?>:6666

<VirtualHost <?>:6666>

Allow from <?>

Permalink

Hi Gerhard,

I'm a little bit confused about your problem. You said the mod_cluster doesn't work in http. But then you said you can get the default page when accessing cluster url. Could you please tell me more details on your problem?

For the listening address configurations of httpd, you should set the Listen to the IP address of your host which httpd is running on, and please ensure the IP address are in same local network with your AS7 hosts.

VirtualHost address should be same with the Listen address, which is also the IP address that your httpd is running on.

Allow from should be set to the subnet address that all your machines are in(Your httpd and AS7 hosts are all in same subnet right? Please ensure that's true).

Permalink

The Apache HTTP zip comes with a page in the htdocs directory with one index.html file that just reads "IT WORKS!" So when I go to http://localhost/ thats what I get. However when I try to go to http://localhost/cluster-demo/put.jsp I just get a 404. So what I am seeing is that its trying to get cluster-demo/put.jsp from the htdocs directory. So the mod_cluster on its own does nothing. Do we need to add a entry to forward all requests of a certain type to the server?

Permalink

Sounds like your 'other-server-group' in AS7 is not started. Please login into AS7 management console and ensure 'other-server-group' is running.

Permalink

Hi Weinan

After struggling with my own httpd setup I finally removed and installed mod_cluster-1.2.0.Final-linux2-x64-ssl.tar.gz

That solved a lot of issues, I now see:

127.0.0.1 - - [26/Feb/2012:10:27:38 +0700] "STATUS / HTTP/1.1" 200 85

127.0.0.1 - - [26/Feb/2012:10:27:48 +0700] "STATUS / HTTP/1.1" 200 85

127.0.0.1 - - [26/Feb/2012:10:27:58 +0700] "STATUS / HTTP/1.1" 200 85

127.0.0.1 - - [26/Feb/2012:10:28:08 +0700] "STATUS / HTTP/1.1" 200 85

in the httpd access_log

I see the welcome on port 8000 (httpd has Listen 8000)

httpd.conf has the following directives:

<IfModule ssl_module>

SSLRandomSeed startup builtin

SSLRandomSeed connect builtin

</IfModule>

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

Listen 127.0.0.1:6666

ManagerBalancerName mycluster

<VirtualHost 127.0.0.1:6666>

<Location />

Order deny,allow

Deny from all

Allow from all

</Location>

KeepAliveTimeout 300

MaxKeepAliveRequests 0

#ServerAdvertise on http://@IP@:6666

AdvertiseFrequency 5

#AdvertiseSecurityKey secret

#AdvertiseGroup (ADVIP):23364

EnableMCPMReceive

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from 127.0.0

</Location>

</VirtualHost>

</IfModule>

My last question is, how do I get to the web service from my front end

The front end is a c sharp application that connect with:

<client>

<endpoint address="http://192.168.2.3:8082/beans/XMLTranServiceBean/XMLTranServiceBean"

binding="basicHttpBinding" bindingConfiguration="XMLTranServiceBeanSoapBinding"

contract="CapitalWebService.XMLTranServiceBean" name="XMLTranServiceBeanPort" />

</client>

The above example works because it goes straight to JBoss http port (as defined in domain.xml).

The question is: how do I play this into the cluster via httpd ?

To put it simply, I am looking for the mod_cluster equivalent of the mod_jk config file workers.properties

It had this directive inside: /STARXMLTranServiceBean/STAR=loadbalancer (STAR = * which seems to be meaningful with this editor)

That fished out my front end transactions in httpd before, any URL with the above strings inside would go to JBoss 4 via Tomcat 8009

How does that work with mod_cluster ?

Thanks and best regards

Johan Vermeij

Jakarta

Permalink

Hi Johan,

After two AS7 hosts are setup they can be accessed directly by their own IPs. And session replication is working with the help of JGroup and Infinispan configured out-of-box in AS7 domain.xml. But the cluster is useless if we could not have a 'single entry point' for user to access(We don't want the users to know each AS7 node's IP address).

So we need mod_cluster+httpd to provide an address that user could use for accessing the cluster: httpd will provide a listening IP address that user can access, and mod_cluster is used to distribute the requests to one of the node in cluster(depending on each node's load, such as CPU load, memory usage, request numbers, etc.)

I guess you have gotten the idea now :-) So the endpoint address used in your web service should not be one of the AS7 host's ip address. It should be http://<your_httpd_listening_address>:8000 (Because you said your httpd is listening on port 8000).

In my example I've put httpd on the same machine with one of the AS7 host, so the IP address sames like the same with master AS7 ip address. This may create some confusions :-) It could be more clear if I use three machines to show the demo then you could see the httpd IP address is standalone.

Actually we don't have to use mod_cluster to do the request distribution, we could use LVS, or even hardware devices. But with mod_cluster we could get some nice features out of box such as nodes auto-discovery, recovered host auto registering back, etc. Because both mod_cluster and AS7 are developed by JBoss dev team and they are designed to be integrated with each other nicely :-)

So let's go back to your httpd config, you should set it to listen to a public ip address instead of 127.0.0.1, and you could access your cluster by http://<your_httpd_listening_address>:<your_httpd_listening_port>

Hope these could help.

Permalink

Hi Weinan

I am sorry to say but I still cannot get anything into the cluster (but I can send client transactions to both master and slave on port 8082 as defined in domain.xml on the master. The slave does not have a domain.xml as per instruction. It reads domain.xml from the server using port 9999).

I have installed httpd on a third machine now.

The warning below is something I never got before:

[Thu Mar 01 19:52:04 2012] [notice] Child 3464: Child process is running

[Thu Mar 01 19:52:04 2012] [notice] Child 3464: Acquired the start mutex.

[Thu Mar 01 19:52:04 2012] [notice] Child 3464: Starting 64 worker threads.

[Thu Mar 01 19:52:04 2012] [notice] Child 3464: Starting thread to listen on port 6666.

[Thu Mar 01 19:52:04 2012] [notice] Child 3464: Starting thread to listen on port 8000.

[Thu Mar 01 19:52:09 2012] [warn] manager_handler STATUS error: MEM: Can't read node

That looks a lot like the good old node under mod_jk load balancing.

Does this mean anything to you ?

I listen on port 8000, this is the first time that httpd tries to access the cluster, before I always went straight to DocumentRoot.

My end point is a web service under JBoss 7 AS

Thanks and best regards

Johan

Permalink

The above warning only came out once.

Now I am back to good old "no end point found".

This is from the Apache httpd log

192.168.2.2 - - [01/Mar/2012:20:07:04 +0700] "POST /beans/XMLTranServiceBean/XMLTranServiceBean HTTP/1.1" 404 1088

192.168.2.4 - - [01/Mar/2012:20:07:10 +0700] "STATUS / HTTP/1.1" 200 85

192.168.2.3 - - [01/Mar/2012:20:07:12 +0700] "STATUS / HTTP/1.1" 200 85

192.168.2.4 - - [01/Mar/2012:20:07:20 +0700] "STATUS / HTTP/1.1" 200 85

192.168.2.3 - - [01/Mar/2012:20:07:22 +0700] "STATUS / HTTP/1.1" 200 85

192.168.2.4 - - [01/Mar/2012:20:07:30 +0700] "STATUS / HTTP/1.1" 200 85

192.168.2.3 - - [01/Mar/2012:20:07:32 +0700] "STATUS / HTTP/1.1" 200 85

We are now working with 2 people on this, both are very experienced IT professionals.

We have a feeling that we are missing a small detail somewhere.

How does httpd know which port to use when it sends messages to JBoss 7 AS ?

Or is that automatically discovered ?

Permalink

I made some changes to the article, to simplify exactly what needs to be configured. Tomorrow I will make some more changes to keep things secure (exactly what needs to be changed on the firewall and selinux configs).

Permalink

Hi Weinan,

I am having similar issue faced by Gerhard Visagie.

Able to view "It Works" page when http://172.18.140.91:666 is specified. However when we say http://172.18.140.91/cluster-demo/put.jsp getting page not found error.

Following error is logged in AS7 :

"18:05:31,228 ERROR [org.jboss.modcluster.mcmp.impl.DefaultMCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [null: null:

Unknown macro: {4}

] sending command INFO to proxy mach.cmcltd.com/172.18.140.91:6666, configuration will be reset"

Following error is logged in Apache:

[Fri Mar 02 18:07:11 2012] [error] [client 172.18.140.91] Invalid method in request INFO / HTTP/1.1

We are using JBOSS AS 7.1.0 final, Apache 2.2.22 and mod_cluster 1.2.0

And the configuration in httpd.conf :

<VirtualHost 172.18.140.91:6666>

<Directory />

Order deny,allow

Deny from all

Allow from all

</Directory>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName other-server-group

AdvertiseFrequency 5

EnableMCPMReceive

</VirtualHost>

Permalink

The question is: how does httpd know what goes to DocumentRoot and what goes to the JBoss cluster.

This (I could be wrong) needs some filter mechanism, something has to be fished out of the URL.

As I asked before:

-----------------------------------------

To put it simply, I am looking for the mod_cluster equivalent of the mod_jk config file workers.properties

It had this directive inside: /STARXMLTranServiceBean/STAR=loadbalancer (STAR = * which seems to be meaningful with this editor)

That fished out my front end transactions in httpd before, any URL with the above strings inside would go to JBoss 4 via Tomcat 8009

How does that work with mod_cluster ?

------------------------------------------

In my view nothing can be intelligent enough to decide what goes where.

httpd may be serving many web sites, subversion interfave, php interface etc

Permalink

I don't hear much.

Either everybody is up and running with mod_cluster load balancing or ...

Anyway, I just try things:

I changed domain.xml (the XMLTranServiceBean is in the URL that I send to the webservice):

<subsystem xmlns="urn:jboss:domain:webservices:1.1">

<modify-wsdl-address>true</modify-wsdl-address>

<wsdl-host>$

Unknown macro: {jboss.bind.address}

</wsdl-host>

<endpoint-config name="Standard-Endpoint-Config"/>

<endpoint-config name="Recording-Endpoint-Config">

<pre-handler-chain name="recording-handlers" protocol-bindings="/XMLTranServiceBean/">

<handler name="RecordingHandler" />

</pre-handler-chain>

</endpoint-config>

</subsystem>

This gave me the following error in the Apache httpd error log:

[Sat Mar 03 12:13:30 2012] [error] [client 192.168.2.2] (OS 10054)An existing connection was forcibly closed by the remote host. : proxy: error reading status line from remote server 192.168.2.4:8332

[Sat Mar 03 12:13:30 2012] [error] [client 192.168.2.2] proxy: Error reading from remote server returned by /beans/XMLTranServiceBean/XMLTranServiceBean

And I see the following in the server-three-slave log:

20:28:04,243 WARNING [org.jgroups.protocols.UDP] (OOB-20,null) null: no physical address for 2864c345-49ad-670b-dc4a-083fd7156c5a, dropping message

20:28:18,037 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-4) Pausing Coyote HTTP/1.1 on http--192.168.2.4-8332

20:28:18,049 INFO [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-4) Stopping Coyote HTTP/1.1 on http--192.168.2.4-8332

20:28:18,335 INFO [org.jboss.as.osgi] (MSC service thread 1-4) JBAS011942: Stopping OSGi Framework

20:28:21,222 INFO [org.jboss.as.deployment.connector] (MSC service thread 1-3) JBAS010410: Unbound JCA ConnectionFactory [java:/JmsXA]

20:28:20,479 INFO [org.jboss.modcluster.ModClusterService] (MSC service thread 1-2) All active sessions drained from context [/wssimple] in 0 seconds

20:28:25,082 INFO [org.jboss.as.webservices] (MSC service thread 1-3) JBAS015540: Stopping service jboss.ws.port-component-link

20:28:29,103 ERROR [org.apache.catalina.core.ContainerBase] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Exception invoking periodic operation: : java.lang.IllegalStateException

at org.jboss.modcluster.container.catalina.CatalinaEngine.getProxyConnector(CatalinaEngine.java:153)

at org.jboss.modcluster.ModClusterService.status(ModClusterService.java:464)

at org.jboss.modcluster.container.catalina.CatalinaEventHandlerAdapter.lifecycleEvent(CatalinaEventHandlerAdapter.java:239)

at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:115) [jbossweb-7.0.10.Final.jar:]

at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1337) [jbossweb-7.0.10.Final.jar:]

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601) [jbossweb-7.0.10.Final.jar:]

at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590) [jbossweb-7.0.10.Final.jar:]

at java.lang.Thread.run(Thread.java:636) [rt.jar:1.6.0_20]

So there is a pass through mechanism, same as in mod_jk.

No software can be so intelligent that it can decide what goes where, that is for sure.

And Apache httpd can do a lot of things at once.

I only get this error on the slave and I only get it once, I have to restart the slave server to reproduce the error.

Who knows what the correct parameters are ?

Thanks

Johan

Permalink

I'm not so familiar with the WebServices configuration in domain.xml (I generally use JAX-RS which has configured out-of-box by AS7), that may need some extra configurations for it to work in cluster environment.

Permalink

Hi Shyam,

Similar with what I've replied to Gerhard, sounds like your 'other-server-group' in AS7 is not started. Please login into AS7 management console and ensure 'other-server-group' is running.

In addition, the 6666 port is the management port of mod_cluster. If you've seen 'it works', then there's something wrong. You can try to add following config into virtual-host:

After restarting the HTTP server, try to access 6666 port:

You should see the management console of mod_cluster:

Permalink

Hi [Weinan Li||\||]

Now i have tried clustering for standalone application with AS7 and Apache 2.2. First i

will explain what i did.

First i run the standalone server on ip:192.168.111.19:8231

And following is the changes what i did in httpd.conf file

Now following is the code which i changed in httpd-vhosts.conf file

Now when i start the server i cant get the advertise message and i cant get my application

from following i.p:192.168.111.19/Demo/test.jsp. When i checked through :list-proxies command

in jboss-cli.bat file then it shows no proxy. Then i add the proxy through the following command

Proxy was added successfully. Then i can get the application from

192.168.111.19/Demo/test.jsp. Now when i monitor the mod-cluster-manager in my browser

then i got the following screen.

So following are the problems:

I cant get specific node name. So how can i get?

Now in jboss-cli.bat file if i tried for :read-proxies-configuration command i get

following output:

So here i cant get JVMRoute specifically. So what should i do?

And i cant get specific clustering.

And can you say me how clustering and load balancing is done in standalone mode.

Thanks in advance

Permalink

We have put almost 3 weeks into getting the new load balancing working with JBoss AS 7 and mod_cluster. We = two very experienced professional IT people with a shared experience spannbsp&of around 60 years.

I am very grateful to the community members who have put lots of effort into the new JBoss clustering.

These are my observations:

1) Setting up clustering under Unix / Linux is a breeze. I set it up under 30 minutes on Mac OS X yesterday (that made me very happy, amazing software). I also had two instances running under Centos 6.

2) Setting up the same, using the same domain.xml and host.xml files from Unix/Linux, under Windows 7 is very cumbersome. Despite all our efforts we could not make it work

3) mod_jk load balancing works using a httpd instance and 2 (or more) JBoss standalone (not domain) instances

4) We cannot get anything into the cluster using mod_cluster via httpd. We can send transactions to all cluster instances but we cannot send anything to the actual cluster. And for intelligent load balancing we have to be able to send transactions to the cluster, not to cluster members. Otherwise you get the same inflexible load balancing as under mod_jk where you have to guess how busy a server is going to be.

Permalink

I can get to the point where I can see the mod_cluster-manager, but I can't access my deployed app via Apache, only directly via JBoss Web. I think there is some subsystem configuration or something that is missing, that tells Apache where to look for the deployment in the AS server. I'll look into it and post back here when I find it.

Permalink

What a difference a day can make.

Today we managed to bring up a cluster under Windows 7 and we managed to get transactions into the cluster using port 8000.

I have Apache httpd running on a Windows XP box and 2 JBoss instances on a Linux server and an iMac.

Please see below for the httpd VirtualHost config (192.168.2.2 is the XP box, no need to make reference to any cluster members by IP address, that is automatic. Please note the URL used by ProxyPass (as per Jean Frederic's suggestion).

Having different logs per VirtualHost is also nice, it makes things more readable.

-------------------

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule slotmem_module modules/mod_slotmem.so

LoadModule advertise_module modules/mod_advertise.so

LoadModule manager_module modules/mod_manager.so

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

Listen 192.168.2.2:6666

ManagerBalancerName other-server-group

<VirtualHost 192.168.2.2:6666>

<Location />

Order deny,allow

Deny from all

Allow from all

</Location>

ErrorLog "logs/chatter_log"

LogLevel debug

KeepAliveTimeout 300

MaxKeepAliveRequests 0

#ServerAdvertise on http://127.0.0.1:6666

AdvertiseFrequency 30

#AdvertiseSecurityKey secret

#AdvertiseGroup 224.0.1.105:23364

EnableMCPMReceive

# <Location /mod_cluster_manager>

# SetHandler mod_cluster-manager

# Order deny,allow

# Deny from all

# Allow from all

# </Location>

</VirtualHost>

</IfModule>

NameVirtualHost 192.168.2.2:8000

<VirtualHost 192.168.2.2:8000>

ServerAdmin johanvermeij@gmail.com

ServerName 192.168.2.2

ErrorLog "logs/cluster_log"

LogLevel debug

# ServerAlias 192.168.1.10

ProxyPass '/beans/XMLTranServiceBean/XMLTranServiceBean' balancer://other-server-group stickysession=JSESSIONID|jsessionid nofailover=On

ProxyPassReverse / balancer://other-server-group

ProxyPreserveHost On

<Location />

Order deny,allow

Allow from All

</Location>

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from all

</Location>

</VirtualHost>

Permalink

Session replication doesn't seem to work for me. I followed the steps in this guide, but when I kill server three in master, the process also destroys the session that has been made. So when I run the get.jsp in slave, it shows that time is null (it didn't get any session).

Is there something else that I should configure?

Thanks!

Permalink

Can you write down what you do, step by step.

We do the following:

set auto-start for server-three to false in host.xml on master

run domain.sh in master

start server-three using admin console on port 9990

deploy the application through the console (deploy to ha only)

set auto-start for server-three-slave to false in host.xml on slave

remove or rename domain.sh in slave

run domain.sh in salve

start server-three-slave using admin console (this will trigger deployment to the slave)

see if you can access the http port on master and slave (as per http port defined in domain.xml)

see if you can access the cluster using httpd (port 8000 as per above example, up to you which port to use)

What do you do next ?

If you let me know I will simulate it and send you the results

Permalink

hi johan!

remove or rename domain.sh in slave, run domain.sh in salve.

Should be deleted or renamed domain.xml!And then perform the the slave Node of domain.bat, Do not error?Because domain.bat references the domain.conf.bat When you edit domian.conf.bat, you will find set JAVA_OPTS = the% JAVA_OPTS percent-Djboss.domain.default.config =, domain.xml-Djboss.host.default.the config = host.xml this line command.

Mar 09, 2012[Johan|../../../../../../../../../../display/~johanvermeij]!

Permalink

hi! how do you configure JBoss AS 7.1.1 for clustering? I did the same steps here, but I cannot even get cluster-demo to deploy to all nodes. Also, my httpd cannot detect the nodes.

Permalink

If you see a lot of infinispan errors (your deployment "hangs") do the following:

1) Download the latest infinispan libraries and put them in \jboss-as-7.1.0.Final\modules\org\infinispan

2) Locate in domain.xml:

<subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">

<cache-container name="hibernate" default-cache="local-query">

<local-cache name="entity">

<transaction mode="NON_XA"/>

<eviction strategy="LRU" max-entries="10000"/>

<expiration max-idle="100000"/>

</local-cache>

<local-cache name="local-query">

<transaction mode="NONE"/>

<eviction strategy="LRU" max-entries="10000"/>

<expiration max-idle="100000"/>

</local-cache>

<local-cache name="timestamps">

<transaction mode="NONE"/>

<eviction strategy="NONE"/>

</local-cache>

</cache-container>

</subsystem>

Change <eviction strategy="NONE"/> under "timestamps" to <eviction strategy="NONE" max-entries="0" />

That was the finishing touch for us, the cluster was established after we changed that.

Remember that only HA (High Availability) is clustered so only deploy to HA

As always, the problems are not big but tricky.

The max-entries one is crucial.

Permalink

thanks, i will try that! is it also required to add the AJP connector and socket-binding for ha-sockets in the domain.xml?

Permalink

We didn't use the AJP connector, HTTP only

I attach the master and slave config files (only domain.xml (master, shared with slave) and host.xml (master and slave) matter)

configuration_master_and_slave.rar

Permalink

hi. i get this error message when i don't use the AJP connector:

Proxy Error

The proxy server received an invalid response from an upstream server.

The proxy server could not handle the request GET /cluster-demo.

Reason: Error reading from remote server

Permalink

i'm still encountering a lot of errors when deploying large web applications in the cluster, i've been experiencing the following errors

over and over again:

1. JBAS010806: Caught exception closing input stream: java.io.IOException: Stream closed

2. ISPN000097: Error while processing 1PC PrepareCommand: org.infinispan.CacheException: java.lang.RuntimeException:

Failure to marshal argument(s)

3. org.infinispan.CacheException: Could not commit.

4. java.util.concurrent.ExecutionException: org.infinispan.CacheException: org.jgroups.TimeoutException:

timeout sending message to master:server-three/web

5. ISPN000172: Failed to prepare view CacheView

Permalink

This is an excellent how to guide for a starter like me on Jboss..

However I have a question from above howto..In Apache Config, May this has been answered.. But I haven;t understood.. Sorry guys am a starter on Jboss

I set a similar 2 node cluster but a small differenc ei I had setup apache on my two nodes.. so that I can do a Lload Blancing using Pound.

No my question is I followed instructions as it is from the doc. and went to do the same

I 'am listening on on 10001 in my apache config

http:<hostname>:10001/mod_cluster-manager works fine :)

http:<hostname>:10001/cluster-demo works fine

however if I go

http:<hostname>/cluster-demo doesn't work as it shows in the demo and screen shots

is there something am doing wrong ?

thi sis what am using my httpd.conf and

Listen 10.36.200.10:10001

MemManagerFile /apps/cache/httpd

<VirtualHost 10.36.200.10:10001>

<Directory />

Order deny,allow

Deny from none

#Allow from 10.36.

</Directory>

ServerAdvertise On

EnableMCPMReceive

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName mycluster

AdvertiseFrequency 5

</VirtualHost>

<Location /mod_cluster-manager>

Listen 10.36.200.16:10001

MemManagerFile /apps/cache/httpd

<VirtualHost 10.36.200.16 :10001>

<Directory />

Order deny,allow

Deny from none

</Directory>

EnableMCPMReceive

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName mycluster

AdvertiseFrequency 5

</VirtualHost>

<Location /mod_cluster-manager>

am I doing anything wrong ?

S

Permalink

These instructions work for jboss-as-7.1.0.Final "Thunder" but not for jboss-as-7.1.1.Final "Brontes". On 7.1.1, starting server-three fails with "jboss.binding.jacorb (missing) dependents" as in https://community.jboss.org/thread/197320

Permalink

Try using full-ha-sockets in other-server-group.

Permalink

Everything works fine, except the last step - http://<ip_address>cluster-demo/get.jsp :-( . I even read the above, and I saw few people having similar problems. I have checked that other-group server instance is up.

I was also able to access mod_cluster-manager.

Could you explain how does it know that it has to connect to JBoss ? probably I am missing something very basic here !

http://<your_ip_address>:<port>/mod_cluster-manager

http://<ip_address>cluster-demo/get.jsp

Permalink

Finally I got this working.

mod_cluster version - 1.2.0.FINAL

JBoss AS7.1.1 FINAL.

There were couple of changes I had to do in domain.xml.

1.) Had to add in web subsystem

Update :A known issue : https://issues.jboss.org/browse/JBPAPP-8451

2.) proxy-list="<ip address>:<portno.> " under <subsystem xmlns="urn:jboss:domain:modcluster:1.0"> in <mod-cluster-config advertise-socket="modcluster" proxy-list="IP:Port">

So I guess the change 2 is required because due to some reason JBoss does not seem to work out of the box. Looks like an issue there with 7.1.1.

Without (1) there were errors in JBoss AS7 server instances like - manager_handler CONFIG error: MEM: Old node still exist

Permalink

Hi

I have observed the following while trying to set up clustering in single pc on domain mode (no slave configuration). If you find some tweaking to these issues, please let me know.

A). to cluster to be correctly operate, socket group name of the

server group where the profile name=”full-ha”,must be in “full-ha-sockets”.The bare minimum requirement is “ha-sockets”though it doesn’t correctly operate the “failover” concept. (if one server is down it will stop responding to user requests and the other servers in the cluster will not serve the requests). Additionally server start with errors (dependency issues) as follows.

JBAS014775: New missing/unsatisfied dependencies:

service jboss.binding.jacorb (missing) dependents: [service jboss.jacorb.orb-service]

service jboss.binding.jacorb-ssl (missing) dependents: [service jboss.jacorb.orb-service]

service jboss.binding.messaging (missing) dependents: [service jboss.messaging.default]

service jboss.binding.messaging-throughput (missing) dependents: [service jboss.messaging.default]

B). To operate on “full-ha-sockets”,you cannot “auto-start” more than one server in the server group. If you do, it will create a deadlock situation.

ERROR [org.hornetq.core.protocol.core.impl.HornetQPacketHandler] (Old I/O server worker (parentId: 18599604, [id: 0x011bceb4, localhost/127.0.0.1:5695])) Failed to create session : HornetQException[errorCode=105 message=Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER]

at org.hornetq.core.security.impl.SecurityStoreImpl.authenticate(SecurityStoreImpl.java:126) [hornetq-core-2.2.13.Final.jar:]

at org.hornetq.core.server.impl.HornetQServerImpl.createSession(HornetQServerImpl.java:807) [hornetq-core-2.2.13.Final.jar:]

at org.hornetq.core.protocol.core.impl.HornetQPacketHandler.handleCreateSession(HornetQPacketHandler.java:187) [hornetq-core-2.2.13.Final.jar:]

at org.jboss.netty.util.internal.DeadLockProofWorker$1.run(DeadLockProofWorker.java:44) [netty-3.2.6.Final.jar:]

C) Even after you start the server and try to start other servers in the group through admin console, it will enter to deadlock state.

However difference between “full-ha-sockets”and “ha-sockets” configuration is “full-ha-sockets” configuration still operate and serve the user request in this situation. (Server which is auto started at boot, will continuously serve the request unless you stop this server, and keep other in the same server group).

Thanks

Suwath

Permalink

Hi:

Thanks for any help. At the point 2, what IP and Port should I put?

Permalink

Thank you very much Rang S. After almost 2 days for trying out various things, I came across your suggestions and it works for me now like a breeze. You have helped me a lot and saved my time.

Permalink

when i start server-three on master is working fine, but when i start server-three on 'slave' getting the following error

[Server:server-three] 07:13:38,903 ERROR [org.hornetq.core.protocol.core.impl.Ho

rnetQPacketHandler] (Old I/O server worker (parentId: 594465015, [id: 0x236ed0f7

, hostname/192.168.1.2:5695])) Failed to create session : HornetQException[er

rorCode=105 message=Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER

Please find the attached file which i have configured

Permalink

Try the below link...it has the solution and why this problem occurs.

https://community.jboss.org/thread/195452

Permalink

Thanks for your valuable response.. now i am getting

[Server:server-three] 20:53:05,768 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Can't read node:

Unknown macro: {4}

] sending command STATUS to proxy 192.16

8.1.2:6666, configuration will be reset

Permalink

Could you paste some more of the stack trace? are u running all of your servers in master and slave on the same machine ?

Permalink

Both are running in different machines but on same network. master at 192.168.1.2 and slave at 192.168.1.3. default gateway is

192.168.1.1., http server running at 192.168.1.2 (on master machine )

STACK TRACE:

[Server:server-three] 21:11:18,247 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Old node still exist:

Unknown macro: {4}

] sending command CONFIG to proxy DivyaArvind/1

92.168.1.2:6666, configuration will be reset

[Server:server-three] 21:11:38,268 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Can't read node:

] sending command STATUS to proxy DivyaArvind/192.16

8.1.2:6666, configuration will be reset

[Server:server-three] 21:11:48,278 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Old node still exist:

Unknown macro: {4}

] sending command CONFIG to proxy DivyaArvind/1

92.168.1.2:6666, configuration will be reset

[Server:server-three] 21:12:08,298 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Can't read node:

] sending command STATUS to proxy DivyaArvind/192.16

8.1.2:6666, configuration will be reset

[Server:server-three] 21:12:18,308 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Old node still exist:

Unknown macro: {4}

] sending command CONFIG to proxy DivyaArvind/1

92.168.1.2:6666, configuration will be reset

[Server:server-three] 21:12:38,329 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Can't read node:

] sending command STATUS to proxy DivyaArvind/192.16

8.1.2:6666, configuration will be reset

[Server:server-three] 21:12:48,340 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Old node still exist:

Unknown macro: {4}

] sending command CONFIG to proxy DivyaArvind/1

92.168.1.2:6666, configuration will be reset

*httpd.conf file:*

Listen 192.168.1.2:6666

<VirtualHost 192.168.1.2:6666>

<Location />

Order deny,allow

Allow from all

</Location>

# This directive allows you to view mod_cluster status at URL http://192.168.1.2:6666/mod_cluster-manager

<Location /mod_cluster-manager>

SetHandler mod_cluster-manager

Order deny,allow

Allow from 192.168.1.

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName other-server-group

AdvertiseFrequency 5

EnableMCPMReceive

</VirtualHost>

Permalink

I feel the port of server three is overlapping with a different server, can u try by giving a different offset in host.xml ?

Permalink

i changed the port but getting the same error. please find attached file which contains config details

Permalink

From your config files I see you have the following :-

1.) Master

server- one

server-two -> offset -150

server-three -> offset ->250

2.) Slave

server- one

server-two -> offset -150

server-three -> offset ->250

So are you starting 6 servers in total (3 in each machine ? ) ? To debug start each of the servers one after another (disable auto start =true in domain.xml host.xml of master and slave) and find out on start of which of the server causes this problem to be showing up in console continously?

Another simple test you can try if it is indeed caused by port - change offset for server two and server three in Master to 151 and 251 and in slave as 101 and 201 (or some odd numbers) (This is just a guess )

Permalink

I followed what you said. first i started server three of master (it went fine, no errors) but when i started server three of

slave, getting error continuously

[Server:server-three] 22:42:03,808 ERROR [org.jboss.modcluster.mcmp.impl.Default

MCMPHandler] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) Error [ME

M: MEM: Old node still exist:

Unknown macro: {4}

] sending command CONFIG to proxy DivyaArvind/1

92.168.1.2:6666, configuration will be reset

Even i tried changing port , but no use

Permalink

Ok, the ports are not the cause, this is an issue with AS7. To get this working you would need to add an instance id in web subsystem. you cannot hard-code this to master, instead you need to have:-

thanks now the error has gone.... but nothing display when i test the deployed demo on browser.

Please help me, Do i need to change/add anything on http server CONFIG?

I am able to access mod_cluster-manager.

Permalink

How are you testing it ? http://192.168.1.2:6666/cluster-demo ?

Permalink

finally i got everything ....

1) I made a call to put.jsp, it was directed to master machine and i stopped server three of

master. made a call to get.jsp and it was directed to slave machine. everything fine.

2) Brought back server three of master, now again i made a call to put.jsp and it was

failed 'service temporary unavailable'

3) the error on console when i brought back 'master'

[Server:server-three] 23:46:22,379 WARN [org.hornetq.core.cluster.impl.Di

scoveryGroupImpl] (hornetq-discovery-group-thread-dg-group1) There are more than

one servers on the network broadcasting the same node id. You will see this mes

sage exactly once (per node) if a node is restarted, in which case it can be saf

ely ignored. But if it is logged continuously it means you really do have more t

han one node on the same network active concurrently with the same node id. This

could occur if you have a backup node active at the same time as its live node.

nodeID=6498e4cb-8061-11e1-a0d6-24b6fd012f2a

4) Error logs in HTTP server:

[Sun Apr 08 23:46:59 2012] [error] proxy: CLUSTER: (balancer://other-server-group). All workers are in error state

Permalink

Point 3 is not an error if you get it only once (during restart). I dont' have an idea of why you get this issue.

Some points you may want to check :-

1.) Hope you have <distributable/> in your web.xml.

2.) Any errors when you brought up the master , server three (related to cache) , also any errors in slave - master three.

Dont have a setup, I'll check this example again and get back to you later.

Permalink

message from management console. i sent you an email please check it.

i was not able to attach a file here.

Thanks for your co-operation

Permalink

OK, so I decided to try using linux instead of windows XP. I used Virtualbox with two Ubuntu server installs. I used JBoss AS 7.1 and jdk 7.0.3. After configuration of the cluster I deploy the "cluster-demo.war". The deploy screen then gets stuck in "Please wait: Your request is being processed ...".

In the log I get this printout for master:

[Server:server-three] 10:02:53,654 INFO [org.jboss.as.server] (host-controller-connection-threads - 2) JBAS015870: Deploy of deployment "cluster-demo.war" was rolled back with failure message JBAS014750: Operation handler failed to complete

[Server:server-three] 10:02:53,664 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) JBAS010282: Stopped //default-host//cluster-demo cache from web container

[Server:server-three] 10:02:53,778 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000029: Passivating all entries to disk

[Server:server-three] 10:02:53,779 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000030: Passivated 0 entries in 0 milliseconds

[Server:server-three] 10:02:53,783 INFO [org.jboss.as.clustering.infinispan] (pool-14-thread-1) JBAS010282: Stopped repl cache from web container

[Server:server-three] 10:02:53,794 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment cluster-demo.war in 148ms

[Server:server-three] 10:02:53,998 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-12-thread-1) ISPN000082: Stopping the RpcDispatcher

[Server:server-three] 10:02:54,119 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (Incoming-7,null) ISPN000094: Received new cluster view: [master:server-three/web|2] [master:server-three/web]

[Host Controller] 10:02:54,129 ERROR [org.jboss.as.controller.management-operation] (HttpManagementService-threads - 1) JBAS014612: Operation ("composite") failed - address: ([]): java.lang.IllegalArgumentException

[Host Controller] at org.jboss.dmr.ModelValue.getChild(ModelValue.java:108) [jboss-dmr-1.1.1.Final.jar:1.1.1.Final]

[Host Controller] at org.jboss.dmr.ModelNode.get(ModelNode.java:798) [jboss-dmr-1.1.1.Final.jar:1.1.1.Final]

[Host Controller] at org.jboss.as.domain.controller.operations.coordination.DomainFinalResultHandler.collectHostFailures(DomainFinalResultHandler.java:158) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.controller.operations.coordination.DomainFinalResultHandler.execute(DomainFinalResultHandler.java:80) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.executeTwoPhaseOperation(OperationCoordinatorStepHandler.java:225) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.controller.operations.coordination.OperationCoordinatorStepHandler.execute(OperationCoordinatorStepHandler.java:118) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.controller.operations.coordination.PrepareStepHandler.execute(PrepareStepHandler.java:85) [jboss-as-host-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.executeStep(AbstractOperationContext.java:385) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.doCompleteStep(AbstractOperationContext.java:272) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.AbstractOperationContext.completeStep(AbstractOperationContext.java:200) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.ModelControllerImpl.execute(ModelControllerImpl.java:121) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelControllerImpl.java:309) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.controller.ModelControllerImpl$1.execute(ModelControllerImpl.java:299) [jboss-as-controller-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.http.server.DomainApiHandler.processRequest(DomainApiHandler.java:294) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.http.server.DomainApiHandler.doHandle(DomainApiHandler.java:201) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.http.server.DomainApiHandler.handle(DomainApiHandler.java:208) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.as.domain.http.server.security.SubjectAssociationHandler.handle(SubjectAssociationHandler.java:51) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)

[Host Controller] at org.jboss.sun.net.httpserver.AuthFilter.doFilter(AuthFilter.java:69)

[Host Controller] at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)

[Host Controller] at org.jboss.sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(ServerImpl.java:710)

[Host Controller] at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:78)

[Host Controller] at org.jboss.as.domain.http.server.RealmReadinessFilter.doFilter(RealmReadinessFilter.java:54) [jboss-as-domain-http-interface-7.1.1.Final.jar:7.1.1.Final]

[Host Controller] at org.jboss.com.sun.net.httpserver.Filter$Chain.doFilter(Filter.java:81)

[Host Controller] at org.jboss.sun.net.httpserver.ServerImpl$Exchange.run(ServerImpl.java:682)

[Host Controller] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

[Host Controller] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

[Host Controller] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

[Host Controller] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.0.0.GA.jar:2.0.0.GA]

[Host Controller]

On the slave I see this:

[Server:server-three-slave] 10:02:53,943 INFO [org.jboss.as.server] (host-controller-connection-threads - 1) JBAS015870: Deploy of deployment "cluster-demo.war" was rolled back with failure message JBAS014750: Operation handler failed to complete

[Server:server-three-slave] 10:02:53,957 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-1) ISPN000029: Passivating all entries to disk

[Server:server-three-slave] 10:02:53,958 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-1) ISPN000030: Passivated 0 entries in 0 milliseconds

[Server:server-three-slave] 10:02:53,963 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-1) JBAS010282: Stopped //default-host//cluster-demo cache from web container

[Server:server-three-slave] 10:02:54,031 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000029: Passivating all entries to disk

[Server:server-three-slave] 10:02:54,033 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000030: Passivated 1 entries in 1 milliseconds

[Server:server-three-slave] 10:02:54,045 INFO [org.jboss.as.clustering.infinispan] (pool-14-thread-1) JBAS010282: Stopped repl cache from web container

[Server:server-three-slave] 10:02:54,056 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment cluster-demo.war in 108ms

[Server:server-three-slave] 10:02:54,295 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-12-thread-1) ISPN000082: Stopping the RpcDispatcher

[Server:server-three-slave] 10:02:54,300 WARN [org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher] (Incoming-6,null) Problems unmarshalling remote command from byte buffer: org.infinispan.CacheException: Cache manager is either starting up and type (id=74) cannot be resolved (thread not interrupted)

[Server:server-three-slave] at org.infinispan.marshall.jboss.ExternalizerTable.readObject(ExternalizerTable.java:274) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:351)

[Server:server-three-slave] at org.jboss.marshalling.river.RiverUnmarshaller.doReadObject(RiverUnmarshaller.java:209)

[Server:server-three-slave] at org.jboss.marshalling.AbstractObjectInput.readObject(AbstractObjectInput.java:37) [jboss-marshalling-1.3.11.GA.jar:1.3.11.GA]

[Server:server-three-slave] at org.infinispan.marshall.jboss.AbstractJBossMarshaller.objectFromObjectStream(AbstractJBossMarshaller.java:148) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.infinispan.marshall.VersionAwareMarshaller.objectFromByteBuffer(VersionAwareMarshaller.java:110) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.infinispan.marshall.AbstractDelegatingMarshaller.objectFromByteBuffer(AbstractDelegatingMarshaller.java:84) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.infinispan.remoting.transport.jgroups.MarshallerAdapter.objectFromBuffer(MarshallerAdapter.java:50) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.infinispan.remoting.transport.jgroups.CommandAwareRpcDispatcher.handle(CommandAwareRpcDispatcher.java:196) [infinispan-core-5.1.2.FINAL.jar:5.1.2.FINAL]

[Server:server-three-slave] at org.jgroups.blocks.RequestCorrelator.handleRequest(RequestCorrelator.java:456) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.blocks.RequestCorrelator.receiveMessage(RequestCorrelator.java:363) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.blocks.RequestCorrelator.receive(RequestCorrelator.java:238) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.blocks.MessageDispatcher$ProtocolAdapter.up(MessageDispatcher.java:543) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jboss.as.clustering.jgroups.ClassLoaderAwareUpHandler.up(ClassLoaderAwareUpHandler.java:56) [jboss-as-clustering-jgroups-7.1.1.Final.jar:7.1.1.Final]

[Server:server-three-slave] at org.jgroups.blocks.mux.MuxUpHandler.up(MuxUpHandler.java:130) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jboss.as.clustering.jgroups.MuxChannel$ClassLoaderAwareMuxUpHandler.up(MuxChannel.java:64) [jboss-as-clustering-jgroups-7.1.1.Final.jar:7.1.1.Final]

[Server:server-three-slave] at org.jgroups.JChannel.up(JChannel.java:716) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.stack.ProtocolStack.up(ProtocolStack.java:1026) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.FRAG2.up(FRAG2.java:181) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.FlowControl.up(FlowControl.java:418) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.FlowControl.up(FlowControl.java:400) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.pbcast.GMS.up(GMS.java:881) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.pbcast.STABLE.up(STABLE.java:244) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.UNICAST2.handleDataReceived(UNICAST2.java:793) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.UNICAST2.up(UNICAST2.java:365) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.pbcast.NAKACK.up(NAKACK.java:595) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.BARRIER.up(BARRIER.java:102) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.VERIFY_SUSPECT.up(VERIFY_SUSPECT.java:140) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.FD.up(FD.java:273) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.FD_SOCK.up(FD_SOCK.java:282) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.MERGE2.up(MERGE2.java:205) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.Discovery.up(Discovery.java:355) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.stack.Protocol.up(Protocol.java:358) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.TP.passMessageUp(TP.java:1174) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.TP$IncomingPacket.handleMyMessage(TP.java:1722) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at org.jgroups.protocols.TP$IncomingPacket.run(TP.java:1704) [jgroups-3.0.6.Final.jar:3.0.6.Final]

[Server:server-three-slave] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_03]

[Server:server-three-slave] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_03]

[Server:server-three-slave] at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_03]

[Server:server-three-slave]

Any ideas On what im doing wrong?

Permalink

I noticed in the top right hand corner at "Messages" there was an "Unknown Error" When I clocked it, this is what I saw:

"

Unknown error Unexpected HTTP response: 500

Request

{

    "operation" => "composite",

    "address" => [],

    "steps" => [

Unknown macro: { "address" => [ ("server-group" => "other-server-group"), ("deployment" => "cluster-demo.war") ], "operation" => "add" }

    ,

Unknown macro: { "address" => [ ("server-group" => "other-server-group"), ("deployment" => "cluster-demo.war") ], "operation" => "deploy" }

    ]

}

Response

Internal Server Error

{

    "outcome" => "failed",

    "result" => {

    "step-1" =>

    Unknown macro: { "outcome" => "failed", "rolled-back" => true }

    ,

    "step-2" =>

    },

    "failure-description" => "JBAS014654: Composite operation was rolled back",

    "rolled-back" => true

}

"

Permalink

I'm also facing the same problem, not being able to deploy to cluster-demo.war, ending with the same stacktrace in the log.

Permalink

Hi

I try create HA cluster, as described in thi aricle and as described in this comment

https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto#comment-22872548

But HA not work: I put date on master (i see from log) stop server on master, on slave "The time is null "

Session not replicated.

In logs I see"JBAS010206: Number of cluster members: 1"

What I do wrong?

config files and logs I post there: https://gist.github.com/2419905

Permalink

Hi

I downloaded ver 7.1.1 and followed the instructions to create a master-slave set of servers. I am successfully able to remotely start a slave server, but I am unable to deploy the cluster-demo.war.

The sequence I follow is as detailed in the guide;

I start the master server-three

I start the slave server-three

I upload the cluster-demo.war

I attempt to deploy to the cluster group

There are no overt errors on the slave (and master) console when I start the default servers, but I do see the following on starting server-three:

[Server:server-three] JBAS014775: New missing/unsatisfied dependencies:

[Server:server-three] service jboss.binding.jacorb (missing) dependents: [service jboss.jacorb.orb-service]

[Server:server-three] service jboss.binding.jacorb-ssl (missing) dependents: [service jboss.jacorb.orb-service]

[Server:server-three] service jboss.binding.messaging (missing) dependents: [service jboss.messaging.default]

[Server:server-three] service jboss.binding.messaging-throughput (missing) dependents: [service jboss.messaging.default]

[Server:server-three]

[Server:server-three] 17:25:20,392 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 5684ms - Started 146 of 280 services (12 services failed or missing dependencies, 121 services are passive or on-demand)

[Server:server-three] 17:25:20,387 INFO [org.jboss.as.controller] (Controller Boot Thread) JBAS014774: Service status report

[Server:server-three] JBAS014775: New missing/unsatisfied dependencies:

[Server:server-three] service jboss.binding.jacorb (missing) dependents: [service jboss.jacorb.orb-service]

[Server:server-three] service jboss.binding.jacorb-ssl (missing) dependents: [service jboss.jacorb.orb-service]

[Server:server-three] service jboss.binding.messaging (missing) dependents: [service jboss.messaging.default]

[Server:server-three] service jboss.binding.messaging-throughput (missing) dependents: [service jboss.messaging.default]

[Server:server-three]

[Server:server-three] 17:25:20,392 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 5684ms - Started 146 of 280 services (12 services failed or missing dependencies, 121 services are passive or on-demand)

The remote deployment hangs and terminates with a 500 error in the master log. The slave console shows the following messages:

[Server:server-three] 16:33:08,859 INFO [stdout] (pool-13-thread-1)

[Server:server-three] 16:33:08,860 INFO [stdout] (pool-13-thread-1) -------------------------------------------------------------------

[Server:server-three] 16:33:08,861 INFO [stdout] (pool-13-thread-1) GMS: address=slaveport:server-three/web, cluster=web, physical address=10.16.221.102:55450

[Server:server-three] 16:33:08,861 INFO [stdout] (pool-13-thread-1) -------------------------------------------------------------------

[Server:server-three] 16:33:11,133 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-2) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,135 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,190 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-14-thread-1) ISPN000078: Starting JGroups Channel

[Server:server-three] 16:33:11,195 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-14-thread-1) ISPN000094: Received new cluster view: [slaveport:server-three/web|0] [slaveport:server-three/web]

[Server:server-three] 16:33:11,196 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-14-thread-1) ISPN000079: Cache local address is slaveport:server-three/web, physical addresses are [10.16.221.102:55450]

[Server:server-three] 16:33:11,201 INFO [org.infinispan.factories.GlobalComponentRegistry] (pool-14-thread-1) ISPN000128: Infinispan version: Infinispan 'Brahma' 5.1.2.FINAL

[Server:server-three] 16:33:11,201 INFO [org.infinispan.config.ConfigurationValidatingVisitor] (pool-14-thread-1) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,302 INFO [org.infinispan.jmx.CacheJmxRegistration] (pool-14-thread-1) ISPN000031: MBeans were successfully registered to the platform mbean server.

[Server:server-three] 16:33:11,314 INFO [org.jboss.as.clustering.infinispan] (pool-14-thread-1) JBAS010281: Started repl cache from web container

[Server:server-three] 16:33:11,323 INFO [org.jboss.as.clustering.impl.CoreGroupCommunicationService.web] (MSC service thread 1-4) JBAS010206: Number of cluster members: 1

[Server:server-three] 16:33:11,368 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,388 INFO [org.infinispan.config.ConfigurationValidatingVisitor] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,410 INFO [org.infinispan.jmx.CacheJmxRegistration] (MSC service thread 1-3) ISPN000031: MBeans were successfully registered to the platform mbean server.

[Server:server-three] 16:33:11,412 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-3) JBAS010281: Started //default-host//cluster-demo cache from web container

[Server:server-three] 16:33:11,427 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,429 INFO [org.infinispan.configuration.cache.EvictionConfigurationBuilder] (MSC service thread 1-3) ISPN000152: Passivation configured without an eviction policy being selected. Only manually evicted entities will be pasivated.

[Server:server-three] 16:33:11,541 INFO [org.jboss.web] (MSC service thread 1-3) JBAS018210: Registering web context: /cluster-demo

[Server:server-three] 16:33:11,748 INFO [org.jboss.as.server] (host-controller-connection-threads - 1) JBAS015870: Deploy of deployment "cluster-demo.war" was rolled back with failure message JBAS014750: Operation handler failed to complete

[Server:server-three] 16:33:11,768 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-2) ISPN000029: Passivating all entries to disk

[Server:server-three] 16:33:11,769 INFO [org.infinispan.eviction.PassivationManagerImpl] (MSC service thread 1-2) ISPN000030: Passivated 0 entries in 1 milliseconds

[Server:server-three] 16:33:11,772 INFO [org.jboss.as.clustering.infinispan] (MSC service thread 1-2) JBAS010282: Stopped //default-host//cluster-demo cache from web container

[Server:server-three] 16:33:11,802 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000029: Passivating all entries to disk

[Server:server-three] 16:33:11,803 INFO [org.infinispan.eviction.PassivationManagerImpl] (pool-14-thread-1) ISPN000030: Passivated 0 entries in 0 milliseconds

[Server:server-three] 16:33:11,806 INFO [org.jboss.as.clustering.infinispan] (pool-14-thread-1) JBAS010282: Stopped repl cache from web container

[Server:server-three] 16:33:11,831 INFO [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment cluster-demo.war in 81ms

[Server:server-three] 16:33:11,935 INFO [org.infinispan.remoting.transport.jgroups.JGroupsTransport] (pool-12-thread-1) ISPN000082: Stopping the RpcDispatcher

I'm running this on os X (Lion) and java version "1.6.0_31"

Java(TM) SE Runtime Environment (build 1.6.0_31-b04-415-11M3635)

Java HotSpot(TM) 64-Bit Server VM (build 20.6-b01-415, mixed mode)

Any help will be greatly appreciated.

David.

Permalink

Try using full-ha-sockets in other-server-group, ? Have a look at this thread if you encounter a different error after trying this ...

https://community.jboss.org/message/727190#727190

Permalink

Thank you that fixed the problem.

The issue I run into now relates to configuring httpd - I am attempting to include the cluster modules into the bundled apache 2.2 installation on a Mac (Lion).

I get the following error:

sudo apachectl -k restart

httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_slotmem.so into server: dlopen(/usr/libexec/apache2/mod_slotmem.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_slotmem.so: mach-o, but wrong architecture

sudo apachectl -k restart

httpd: Syntax error on line 116 of /private/etc/apache2/httpd.conf: Cannot load /usr/libexec/apache2/mod_slotmem.so into server: dlopen(/usr/libexec/apache2/mod_slotmem.so, 10): no suitable image found. Did find:\n\t/usr/libexec/apache2/mod_slotmem.so: mach-o, but wrong architecture

Anybody have any success with this, or should I just go ahead and try the httpd bundle from jboss directly?

Thanks.

Permalink

I have progressed to the point where everything but clustering seems to be working.

I have a master and a slave.

I installed the httpd binary from jboss and configured it according to the instructions given in the main document.

I am able to see the mod_cluster_manager page (but none of the links show anything).

I can invoke the put.jsp method in cluster-demo when I go directly to port 8330, but I get an page not found error when I try navigate using port number 10001.

The relevant portion of my httpd.conf file is below. The error log show

File does not exist: /opt/jboss/httpd/htdocs/htdocs/cluster-demo

As usual, any help will be greatly appreciated!

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

# This Listen port is for the mod_cluster-manager, where you can see the status of mod_cluster.

# Port 10001 is not a reserved port, so this prevents problems with SELinux.

Listen 172.16.129.148:10001 <VirtualHost 172.16.129.148:10001>

<Directory />

Order deny,allow

Deny from all

Allow from all

</Directory> # This directive allows you to view mod_cluster status at URL http://10.211.55.4:10001/mod_cluster-manager

<Location /mod_cluster-manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from all

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName other-server-group

AdvertiseFrequency 5

EnableMCPMReceive

</VirtualHost>

</IfModule>

Permalink

Hi,

if mod_cluster-manager only shows a heading like "mod_cluster/1.2.0.Final" and some links (showing nothing like you say) your nodes have not been registered on the apache-side of mod_cluster. This would also explain that you get a 404 when you try to access the cluster-demo through mod_cluster (port 10001) but it works if you go directly on a JBoss instance.

I had this problem by myself and it stinks like JBPAPP-7516 because it works fine with the latest EAP6 beta and the JBoss AS7.1.2 (you can get a nightly build here).

Also watch your JBoss for any error-messages on the terminal. Sometimes the error-messages are hard to see between all the other messages.

Maybe you should give the latest working nightly-build a try, But be warned, just copying your actual configuration files to the new JBoss installation won't work, because the JBoss makes changes to these files during deployment.

Greetings from Berlin!

Permalink

Immanuel,

Thanks for the prompt response. I agree with your conclusion that the cluster is not being registered on the Apache side as this explains all I see. There are no errors in my JBoss console and I will try the nightly build next. I don't understand your point about configuration files though - why will JBoss overwrite my config files (domain.xml and host.xml) or did I misunderstand you?

I think we will probably end up running a number of JBoss instances behind a hardware balancer so httpd may be moot, but I still need to prove this works in our dev environment.

Danke for your help

David.

Permalink

Hi,

the point with the configuration files (I think it was just the host.xml) is that if you deploy something into the JBoss it will write that (with some hash-values and so on) into the host.xml so the deployment is not lost after a restart of the JBoss. Maybe this behaviour does only occur when you deploy over the management-console. But after trying different JBoss 7 versions (including 7.1.0 which refuses to deploy SFSBs annotated with @Clustered) I ran into this problem a couple of times. Just copying the configuration files won't work: The JBoss you copied your configuration to doesn't find the deployments of the old JBoss you copied from and maybe some more issues.

I don't think it's the most efficient way but to solve the issue, but I alway ended up setting up a fresh configuration (so I'm quite fit in setting up the cluster described in this howto ). After all this issue isn't really a big deal. I just wanted give a little hint if you run into a problem that looks like this.

Greetings from Berlin!

Permalink

Hi

Thanks for your help, you saved me a lot of head-banging!

I finally got everything to work with one caveat and one small issue.

First the caveat: it seems all nodes in a cluster need to run the same version of JBoss 7.

Second: I was unable to suppress this message:

[Server:server-three] 13:36:29,732 WARN [org.hornetq.core.cluster.impl.DiscoveryGroupImpl] (hornetq-discovery-group-thread-dg-group1) There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=5b2e186c-9af8-11e1-9675-e3f2a1f44414[Server:server-three] 13:36:29,732 WARN [org.hornetq.core.cluster.impl.DiscoveryGroupImpl] (hornetq-discovery-group-thread-dg-group1) There are more than one servers on the network broadcasting the same node id. You will see this message exactly once (per node) if a node is restarted, in which case it can be safely ignored. But if it is logged continuously it means you really do have more than one node on the same network active concurrently with the same node id. This could occur if you have a backup node active at the same time as its live node. nodeID=5b2e186c-9af8-11e1-9675-e3f2a1f44414

Again, any suggestion about killing this would be great. I'm running on os X (Lion) so the comments about NFS don't really help me much.

Thanks David.

Permalink

Hi David,

ok, maybe I'm a bit late but: Have you created the slave by copying the master? Then try to delete the contents of domain/data and/or domain/servers/yourserver/data . I by myself didn't experience this problem.

Permalink

Hi everybody,

I have a question: can I use the capabilities of AS7 clustering & HA configurations in order to use other protocols

than http? We need to use telnet (this is the application requirement)

Thank you

Permalink

I followed these directions and comments by others very carefully and I got everything working *except* for session replication. I tried adding the <cluster-user> and <cluster-password> as was suggested. I tried both 7.1.1-Final and yesterdays latest 7.1.x build (really 7.2.0 Alpha-1). I made the minimal changes required and everything else is stock settings.

Once the other-server-group (server three) begins running I start getting errors on both master/slave as others have reported.

As was suggested in a number of forums postings I tried adding cluster-password. It wasn't clear if you were supposed to add <cluster-name> and <cluster-password> to both master and slave so I added it to both but to no avail (still doesn't work).

There is NO jboss user named this but according to the directions there doesn't seem to need to be one. It's interesting that the exception says 'HORNETQ.CLUSTER.ADMIN.USER' even though I specified to use 'admin'

This is how I start both master and slave:

master:

$ sudo -u jboss bin/domain.sh -b 192.168.150.100 -bmanagement 192.168.150.100

slave:

$ sudo -u jboss bin/domain.sh -b 192.168.150.200 -bmanagement 192.168.150.200 -Djboss.domain.master.address=192.168.150.100 -Djboss.domain.master.port=9999

I disabled selinx and the firewall on both nodes. Everything else works great: deployments to nodes, mod_cluster but not replication. :(

Any ideas?

Thanks

Permalink

It should be a valid username and the right password.

Permalink

I should have been more clear but I already tried using a valid user from the ManagementRealm previously (added via add-user.sh) and that didn't help. Like I said based on the error message it doesn't appear like it was honoring the <cluster-user> tag since the exception referred to 'HORNETQ.CLUSTER.ADMIN.USER'

I also tried adding 'HORNETQ.CLUSTER.ADMIN.USER' as a valid user to the ManagementRealm and ran into the same problem.

Permalink

Could you confirm if you added the username and password in both master and slave ?

Permalink

Yes I added the same username/password to both master and slave.

Permalink

Is there anyway that we can encrypt this password?

Permalink

How to configure the clustering for standalone server. I tried with standalone-ha.xml configuration file with

two different ip address, but if i shutdown one node it will not redirect request to other node automatically.

Permalink

I have only one laptop, please let me know how I can setup Jboss AS7 clustering on single machine, I want to test some of my project stuff on clustered environment.

Thanks in Advance!

Raj

Permalink

Do u want to apply it in standalone server or domain server?

Permalink

I do not know the difference between standalone and domain, please explain.

Permalink

See in standalone server there is only one server running,either in one machine with two

different i.p or on two different machine with two different machine. And in domain server there

will be a group of server. So,if u deploy an application in one server it will be automatically

available on another servers. in domain server on one i.p address it will be running group of

servers with different port number.

Permalink

Got it.so as I have only one machine then I can only run in standalone mode, right?

Can you share me the steps to setup on one machine then please?

Permalink

No you can run domain configuration in one machine for that you have to just

change the port offset for different server. So, if you run one server on

127.0.0.1:8080,then you have to run other server on 127.0.0.1:8230 port or any

other. So you can run domain server on your laptop too. So you have to decide

as per your need. And even you can also run two standalone server on one

machine with either different i.p or different port. And i will share you the steps

very soon. Thanks

Permalink

Hello, Weinan.Li, I need help when I follow the steps in article: https://docs.jboss.org/author/display/AS71/AS7+Cluster+Howto

server-one and server-two can start up successfully on domain master,

but it failed to start server-three at : http://128.128.86.222:9990/console/App.html#server-instances

server-one and server-two log content is as bellow:

----------------

[Server:server-two] 10:59:46,003 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.CR1b "Flux Capacitor" started in 30718ms - Started 148 of 215 services (65 services are passive or on-demand)

[Server:server-one] 10:59:46,021 INFO [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.CR1b "Flux Capacitor" started in 31217ms - Started 148 of 215 services (65 services are passive or on-demand)

----------------

when I click "start" button at administration console page, the console log is like this:

----------------

[Host Controller] 11:04:37,394 INFO [org.jboss.as.host.controller] (HttpManagementService-threads - 6) JBAS010922: Starting server server-three

11:04:40,969 INFO [org.jboss.as.process.Server:server-three.status] (ProcessController-threads - 6) JBAS012017: Starting process 'Server:server-three'

[Server:server-three] 11:04:46,925 信息    [org.jboss.modules] (main) JBoss Modules version 1.1.0.CR6

 [Server:server-three] 11:04:50,392 INFO  [org.jboss.msc] (main) JBoss MSC version 1.0.1.GA

[Server:server-three] 11:04:50,567 INFO  [org.jboss.as] (MSC service thread 1-1) JBoss AS 7.1.0.CR1b "Flux Capacitor" starting

[Server:server-three] 11:04:52,017 INFO  [org.xnio] (MSC service thread 1-2) XNIO Version 3.0.0.CR7

[Server:server-three] 11:04:52,110 INFO  [org.xnio.nio] (MSC service thread 1-2) XNIO NIO Implementation Version 3.0.0.CR7

[Server:server-three] 11:04:52,232 INFO  [org.jboss.remoting] (MSC service thread 1-2) JBoss Remoting version 3.2.0.CR8

[Server:server-three] 11:05:00,410 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.host.controller.channel: org.jboss.msc.service.StartException in service jboss.host.controller.channel: java.net.ConnectException: JBAS012144: Could not connect to remote://128.128.86.222:9999. The connection timed out

[Server:server-three]     at org.jboss.as.server.mgmt.domain.HostControllerConnectionService.start(HostControllerConnectionService.java:101) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]

[Server:server-three]     at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

[Server:server-three]     at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]

[Server:server-three]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_12]

[Server:server-three]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_12]

[Server:server-three]     at java.lang.Thread.run(Thread.java:619) [:1.6.0_12]

[Server:server-three] Caused by: java.net.ConnectException: JBAS012144: Could not connect to remote://128.128.86.222:9999. The connection timed out

[Server:server-three]     at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:166) [jboss-as-protocol-7.1.0.CR1b.jar:7.1.0.CR1b]

[Server:server-three]     at org.jboss.as.protocol.ProtocolChannelClient.connectSync(ProtocolChannelClient.java:129) [jboss-as-protocol-7.1.0.CR1b.jar:7.1.0.CR1b]

[Server:server-three]     at org.jboss.as.server.mgmt.domain.HostControllerConnectionService.start(HostControllerConnectionService.java:98) [jboss-as-server-7.1.0.CR1b.jar:7.1.0.CR1b]

[Server:server-three]     ... 5 more

[Server:server-three]

[Server:server-three] 11:05:08,973 INFO  [org.jboss.as.logging] (MSC service thread 1-1) JBAS011502: Removing bootstrap log handlers

[Server:server-three] 11:05:09,046 INFO  [org.jboss.as.clustering] (ServerService Thread Pool -- 55) JBAS010360: Activating JGroups subsystem.

[Server:server-three] 11:05:09,099 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 48) JBAS011910: Activating OSGi Subsystem

[Server:server-three] 11:05:09,270 INFO  [org.jboss.as.clustering] (ServerService Thread Pool -- 60) JBAS010300: Activating Infinispan subsystem.

[Server:server-three] 11:05:09,537 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 49) JBAS011800: Activating Naming Subsystem

[Server:server-three] 11:05:12,976 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 63) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)

[Server:server-three] 11:05:12,978 INFO  [org.jboss.as.security] (MSC service thread 1-1) Picketbox version=4.0.6.Beta2

[Server:server-three] 11:05:13,618 INFO  [org.jboss.as.connector] (MSC service thread 1-2) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.6.Final)

[Server:server-three] 11:05:19,011 INFO  [org.jboss.as.naming] (MSC service thread 1-2) JBAS011802: Starting Naming Service

[Server:server-three] 11:05:19,651 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-1) JBoss Web Services - Stack CXF Server 4.0.0.GA

[Server:server-three] 11:05:21,271 INFO  [org.jboss.as.modcluster] (MSC service thread 1-1) JBAS011704: Mod_cluster uses default load balancer provider

[Server:server-three] 11:05:21,349 INFO  [org.jboss.as.remoting] (MSC service thread 1-2) Listening on /128.128.86.222:4697

[Server:server-three] 11:05:21,645 INFO  [org.jboss.modcluster.ModClusterService] (MSC service thread 1-1) Initializing mod_cluster 1.2.0.Beta2

[Server:server-three] 11:05:22,205 INFO  [org.jboss.modcluster.advertise.impl.AdvertiseListenerImpl] (MSC service thread 1-1) Listening to proxy advertisements on 224.0.1.105:23364

[Server:server-three] 11:05:22,726 INFO  [org.apache.coyote.http11.Http11AprProtocol] (MSC service thread 1-1) Starting Coyote HTTP/1.1 on http-128.128.86.222-128.128.86.222-8330

[Server:server-three] 11:05:22,919 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-1) JBAS015400: Bound mail session [java:jboss/mail/Default]

[Server:server-three] 11:05:26,128 INFO  [org.jboss.as.jacorb] (MSC service thread 1-1) CORBA ORB Service Started

[Server:server-three] 11:05:26,385 信息    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) live server is starting with configuration HornetQ Configuration (clustered=false,backup=false,sharedStore=true,journalDirectory=/usr/jboss-as-7.1.0.CR1b/domain/servers/server-three/data/messagingjournal,bindingsDirectory=/usr/jboss-as-7.1.0.CR1b/domain/servers/server-three/data/messagingbindings,largeMessagesDirectory=/usr/jboss-as-7.1.0.CR1b/domain/servers/server-three/data/messaginglargemessages,pagingDirectory=/usr/jboss-as-7.1.0.CR1b/domain/servers/server-three/data/messagingpaging)

[Server:server-three] 11:05:26,546 警告    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) Security risk! It has been detected that the cluster admin user and password have not been changed from the installation default. Please see the HornetQ user guide, cluster chapter, for instructions on how to do this.

 [Server:server-three] 11:05:27,646 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.3.Final-r$

Unknown macro: {buildNumber}

128.128.86.222:5695 for CORE protocol

[Server:server-three] 11:05:27,649 INFO [org.hornetq.core.remoting.impl.netty.NettyAcceptor] (MSC service thread 1-1) Started Netty Acceptor version 3.2.3.Final-r$

128.128.86.222:5705 for CORE protocol

[Server:server-three] 11:05:27,651 信息    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) Server is now live

[Server:server-three] 11:05:27,651 信息    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) HornetQ Server version 2.2.7.Final (HQ_2_2_7_FINAL_AS7, 121) [ff1f011e-d17b-11e1-b314-000c29eaa811] started

 [Server:server-three] 11:05:27,982 INFO  [org.jboss.as.jacorb] (MSC service thread 1-1) CORBA Naming Service Started

[Server:server-three] 11:05:28,024 WARN  [com.arjuna.ats.arjuna] (Transaction Expired Entry Monitor) ARJUNA012210: Unable to use InetAddress.getLocalHost() to resolve address.

[Server:server-three] 11:05:28,438 INFO  [org.jboss.as.messaging] (MSC service thread 1-1) JBAS011601: Bound messaging object to jndi name java:/ConnectionFactory

[Server:server-three] 11:05:28,441 信息    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-1) trying to deploy queue jms.topic.testTopic

 [Server:server-three] 11:05:29,034 INFO  [org.jboss.as.messaging] (MSC service thread 1-1) JBAS011601: Bound messaging object to jndi name java:/topic/test

[Server:server-three] 11:05:29,038 INFO  [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:/RemoteConnectionFactory

[Server:server-three] 11:05:29,039 信息    [org.hornetq.core.server.impl.HornetQServerImpl] (MSC service thread 1-2) trying to deploy queue jms.queue.testQueue

 [Server:server-three] 11:05:29,407 INFO [org.jboss.as.messaging] (MSC service thread 1-2) JBAS011601: Bound messaging object to jndi name java:/queue/test

[Server:server-three] 11:05:30,218 INFO [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010406: Registered connection factory java:/JmsXA

[Server:server-three] 11:05:30,275 INFO [org.hornetq.ra.HornetQResourceAdapter] (MSC service thread 1-2) HornetQ resource adaptor started

[Server:server-three] 11:05:30,276 INFO [org.jboss.as.connector.services.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-2) IJ020002: Deployed: file://RaActivatorhornetq-ra

[Server:server-three] 11:05:30,284 INFO [org.jboss.as.deployment.connector] (MSC service thread 1-2) JBAS010401: Bound JCA ConnectionFactory [java:/JmsXA]

[Server:server-three] 11:05:30,315 INFO [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-1) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]

[Server:server-three] 11:05:30,379 ERROR [org.jboss.as] (Controller Boot Thread) JBoss AS 7.1.0.CR1b "Flux Capacitor" started (with errors) in 46986ms - Started 146 of 254 services (2 services failed or missing dependencies, 101 services are passive or on-demand)

----------------

It seems that when I start process 'Server:server-three', it tried to connect to remote://128.128.86.222:9999, and then it caused "connection timed out".

Should I modify the "domain-controller" property in host.xml on domain master host?

P.s. domain master IP: 128.128.86.222; OS: CentOs 5.4; Memery Size: 256M; Run mode: linux text.

and my master host config file "host.xml":

----------------

<host name="master" xmlns="urn:jboss:domain:1.1">

<management>

<security-realms>

<security-realm name="ManagementRealm">

<authentication>

<properties path="mgmt-users.properties" relative-to="jboss.domain.config.dir"/>

</authentication>

</security-realm>

</security-realms>

<management-interfaces>

<native-interface security-realm="ManagementRealm">

<socket interface="management" port="$

Unknown macro: {jboss.management.native.port}

"/>

</native-interface>

<http-interface security-realm="ManagementRealm">

<socket interface="management" port="$

Unknown macro: {jboss.management.http.port}

"/>

</http-interface>

</management-interfaces>

</management>

<domain-controller>

<local />

<!- Alternative remote domain controller configuration with a host and port ->

<!-- <remote host="$

Unknown macro: {jboss.domain.master.address}

" port="$

Unknown macro: {jboss.domain.master.port}

"/> -->

</domain-controller>

<interfaces>

<interface name="management">

<inet-address value="128.128.86.222"/>

</interface>

<interface name="public">

<inet-address value="128.128.86.222"/>

</interface>

<interface name="unsecured">

<inet-address value="128.128.86.222"/>

</interface>

</interfaces>

<jvms>

<jvm name="default">

<heap size="64m" max-size="256m"/>

</jvm>

</jvms>

<servers>

<server name="server-one" group="main-server-group">

<!-- Remote JPDA debugging for a specific server

<jvm name="default">

<jvm-options>

<option value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"/>

</jvm-options>

</jvm>

-->

</server>

<server name="server-two" group="main-server-group" auto-start="true">

<!-- server-two avoids port conflicts by incrementing the ports in

the default socket-group declared in the server-group -->

<socket-bindings port-offset="150"/>

</server>

<server name="server-three" group="other-server-group" auto-start="false">

<!-- server-three avoids port conflicts by incrementing the ports in

the default socket-group declared in the server-group -->

<socket-bindings port-offset="250"/>

</server>

</servers>

</host>

Permalink

Hi,

I was able to setup till the last step but the request is not getting forwarded from Apache Http server to AS7 servers. Both my Apache Http Server and AS7 master are running on a Windows7 machine and the slave AS7 is running on Window 7 laptop. Both the main-server-group and other-server-group (full-ha) are up and running correctly. I am able to access the deployed app on port 8330. Also the Http server is up and running on port 80 so when I put my master ip address I get "It Works!" message. Also, able to access the mod_cluster_manager on port 8000 correctly. Not sure what I am missing currently as the logs are not pointing me to any errors that might be happening.

The current httpd.conf is as below:

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

Listen 172.20.201.24:10001

ManagerBalancerName other-server-group

<VirtualHost 172.20.201.24:10001>

<Location />

Order deny,allow

Allow from all

</Location>

ErrorLog "logs/chatter_log"

LogLevel debug

KeepAliveTimeout 300

MaxKeepAliveRequests 0

#ServerAdvertise on http://127.0.0.1:10001

AdvertiseFrequency 5

#AdvertiseSecurityKey secret

#AdvertiseGroup 224.0.1.105:23364

EnableMCPMReceive

#<Location /mod_cluster_manager>

# SetHandler mod_cluster-manager

# Order deny,allow

# Allow from all

#</Location>

</VirtualHost>

</IfModule>

NameVirtualHost 172.20.201.24:8000

Listen 172.20.201.24:8000

<VirtualHost 172.20.201.24:8000>

ServerAdmin sudeep.batra@synechron.com

ServerName 172.20.201.24

ErrorLog "logs/cluster_log"

LogLevel debug

EnableMCPMReceive

ProxyPass '/beans/XMLTranServiceBean/XMLTranServiceBean' balancer://other-server-group stickysession=JSESSIONID|jsessionid nofailover=On

ProxyPassReverse / balancer://other-server-group

ProxyPreserveHost On

<Location />

Order deny,allow

Allow from All

</Location>

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from all

</Location>

</VirtualHost>

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

Listen 172.20.201.24:10001

ManagerBalancerName other-server-group

<VirtualHost 172.20.201.24:10001>

<Location />

Order deny,allow

Allow from all

</Location>

ErrorLog "logs/chatter_log"

LogLevel debug

KeepAliveTimeout 300

MaxKeepAliveRequests 0

#ServerAdvertise on http://127.0.0.1:10001

AdvertiseFrequency 5

#AdvertiseSecurityKey secret

#AdvertiseGroup 224.0.1.105:23364

EnableMCPMReceive

#<Location /mod_cluster_manager>

# SetHandler mod_cluster-manager

# Order deny,allow

# Allow from all

#</Location>

</VirtualHost>

</IfModule>

NameVirtualHost 172.20.201.24:8000

Listen 172.20.201.24:8000

<VirtualHost 172.20.201.24:8000>

ServerAdmin sudeep.batra@synechron.com

ServerName 172.20.201.24

ErrorLog "logs/cluster_log"

LogLevel debug

EnableMCPMReceive

ProxyPass '/beans/XMLTranServiceBean/XMLTranServiceBean' balancer://other-server-group stickysession=JSESSIONID|jsessionid nofailover=On

ProxyPassReverse / balancer://other-server-group

ProxyPreserveHost On

<Location />

Order deny,allow

Allow from All

</Location>

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from all

</Location>

</VirtualHost>

Permalink

Try add 2 module below to httpd.conf

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.sod

Permalink

You cannot simply copy and expect things to work.

ProxyPass '/beans/XMLTranServiceBean/XMLTranServiceBean' balancer://other-server-group stickysession=JSESSIONID|jsessionid nofailover=On

means that anything that hits the virtual host with '/beans/XMLTranServiceBean/XMLTranServiceBean' as part of the URL is forwarded

to the balancer, everything else goes to the document root (or elsewhere is you have another ProxyPass).

This is useful if you have 2 kinds of functions processed by the virtual host.

If you just want to forward everything that is received use:

ProxyPass / balancer://other-server-group stickysession=JSESSIONID|jsessionid nofailover=On

When you see It Works your ProxyPass is not working, the It Works message comes from a index.html in the DocumentRoot

Permalink

Hi,

Can someone help me?

I try to install cluster in JBoss 7.1.1 with mod_cluster 1.2.0.

At final step, when i access to /cluster-demo/put.jsp then a message "putting date now" is sent to my master node, However when I stop master node, I try access to /cluster-demo/get.jsp and I see "The time is null".

It seem httpd can redirect request to other node, but without session.

This is my httpd.conf file:

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule slotmem_module modules/mod_slotmem.so

LoadModule manager_module modules/mod_manager.so

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule advertise_module modules/mod_advertise.so

LoadModule authz_host_module modules/mod_authz_host.so

Listen 192.168.72.101:8888

<VirtualHost 192.168.72.101:8888>

<Location />

Order deny,allow

Allow from all

</Location>

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Allow from all

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

AllowDisplay On

ManagerBalancerName cluster-server-group

ServerAdvertise On

EnableMCPMReceive

</VirtualHost>

I add already some workaround as:

instance-id

proxy-list="IP:Port"

Special one, If I don't add module authz_host_module, I can not start httpd. Httpd alway say that "Order" miss spelling ...

Permalink

Copy the example above (mine, also under Sudeep).

You need 2 virtual hosts, one for the mod_cluster manager and another to forward message to the cluster using ProxyPass.

See my comment above in reply to Sudeep as well.

Permalink

Please have a look at my discussion in the JBoss Community Forum under https://community.jboss.org/message/755981#755981

Any advise is much appreciated

Permalink

Nice article!! Only have one question. I want to install mod_cluster in slave host and forward user requests to the master host, is it possible?

This is because i have configured a load balancer with HAProxy as showed in this basic example http://www.leaseweblabs.com/2011/07/high-availability-load-balancing-using-haproxy-on-ubuntu-part-1/ so i have two nodes with apache http installed and each should redirect to any of JBoss instance or JBoss domain.

Any help will be appreciated.

Permalink

thanks for the post it relay helped me to understand standalone mode clustering of Jboss

I have done the above in windows xp using APACHE 2.2 and HTTPD 2.2 and Jboss AS 7.1.1.Final and it was successful with the application shown below,

</html>

The example stateful session bean is a CDI component associated to the HTTP session. The bean has a counter which is increased every time it is read by the getter-method getCounterValue(). With the counter you can track how often the bean was invoked during the session.

in the apche httpd.config i have done the following

But when i went on further and deployed my own application which uses ejb 3, richfaces and hibernate along with JSF. while we are running a single node jboss standalone cluster the application runs fine and smooth using apache httpd url ie http://127.0.0.1/WiseBank_CBS_v1/login.xhtml.

but when running more then one standalone jboss node of jboss, when ever i access the above url in jboss server node i see lots of error trace which i am unable to debug. attaching the jboss server log.

Can you plz suggest me an way out of this ...

thanks in advance

Permalink

I was following this guide successfully, up until I got to the point of adding datasources. Where are you supposed to add them, host.xml or domain.xml? I have not deployed any application yet, I am just trying to start the cluster. With the datasources (mysql) configured in domain.xml, the master starts up properly, but when I start the slave, it immediately connects to the database multiple times, eating up ALL of the available connections.

Permalink

I was following this guide failed,I used the jboss-as-7.1.1.Final、mod_cluster-1.1.3.Final-linux2-x64-so.tar.gz,

I deploy my own war“FileUpload.war”,While deployed on “main-server-group” successful, but on the “other-server-group” failed.

Can you help me to look for the wrong reasons? The following error:

Permalink

Killing the server by using system commands will have the effect that the Host-Controller restart the instance imediately!

This thing is not working for me... The respective request is not going to slave server3... it comes always to master server 1

Permalink

I have tested this module using Jboss AS 7.1.1 & mod_cluster1.2.0.Final.

#1

When you start up the nodes using the domain.bat scripts, always provide the bind ip and ports. If you don't then you seem to get some strange behaviours:

domain.sh-b 172.72.103.134 -bmanagement 172.72.103.134 (this is the master)

and

domain.sh-b 172.72.103.124 -bmanagement 172.72.103.124 (this is the slave)

#2

Server-2 does not start cleanly out of the box, due to a mismatch between the full-ha progile and the socket bindings. In domain.xml of the master, amend as follows:

<server-group profile="full-ha"> <jvm <heap size="64m" max-size="512m"/> </jvm> <socket-binding-group ref="full-ha-sockets"/> </server-group>

This will allow Server-2 to start cleanly.

#3

The hornetq-server needs configuring with a user name and password. If you don't you will get an exception along the lines of:

[Server:server-three] 16:24:36,875 ERROR [org.hornetq.core.protocol.core.impl.Ho rnetQPacketHandler] (Old I/O server worker (parentId: 2128830893, [id: 0x7ee361a d, /172.72.103.134:5695])) Failed to create session : HornetQException[errorCode=1 05 message=Unable to validate user: HORNETQ.CLUSTER.ADMIN.USER]

<subsystem xmlns="urn:jboss:domain:messaging:1.1"> <hornetq-server> <cluster-user>clusteruser</cluster-user> <cluster-password>clusterpassword</cluster-password>

It looks as though you can use any user and password. It doesn't appear to be authenticated against anything.. :)

#4

Assuming you have downloaded and installed mod_cluster 1,2.Final from here.

Out of the box, mod_cluster does't not work with jboss 7.1.1. A few tweaks are needed. Keeping things as simple as possible, I've stripped the provided httpd.conf down the bare minimum:

LoadModule authz_host_module modules/mod_authz_host.so LoadModule proxy_module modules/mod_proxy.so LoadModule proxy_ajp_module modules/mod_proxy_ajp.so LoadModule proxy_http_module modules/mod_proxy_http.so LoadModule proxy_cluster_module modules/mod_proxy_cluster.so LoadModule manager_module modules/mod_manager.so LoadModule slotmem_module modules/mod_slotmem.so LoadModule advertise_module modules/mod_advertise.so Listen 172.72.103.134:80 Listen 172.72.103.134:10001 <VirtualHost 172.72.103.134:10001> <Location /> Order deny,allow Deny from all Allow from 172.72.103. </Location> KeepAliveTimeout 300 MaxKeepAliveRequests 0 EnableMCPMReceive ManagerBalancerName other-server-group AdvertiseFrequency 5 <Location /mod_cluster_manager> SetHandler mod_cluster-manager Order deny,allow Deny from all Allow from 172.72.103. </Location> </VirtualHost> ErrorLog "logs/error_log"

I used port 10001 as the default port 6666 didn't work for me. This httpd.conf should be enough to get you going.

The domain.xml of master also needs updating to link it up with the mod_cluster instance:

<subsystem xmlns="urn:jboss:domain:modcluster:1.0"> <mod-cluster-config advertise-socket="modcluster" proxy-list="172.72.103.134:10001"> ... and <subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="$

Unknown macro: {jboss.node.name}

" native="false"> ...

Testing

To test everything is working, fire up the domain, deploy an application and start httpd (on windows 7 I needed to run it as administrator otherwise it complained about file permissions). Navigate to: http://172.72.103.134:10001/mod_cluster_manager. You should see:

mod_cluster/1.2.0.Final Auto Refresh show DUMP output show INFO output Node slave:server-three-slave (ajp://172.72.103.124:8259): Enable Contexts Disable Contexts Balancer: other-server-group,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 65,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100 Virtual Host 1: Contexts: /cluster-demo, Status: ENABLED Request: 0 Disable /PFT.CLEAR.Common.Services, Status: ENABLED Request: 0 Disable Aliases: localhost default-host example.com

I do not know why this error will be reported when the start apache, I have several files copied to the modules folder under.

#

# Example:

# LoadModule foo_module modules/mod_foo.so

#

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule slotmem_module modules/mod_slotmem.so

LoadModule manager_module modules/mod_manager.so

LoadModule advertise_module modules/mod_advertise.so

<IfModule manager_module>

Listen 192.168.0.2:10001

<VirtualHost 192.168.0.2:10001>

<Directory />

Order deny,allow

Deny from all

Allow from 192.168.0.

</Directory>

# This directive allows you to view mod_cluster status at URL http://192.168.0.2:10001/mod_cluster-manager

<Location /mod_cluster-manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from 192.168.0.

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName other-server-group

AdvertiseFrequency 5

</VirtualHost>

</IfModule>

Permalink

Hi Micheal,

Make sure you downloaded mod_cluster pack from http://www.jboss.org/mod_cluster site.

We suspect your version is not mod_cluster.

Regards,

Mani

Permalink

Hi Mani,

First, thank you reply.I was the latest apache2.4.4 downloaded from the official website of Apache version, then downloaded from the http://www.jboss.org/mod_cluster mod_cluster-1.2.0.Final-windows-x64-ssl.zip this version, mod_cluster1.2.0 after decompression mod_proxy_cluster.so copid to% APACHE_HOME% \ modules.Of course, there are three files are also copied to this directory.If I only use mod_cluster-1.2.0.Final-windows-x64-ssl.zip this version, I do not know how to start it in Windows.My operating system is Windows XP (32), I double-click http.exe and displays the error message "not a valid win32 application"

Permalink

Hi Michael,

Please follow the below steps:

1) download only mod_cluster-1.2.0.Final-windows-x64-ssl.zip, then unzip it to some folder. This folder has the same folder structure as in Apache 2.4.4, except the https.conf file. So,you don't need to download Apache 2.4.4 version. Only you need to modify the httpd.conf contents as I have shared above mail chain.

2) You will get the httpd.conf file inside the bin folder. If that file is not there then take the file from bin/default folder or create a httpd.conf file & paste the above contents.

I am sure it will work.

Please let me know, if you have any concern.

Thanks & Regards,

Jonbon Dash

Permalink

Hi JONBON,

Thank you very much!I follow your steps away from success is getting closer, but still encountered a problem.

master node: I can successfully access this URL&nbsp;http://192.168.3.185:10001/ClusterWebApp &nbsp;or this URL http://192.168.3.185:8330/ClusterWebApp

slave node: I can successfully access this URL http://192.168.3.153:8330/ClusterWebApp too.

Why I can not succeed through this URL http://192.168.3.185/ClusterWebApp access.

Configration:

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" instance-id="$

Unknown macro: {jboss.node.name}

" native="false">

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

<virtual-server name="default-host" enable-welcome-root="true">

<alias name="localhost"/>

<alias name="example.com"/>

</virtual-server>

</subsystem>

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" *instance-id="$

"* native="false">

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

<virtual-server name="default-host" enable-welcome-root="true">

<alias name="localhost"/>

<alias name="example.com"/>

</virtual-server>

</subsystem>

<subsystem xmlns="urn:jboss:domain:modcluster:1.0">

<mod-cluster-config advertise-socket="modcluster" proxy-list="192.168.3.185:10001">

<dynamic-load-provider>

<load-metric type="busyness"/>

</dynamic-load-provider>

</mod-cluster-config>

</subsystem>

Listen 192.168.3.185:10001

<VirtualHost 192.168.3.185:10001>

<Location />

Order deny,allow

Deny from all

Allow from 192.168.3.

</Location>

KeepAliveTimeout 300

MaxKeepAliveRequests 0

EnableMCPMReceive

ManagerBalancerName other-server-group

AdvertiseFrequency 5

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from 192.168.3.

</Location>

</VirtualHost>

ErrorLog "logs/error_log"

LoadModule authz_host_module modules/mod_authz_host.so

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule proxy_http_module modules/mod_proxy_http.so

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule manager_module modules/mod_manager.so

LoadModule slotmem_module modules/mod_slotmem.so

LoadModule advertise_module modules/mod_advertise.so

I can successfully access this URL http://192.168.3.185:10001/mod_cluster_manager?nonce=a49e863e-d639-f64e-b8dd-d1a06739d393&refresh=10

mod_cluster/1.2.0.Final

Auto Refresh show DUMP output show INFO output

Node master:server-three (ajp://ptiwh-clust.premiumit-cn.com:8259):

Enable Contexts Disable Contexts

Balancer: other-server-group,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 65,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100

Virtual Host 1:

Contexts:

/ClusterWebApp, Status: ENABLED Request: 0 Disable

Aliases:

default-host

localhost

example.com

Node slave:server-three-slave (ajp://PTIWH-222.premiumit-cn.com:8259):

Enable Contexts Disable Contexts

Balancer: other-server-group,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 65,Ttl: 60000000,Status: OK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: 100

Virtual Host 1:

Contexts:

/ClusterWebApp, Status: ENABLED Request: 0 Disable

Aliases:

example.com

localhost

default-host

Permalink

Hi Michael,

You have to enable your host IP to listen on 80 port along with 10001 port in httpd.conf

Listen 192.168.3.185:10001

Listen 192.168.3.185:80

Please let me know, whether this solve you problem or not.

Thanks & Regards,

Jonbon Dash

Permalink

Hi JONBON,

Thank you very much! You say is right, my problem has been resolved.I really appreciate!

I can be your friend?

Permalink

Hi Michael,

Sure its my pleasure to be friend with you.. :)

Send me a friend request.

Regards,

Jonbon Dash

Permalink

Hi JONBON,

Domain for cluster mode, create a the Messaging cluster need how to configure?

Permalink

Hi Michael,

Are you asking about the Clustering of the messaging subsystem or what?

If yes, then please create a separate blog for this.

Regards,

Jonbon Dash

Permalink

Hi,

I just had look into https://github.com/liweinan/cluster-demo/tree/master/src/main/webapp/WEB-INF.

Why is

<!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd" >

<web-app>

<display-name>Archetype Created Web Application</display-name>

<distributable/>

</web-app>

in use and not:

<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" id="WebApp_ID" version="3.0">

<display-name>Archetype Created Web Application</display-name>

<distributable/>

</web-app>

?

Cheers,

Carsten

Permalink

Not sure if anyone is still tracking these comments .. a bit old now. Thanks for the information .. very useful!

I am running into an issue with domain mode configuration. I have Apache 2.2 with mod_cluster, 1 domain controller and 2 host controllers running on a single pc for testing. That is 3 separate instances of JBoss Eap 6.1

I can see both host controllers join the domain. And I can see both nodes recognize mod_cluster with the log output that they are using jvm-route. The number of nodes in the cluster logged appears correct.

When accessing the application through apache; the behavior i am seeing is that when i stop the server that requests are being sent to, the second server picks up the request but the time is null. if i switch back and forth stopping the current server and refreshing the page, the time is set for each individual server. So i have 2 separate times, one for each node and they continue to change as that node is hit.

In further testing i can see that the session is replicated for the servers in the same host, but they are not replicated to servers in the other host.

I am not getting any errors in the server logs or the http log.

Httpd.conf

Domain.xml (using full-ha profile and full-ha-sockets)

Any clue as to what would cause this behavior? Is there additional information I can provide?

Any insight is greatly appreciated.

Permalink

double click the domain.bat, as above described, looks like there are some service does not start, the cursor has stopped there, view the log did not display an error message, I do not know why?

Permalink

Hi,

I am trying to follow this tutorial and install a cluster of jboss on the amazon (ec2).

I'm using the micro instance that have 613 Mb of memory to be the "master server". The memory is not enough and i am giving out of memory exception. My question is: What is server-one, server-two and server-three ? I really need 3 servers running on master ?

At the picture Testing Scenario, i have only two servers running on master server: httpd + mod_cluster AND AS7 server. (only 2 servers). Where is the server-three ?

I think that on master should exist only 1 server (domain controller - administrator os the domain), and optionally a host. I don't understood why 3 servers.

What is the function os each three servers. Can some of them be optional ?

Thanks.

Permalink

Hi Victor,

You don't have to start 'server-one' and 'server-two' because they are belonged to 'main-server-group' instead of 'other-server-group'. You can see this from host.xml:

and 'main-server-group' belongs to different profile 'full'. See the config in domain.xml:

Only 'other-server-group' is using the 'full-ha' profile, thus only the servers belongs to this group (which is server-three) is relative.

You can disable server-one and server-two by setting 'auto-start' to 'false' to prevent them starting with AS together:

Hi,

I am following this guide to setup cluster. But I am not able to deploy the war. I am getting lot of errors . Please see the server.log

Also attaching domain.xml and standalone.xml of master for your reference. - domain.xml standalone.xml

Please reply asap.

Permalink

Have you used some messaging features? The messaging feature are only provided by '-full.xml', '-full-ha.xml' configs. If you are using domain mode, make sure you are using '-full' or '-full-ha' profile for your server group.

Please also update to EAP 6.1.0 instead of older version of JBoss AS7, which has fixed a lot of bugs.

JGroup cannot send message to slave. Have you turned off your firewall? SElinux disabled? Does you network support UDP + IP multicasting? These places are worth checking.

Permalink

Thank you.. I was able to deploy the war. Some configurations were missing.

But now when I tried to deploy a new war with size 105 MB i am getting new error -

[org.jboss.as.deployment] (HttpManagementService-threads - 3) JBAS010806: Caught exception closing input stream: java.io.IOException: Stream closed

Related links for this error - https://community.jboss.org/thread/199525?start=0&tstart=0

Also I read other posts, where they state this problem is fixed in 7.1.2 version. Is there any workaround with version 7.1.1 ?

Permalink

You can find the relative patch for the issue and rebuild 'host-controller component in JBoss AS 7.1.1. Then you can change the existing host-controller in AS modules dir:

But I wonder whether that's a good way. So please just upgrade to latest JBoss EAP 6.1.0

Permalink

Hi,

I have followed the steps in this guide to form a cluster environment. After that, I have deployed jbpm-console war on server three. But when I start server-three after deployment, it fails to start stating the following error -

JBAS014775: New missing/unsatisfied dependencies:

service jboss.binding.jacorb (missing) dependents: [service jboss.jacorb.orb-service]

service jboss.binding.jacorb-ssl (missing) dependents: [service jboss.jacorb.orb-service]

service jboss.binding.messaging (missing) dependents: [service jboss.messaging.default]

service jboss.binding.messaging-throughput (missing) dependents: [service jboss.messaging.default]

service jboss.naming.context.java.ConnectionFactory (missing) dependents: [service jboss.naming.context.java.module.jbpm-console.jbpm-console.env."org.kie.services.remote.jms.RequestMessageBean".connectionFactory]

service jboss.naming.context.java.jboss.datasources.jbpmDS (missing) dependents: [service jboss.persistenceunit."jbpm-console.war#org.jbpm.domain"]

service jboss.ra.hornetq-ra (missing) dependents: [service jboss.deployment.unit."jbpm-console.war".component.TaskServiceRequesMessageBean.CREATE, service jboss.deployment.unit."jbpm-console.war".component.KieSessionRequesMessageBean.CREATE]

Please reply asap. I have also attached server.log for reference.server.log

Permalink

Hi,

Can anyone please share me steps on the below requirement:

I have two Jboss AS7 Server ( Server1 & Server2), from which Server1 is behave as master & Server2 behave as slave and two mod_cluster setup (mod1 & mod2). With single mod1, I am able to track & do the above cluster step up.

Now problem is, how to do the request processing from mod2 for both Server1 & Server2, if mod1 got fail.

Regards,

Jonbon Dash

Permalink

You can use LVS+heartbeat, Ngnix OR another httpd to sit in front of your two modcluster nodes to load blanance them. Just treat your two modcluster nodes as worker nodes.

Permalink

I had a lot of trouble getting this to work with as-7.1.1, eventually I found this:

https://bugzilla.redhat.com/show_bug.cgi?id=899584

I added to the httpd VirtualHost:

AdvertiseSecurityKey secret

and modified the mod-cluster config in domain.xml:

<mod-cluster-config advertise-socket="modcluster" advertise-security-key="secret" >

After that it works fine with httpd and jboss on the same host (that bug also suggests an explicit external interface definition might be needed for use across a network). It's probably worth a note in this guide for those using 7.1.1; it's fixed in the current EAP6 release.

Permalink

Please use the newest JBoss EAP 6.1.0.Final to follow this document, or you'll meet a lot of bugs.

Permalink

Thank you so much Weinan, that was very helpful. I struggled with the configuration for some time and since there are so many combinations possible, thought I would put this down..

If anyone is is running JBoss 7.1.1.Final, mod-cluster 1.2 and apache httpd 2.2 64 bit on windows 7, this is the configuration that I used to get it working, hope it is helpful to someone.

1. Ensure the required .so files are present in the modules folder of apache httpd installation.

2. Configure httpd.conf

#xx.yy.zz.67 is your machine ip4 address that you get from ipconfig)

Listen xx.yy.zz.67:10001

LoadModule proxy_module modules/mod_proxy.so

LoadModule proxy_ajp_module modules/mod_proxy_ajp.so

LoadModule slotmem_module modules/mod_slotmem.so

LoadModule manager_module modules/mod_manager.so

LoadModule proxy_cluster_module modules/mod_proxy_cluster.so

LoadModule advertise_module modules/mod_advertise.so

<VirtualHost xx.yy.zz.67:10001>

<Location />

Order deny,allow Deny from all

Allow from xx.yy.zz.

</Location>

EnableMCPMReceive

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName mycluster

ServerAdvertise On

# Below is required in a specific version (7.1.1.Final with 1.2 mod cluster) with corresponding change in domain.xml, should change the secret key value

AdvertiseSecurityKey secret AllowDisplay On

</VirtualHost>

#Below is required to view mod_cluster manager

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from xx.yy.zz

AllowDisplay On

</Location>

3. domain.xml changes

-> for 'ha' or whichever profile you have enabled in your server group add advertise-security-key="secret"

<subsystem xmlns="urn:jboss:domain:modcluster:1.0">

<mod-cluster-config advertise-socket="modcluster" advertise-security-key="secret">

-> Add instance id for web subsystem

<subsystem xmlns="urn:jboss:domain:web:1.1" default-virtual-server="default-host" native="false" instance-id="${jboss.node.name}">

<connector name="http" protocol="HTTP/1.1" scheme="http" socket-binding="http"/>

4. Now, if you were to go to http://xx.yy.zz.67:10001/<your-application>

the request should be passed on to your jboss instance

Permalink

Hi All,

My requirement is to make 2 or more node in a clustering to get High Availability.

In my configuration i have used two nodes in a standalone mode for clustering.

I have used mod_cluster for load balancing.

If node which install Apche+mod_cluster crash the whole things stop.

Is there any way to make two mod_cluster in Active/Passive format in a such a way that when one of them crash another mod_cluster activated and start working without any interruption.

Is there any way to make two mod_cluster to check health status of each other.

Please anyone share me all the steps..

Thanks & Regards,

Jonbon Dash

Permalink

Hi Jonbon,

I'd recommend you to use an IP load balancing solution in front of multiple mod_cluster + httpd instances.

The standard solution provided by Red Hat is LVS+Heartbeat. Red Hat also supports a GUI tool called Piranha that could help you to manage LVS+Heartbeat in a convinient way.

Permalink

Hi Li,

Could you please share me whole steps or any reference doc, i don't know how to setup two mod_cluster?

I am using Window Server 2008 R2. Please guide me on this as well.

Thanks & Regards,

Jonbon Dash

Permalink

Hi Jonbon,

Generally speaking, mod_cluster uses advertising channel (an IP multicast channel) to advertise itself to the EAP6 worker nodes. If two mod_clusters advertising their addresses in the advertising channel, then the EAP6 server will register into these mod_cluster instances.

I need some time to write a document on how to do this. This weekend I'll try to find some time

Permalink

Hi Li,

Thanks a lot. I am waiting for the doc. Actually I have to do the Cluster setup in production environment.

Where we should not have any single point of failure.

Thanks & Regards,

Jonbon Dash

Permalink

Hi Jonbon,

Here is the article for your use: https://docs.jboss.org/author/display/AS71/Setting+multiple+mod_cluster+load+balancers+in+clustering+environment

Hope its helpful If you have any questions please leave comments to the above article.

Permalink

Hi all,

first of all I want to thank Li for his great tutorial. Perhaps someone can help me with my problem.

I´m using EAP 6.1 on master (Win7) and slave (Ubuntu Server) for my test environment. I also use mod_cluster-1.2.6.Final-windows-amd64. Everything works fine, if both pcs are within the same subnet. But how can I setup a cluster where the slave is in a different network?

Greetings,

Dennis Allert

Permalink

Hi Dennis,

The recommended solution is to put your httpd load balancer and your EAP6 servers in a same network. Because multiple components are either relying on IP multicast or have better performance in a LAN. For example: HornetQ, mod_cluster, JBoss Remoting, JGroups, etc. Putting your worker nodes and load balancers in a WAN will increase your configuration tasks, you have to consider much more things to make it working correctly.

A better solution could be: Building application level clusters in a LAN, and then use an IP level load balancer solution to load balance these clusters in different networks. Another options is to partition your cluster by its functions. For example, put web services cluster in one network, and put web application cluster in another network. And you can also use technologies like CDN to serve the static contents such as images. These are all better to partition your EAP6 servers and httpd load balancers across a WAN.

Hope this is useful to you

Permalink

Hi Li,

first of all I wish you a happy new year.

I was trying to implement your suggestion, but I failed in my special case. I´m new on this topic and perhaps you can help me with an example for my problem.

We´ve got two server in WAN.

Let´s say a.)´s IP are 111.111.111.111 and b.)´s IP are 222.222.222.222. Server c.) Should be the load balancer 333.333.333.333

a.) is Master and b.) is slave, connected with JBOSS Domain Mode. Both server running with the same server app. I´m able to communicate with server a.) or server b.) over two Java Socket IO specific ports. Let´s say port 9010 and 9020.

What I now need is a load balancer running on server c.), who knows both servers and is able to check if the communication over the specific Java Sockets is possible or not. So the client should only know the IP of the load balancer and the load balancer communicates with one of the servers and redirects the answer to the client. Another solution would be that the load balancer tells the client the IP of the server he should use for the communication.

I was able to run a normal load balancer who is redirecting me, if port 80 is not available, but I wasn´t able to load balance that Java Socket connection.

Do you have any suggestions or better a tutorial for me how to solve that problem?

Thanks & Regards,

Dennis Allert

Permalink

Hi Dennis,

Please don't build a cluster in a WAN. Build it in a LAN instead, because multiple components needs IP broadcasting to work properly.

Permalink

Hi Li,

Thanks for your quick response. Our problem is the following:

We´ve got a chat app for Android. User can send chat messages and pictures. There is one server which can receive queries over TCP (Java socket IO). We´ve got users from different countries and at the moment only one server located in Germany. Our plan was to spread a few servers over EU countries and cluster them for load balancing with geo tagging. We thought it would solve two problems: More speed for the user living outside of Germany and protection against a server failure.

You told me now, that we should build a LAN cluster. Now we could theoretically build several LAN cluster, but that wouldn´t solve the WAN problem. Do you have any suggestions for us?

Second question: Even if I start to build one LAN cluster in Germany, how can I load balance the TCP connections? Like I told you I wasn´t able to achieve this. Do you have any suggestions for me?

Best regards,

Dennis

Permalink

Hi Dennis, there are several technologies for WAN cluster. For example, you can use CDN to load balancing your static web contents such as images. And you may need to cache your database into different locations.

Permalink

btw, if you can't afford to build a distributed systems across different countries by yourself, there are many clouding vendors you could use. For example, Red Hat has Openshift, and you can also try Amazon EC2.

Permalink

Hi Li,

Thanks a lot for your effort. The tutorial is really helpful.

I am facing some problem to post Jms message from Non-cluster Jboss server to the above cluster setup JMS Queue from the Java Code. I have attached my Client code, Mod_cluster config & Jboss configuration file for your reference. Please guide me, how to discover the Cluster group address from Java code,if possible please share me some sample code which I can use to post message to the Cluster JMS Queue.

ClusterProgramTest.zip

Thanks & Regards,

Jonbon Dash

Permalink

Hello

Thanks a a lot for tutorial .

I think that this approach is use for "failover" i mean all request is response from master and if master is down the slave response ...

My problem is i have 15 physical server that each server have an instance of jboss7 and must be cluster (session replication) and have HAProxy to load balancing what can i do ?

Permalink

Hi Alireza,

You can use your own solution for load balancing and failover. Using mod_cluster or mod_jk plus httpd as load balancer of EAP6 servers is just one option. The session replications are implemented between EAP6 servers.

Permalink

Hi,

i'm using jboss 7.1.1 final on windows xp .

i start one master and one slave on the same pc,and see the register slave log on master console. but when start the server-three on master from the managerment console, an error occur and the host list on the topest menu is empty.

the error says unhandle master server-three.but i see the server-three start succesfully whiout any exceptioins on the console of master.

Permalink

finally.i find this is cause of browser.i upgrade the google chrome from version 28 to version 31.then there is no problems.

Permalink

Hi,

I have JBoss 7.1.3 in domain mode and mod_cluster 1.1.3 in two servers, master and slave.

Address of master is: 192.168.0.36

Address of slave is: 192.168.0.170

The profile used is full-ha and serves communicate.

I have added <distributable /> in web.xml and tried to configure httpd.conf following this guide but I don't understand how reach apache address and using load balancer. I can only reach master and slave directly (on port 8330) without using load balancer. I have found some example on the web but none of them works! In the httpd.conf I have set the listener on 192.168.0.36:10001 and at URL http://192.168.0.36:10001/mod_cluster-manager there is a mod_cluster page with these informations:

mod_cluster/1.1.x

Auto Refresh show DUMP output show INFO output

Node master:master-server (ajp://192.168.0.36:8259):

Enable Contexts Disable Contexts

Balancer: other-server-group,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: NOTOK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: -1

Virtual Host 1:

Contexts:/CRI, Status: ENABLED Request: 0 Disable

Aliases:default-host

localhost

example.com

Node slave:slave-server (ajp://192.168.0.170:8259):

Enable Contexts Disable Contexts

Balancer: other-server-group,LBGroup: ,Flushpackets: Off,Flushwait: 10000,Ping: 10000000,Smax: 1,Ttl: 60000000,Status: NOTOK,Elected: 0,Read: 0,Transferred: 0,Connected: 0,Load: -1

Virtual Host 1:

Contexts:/CRI, Status: ENABLED Request: 0 Disable

Aliases:default-host

localhost

example.com

I noticed that in Balancer, Load is -1 and If I try to connect to 192.168.0.36:10001/CRI I obtain

Service Temporarily Unavailable

The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.

----Apache/2.2.15 (CentOS) Server at 192.168.0.36 Port 10001

This is my httpd.conf:

ServerName 192.168.0.36

Listen 192.168.0.36:10001

MemManagerFile /var/cache/httpd

<VirtualHost 192.168.0.36:10001>

<Directory />

Order deny,allow

Deny from all

Allow from 192.168.0.

</Directory>

<Location /mod_cluster-manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from 192.168.0.

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

ManagerBalancerName other-server-group

AdvertiseFrequency 5

</VirtualHost>

Thanks

Permalink

1. Please download the JBoss EAP 6.x and use the mod_cluster 1.2.x to run the tests. The AS 7.1.x and mod_cluster 1.1.x has bugs.

2. The 'EnableMCPMReceive' directive should be used in virtual host.

3. The 10001 virtual host should be used for MCMP channel only.

Here is an example configuration:

As the example shown above, 10.0.1.32 is the IP address of my machine.I have set two virtual machines, and 10.0.1.32:6666 is for httpd mod_cluster module to communicate with backend JBoss servers(via the MCPM channel).

The httpd version I've used is httpd-2.2.25, mod_cluster version I've used is 1.2.6.Final, and with the JBoss EAP6.2.

Btw, I've written a book regarding on these topics if you are interested in. The book name is JBoss EAP6 High Availability

Permalink

I discovered that problem was caused by my distribution of Linux (CentOS), because httpd_can_network_connect was 0.

Now, with JBoss 7.1.3 and mod_cluster 1.2.6.Final works, but sometimes I have errors as "Exception acquiring ownership", and "org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for transaction; nested exception is javax.persistence.PersistenceException: org.hibernate.TransactionException: JDBC begin transaction failed".

I think that my two servers not have a good communications and I need to configure connection pool.

I have also other questions :D

1. What's the policy used by load balancer to decide which server use?

2. Is possible to configure it?

3. In clustering, there are rules about hardware of nodes (for example must be the same)?

4. Why some people use jboss-web.xml?

Thanks

Permalink

Thank you for the guide..

It works for me ..

I have two questions.

1. How long will the slave nodes work, if master node server failed?

2. Clustering is the set of nodes i.e JBoss AS instances, but in this guide I don't see the clustering. As we have two nodes which is handle by httpd + mod_cluster load balancer.

what I mean is [node1, node2, node3]cluser + [node4]cluster + [node5, node6]cluster

Permalink

My Aim: want to deploy EAR in managed domain model without using CLI or UI .

So Can anyone please tell me how to deploy an EAR file in Jboss7 or JBOSS6.2 in domain model , like we deploy it using below snippet in standalone.xml filein standalone mode.

"<subsystem xmlns="urn:jboss:domain:deployment-scanner:1.1">

<deployment-scanner path="deployments" relative-to="jboss.server.base.dir" scan-interval="5000" auto-deploy-exploded="true"/>

</subsystem>"

similarly please let me know if there is any such way/module is there which we can incorporate in domain.xml like above , so that we can put the EAR file in any location and then when we start the server it just scans and picksup the file and deploys it.?

When I use this: "<extension module="org.jboss.as.deployment-scanner"/> " it says that we can't use this in managed domain model.

Please help

Regards,

Satya

Permalink

Hi,

Thanks for you help .

I have finished the most configurations about that ,but I can't got the HA. I have used mod_cluster + apache httpd on master as my cluster controller ,but the request not be served by slave when the master turn off .

Now,i have a question that if the cluster is unavoidable when the master was power off ,so it doesn't work .could i configure the cluster on slave ? or both of them ?

So,can anyone please tell me how to realize the faction of HA ,or the principle of HA?

thank you very much !

Permalink

Good article! I was able to follow through...almost...By that, I mean the last step - Session Replication - just did not work for me. When I call GetTime page, the time display is always null. I tried quite a few things as recommended in various comments and recommendations from Google search, it just did not work. Finally, I gave up domain mode and tried standalone mode...amazingly session replication just works!!

For everyone who struggles with session replication in domain mode (I know there are quite a few of users just in this site), I recommend give "standalone" mode a try. Good luck!

Permalink

I want to share my configuration. Hope this helps.

My configuration is JBOSS AS 7.1.0 Final and Mod Cluster 1.2.6. I also tried JBOSS EAP 6 which works too.

1. Mod_Cluster / Apache:

Mod_Cluster/Apache can be installed on any server. To make it simple, install Mod_Cluster/Apache on the same local network as the two JBOSS AS servers.

In HTTPD.conf file, make the following changes: (assume my apache server is installed in 192.168.1.101)

1). Listen to port 80.

Listen 192.168.1.101:80

2) Create Mod_Cluster virtual host:

# MOD_CLUSTER_ADDS

# Adjust to you hostname and subnet.

<IfModule manager_module>

Listen 192.168.1.101:10001

ManagerBalancerName mycluster

<VirtualHost 192.168.1.101:10001>

<Location />

Order deny,allow

Deny from all

Allow from 192.168.1.

</Location>

KeepAliveTimeout 60

MaxKeepAliveRequests 0

#ServerAdvertise on http://127.0.0.1:6666

AdvertiseFrequency 5

#AdvertiseSecurityKey secret

#AdvertiseGroup 224.0.1.105:23364

EnableMCPMReceive

<Location /mod_cluster_manager>

SetHandler mod_cluster-manager

Order deny,allow

Deny from all

Allow from 192.168.1.

</Location>

</VirtualHost>

</IfModule>

2. JBOSS AS 7.1.0 Final:

I installed the JBOSS AS to two different servers, 192.168.1.101 and 102. For each installation, I use profile standalone-full-ha.xml profile.

1) In the profile file standalone-full-ha.xml, add proxy to point to the Apache server:

<subsystem xmlns="urn:jboss:domain:modcluster:1.0">

<mod-cluster-config advertise-socket="modcluster" proxy-list="192.168.1.101:10001" sticky-session="true"/>

</subsystem>

2) Also in the profile file, change interfaces to use 192.168.1.XX address (rather than 127.0.0.1). For example, in server 192.168.1.102:

3) To start the JBOSS server, use the following command:

In JBOSS on 192.168.1.101:

C:\jboss-as-7.1.0.Final\bin>standalone.bat -c standalone-full-ha.xml -b 192.168.

1.101 -Djbos.node.name=node1

In JBOSS on 192.168.1.102:

C:\jboss-as-7.1.0.Final\bin>standalone.bat -c standalone-full-ha.xml -b 192.168.

1.102 -Djbos.node.name=node2

Also, make sure to set JBOSS_HOME environment variable to the correct path (C:\jboss-as-7.1.0.Final for me).

After you deploy the sample projects to both servers, session replication should work.

Good luck!

Permalink




赞(0)    操作        顶端 
总帖数
1
每页帖数
101/1页1
返回列表
发新帖子
请输入验证码: 点击刷新验证码
您需要登录后才可以回帖 登录 | 注册
技术讨论