-
1. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
jfclere Oct 8, 2012 4:42 AM (in response to varun_narula)it will work for any profile. In the instructions replace all by the profile to use.
-
2. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
varun_narula Oct 8, 2012 11:07 AM (in response to jfclere)The mod_cluster.sar deployed on default profile showed the following error in the log at startup. There were no startup commands passed to the server ( e.g. -u, -g etc. ). There are no changes done to the mod_cluster-jboss-beans.xml file. Am I missing something here?
2012-10-08 08:54:55,877 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "HAModClusterService" is missing the following dependencies:
Dependency "HAPartition" (should be in state "Instantiated", but is actually in state "** NOT FOUND Depends on 'HAPartition' **")
Deployment "ModClusterListener" is missing the following dependencies:
Dependency "HAModClusterService" (should be in state "Instantiated", but is actually in state "Described")
DEPLOYMENTS IN ERROR:
Deployment "HAPartition" is in error due to the following reason(s): ** NOT FOUND Depends on 'HAPartition' **
2012-10-08 08:54:55,897 INFO [org.apache.coyote.http11.Http11Protocol] (main) Starting Coyote HTTP/1.1 on http-127.0.0.1-8080
2012-10-08 08:54:55,916 INFO [org.apache.coyote.ajp.AjpProtocol] (main) Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
2012-10-08 08:54:55,926 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (main) JBoss (Microcontainer) [5.1.0.GA (build: SVNTag=JBoss_5_1_0_GA date=200905221053)] Started in 33s:764ms
-
3. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
pferraro Oct 8, 2012 11:33 AM (in response to varun_narula)To use mod_cluster with the default profile, you'll need to modify the mod_cluster-jboss-beans.xml file contained in the mod_cluster.sar:
In the ModClusterListener bean, replace the injected ContainerEventHandler to use the ModClusterService bean, instead of the HAModClusterService bean.
-
4. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
jfclere Oct 8, 2012 11:34 AM (in response to varun_narula)use ModClusterService instead HAModClusterService.
-
5. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
varun_narula Oct 8, 2012 12:39 PM (in response to pferraro)So, the mod_cluster-jboss-beans.xml now looks like
<!-- Entry point: catalina lifecycle listener -->
<bean name="ModClusterListener" class="org.jboss.modcluster.container.jbossweb.JBossWebEventHandlerAdapter">
<constructor>
<parameter class="org.jboss.modcluster.container.ContainerEventHandler">
<!-- <inject bean="HAModClusterService"/> -->
<inject bean="ModClusterService"/>
</parameter>
<parameter class="javax.management.MBeanServer"><inject bean="JMXKernel" property="mbeanServer"/></parameter>
</constructor>
<depends>WebServer</depends>
</bean>
No changes have been done so far to server.xml, or jboss-beans.xml, although there are some forum posts to add a Listener or a <depends> in these files.
https://community.jboss.org/thread/34965,
https://community.jboss.org/message/611419
Here is what the startup log looks like now -
2012-10-08 11:31:50,941 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "ModClusterListener" is missing the following dependencies:
Dependency "ModClusterService" (should be in state "Instantiated", but is actually in state "**ERROR**")
DEPLOYMENTS IN ERROR:
Deployment "ModClusterService" is in error due to the following reason(s): **ERROR**, org.jboss.joinpoint.spi.JoinpointException: Constructor not found org.jboss.modcluster.ModClusterService[org.jboss.modcluster.config.ModClusterConfig, org.jboss.modcluster.load.LoadBalanceFactorProvider] in [ReflectConstructorInfoImpl@1247252{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}]}, ReflectConstructorInfoImpl@ce8a9b{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}]}, ReflectConstructorInfoImpl@410581{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}, ReflectClassInfoImpl@d05a55{name=org.jboss.modcluster.mcmp.MCMPResponseParser}, ReflectClassInfoImpl@daa7cb{name=org.jboss.modcluster.mcmp.ResetRequestSource}]}, ReflectConstructorInfoImpl@13e352e{[ReflectClassInfoImpl@1156e01{name=org.jboss.modcluster.config.NodeConfiguration}, ReflectClassInfoImpl@1e9346b{name=org.jboss.modcluster.config.BalancerConfiguration}, ReflectClassInfoImpl@1709a4d{name=org.jboss.modcluster.config.MCMPHandlerConfiguration}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}, ReflectClassInfoImpl@d05a55{name=org.jboss.modcluster.mcmp.MCMPResponseParser}, ReflectClassInfoImpl@daa7cb{name=org.jboss.modcluster.mcmp.ResetRequestSource}, ReflectClassInfoImpl@1a26e63{name=org.jboss.modcluster.mcmp.MCMPHandler}, ReflectClassInfoImpl@fd4b59{name=org.jboss.modcluster.advertise.AdvertiseListenerFactory}]}, ReflectConstructorInfoImpl@15de478{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@142925e{name=org.jboss.modcluster.load.LoadBalanceFactorProvider}]}]
-
server.log.zip 5.8 KB
-
-
6. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
pferraro Oct 8, 2012 8:39 PM (in response to varun_narula)Varun Narula wrote:
No changes have been done so far to server.xml, or jboss-beans.xml, although there are some forum posts to add a Listener or a <depends> in these files.
These posts are obsolete - and would only apply to mod_cluster 1.0.x.
Varun Narula wrote:
Here is what the startup log looks like now -
2012-10-08 11:31:50,941 ERROR [org.jboss.system.server.profileservice.ProfileServiceBootstrap] (main) Failed to load profile: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS MISSING DEPENDENCIES:
Deployment "ModClusterListener" is missing the following dependencies:
Dependency "ModClusterService" (should be in state "Instantiated", but is actually in state "**ERROR**")
DEPLOYMENTS IN ERROR:
Deployment "ModClusterService" is in error due to the following reason(s): **ERROR**, org.jboss.joinpoint.spi.JoinpointException: Constructor not found org.jboss.modcluster.ModClusterService[org.jboss.modcluster.config.ModClusterConfig, org.jboss.modcluster.load.LoadBalanceFactorProvider] in [ReflectConstructorInfoImpl@1247252{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}]}, ReflectConstructorInfoImpl@ce8a9b{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}]}, ReflectConstructorInfoImpl@410581{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}, ReflectClassInfoImpl@d05a55{name=org.jboss.modcluster.mcmp.MCMPResponseParser}, ReflectClassInfoImpl@daa7cb{name=org.jboss.modcluster.mcmp.ResetRequestSource}]}, ReflectConstructorInfoImpl@13e352e{[ReflectClassInfoImpl@1156e01{name=org.jboss.modcluster.config.NodeConfiguration}, ReflectClassInfoImpl@1e9346b{name=org.jboss.modcluster.config.BalancerConfiguration}, ReflectClassInfoImpl@1709a4d{name=org.jboss.modcluster.config.MCMPHandlerConfiguration}, ReflectClassInfoImpl@cd7d13{name=org.jboss.modcluster.load.LoadBalanceFactorProviderFactory}, ReflectClassInfoImpl@1edd8fd{name=org.jboss.modcluster.mcmp.MCMPRequestFactory}, ReflectClassInfoImpl@d05a55{name=org.jboss.modcluster.mcmp.MCMPResponseParser}, ReflectClassInfoImpl@daa7cb{name=org.jboss.modcluster.mcmp.ResetRequestSource}, ReflectClassInfoImpl@1a26e63{name=org.jboss.modcluster.mcmp.MCMPHandler}, ReflectClassInfoImpl@fd4b59{name=org.jboss.modcluster.advertise.AdvertiseListenerFactory}]}, ReflectConstructorInfoImpl@15de478{[ReflectClassInfoImpl@1cd715c{name=org.jboss.modcluster.config.impl.ModClusterConfig}, ReflectClassInfoImpl@142925e{name=org.jboss.modcluster.load.LoadBalanceFactorProvider}]}]
Which JARs do you have in your mod_cluster.sar? There should be 5:
- mod_cluster-core.jar
- mod_cluster-container-spi.jar
- mod_cluster-container-catalina.jar
- mod_cluster-container-jbossweb.jar
- mod_cluster-ha.jar
You won't need the mod_cluster-ha.jar if you change the class name of the ModClusterConfig bean to "org.jboss.modcluster.config.impl.ModClusterConfig".
-
7. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
varun_narula Oct 9, 2012 12:27 PM (in response to pferraro)Thanks for pointing out the obsolete posts :-)
The jars are the same as you listed in the version used for testing with a 1.2.Final suffix.
The following seems to be source of the problem in the mod_cluster-jboss-beans.xml file -
<bean name="ModClusterService" class="org.jboss.modcluster.ModClusterService" mode="On Demand">
<annotation>@org.jboss.aop.microcontainer.aspects.jmx.JMX(name="jboss.web:service=ModCluster",exposedInterface=org.jboss.modcluster.ModClusterServiceMBean.class)</annotation>
<constructor>
<parameter class="org.jboss.modcluster.config.impl.ModClusterConfig"><inject bean="ModClusterConfig"/></parameter>
<parameter class="org.jboss.modcluster.load.LoadBalanceFactorProvider"><inject bean="DynamicLoadBalanceFactorProvider"/></parameter>
</constructor>
</bean>
The path to the ModClusterConfig was incorrect and after making the above change, the JBoss has started up without any errors.
However, in the same file, I am not sure which of the following should be used -
This is the original
<bean name="ModClusterConfig" class="org.jboss.modcluster.config.ha.impl.HAModClusterConfig" mode="On Demand">
and this is what I think should be used if the ModClusterService is used instead of the HAModClusterService -
<bean name="ModClusterConfig" class="org.jboss.modcluster.config.impl.ModClusterConfig" mode="On Demand">
Both of the above work without any exceptions, but there must be some difference in using the two. Have attached the file also for reference.
-
mod_cluster-jboss-beans.xml 13.5 KB
-
-
8. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
rhusar Oct 10, 2012 4:41 AM (in response to varun_narula)The difference between the 2 modes is that in the HA mode a singleton master per domain is elected and only the master node talks to the load-balancer. In regular mode each nodes registers with LB itself.
The HA mode is discouraged and removed in 1.2.x.
-
9. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
varun_narula Oct 10, 2012 10:49 AM (in response to rhusar)Pardon me if this sounds redundant, but the following entries in the mod_cluster-jboss-beans.xml all refer to the HA, then why is it discouraged, or is it something that I have not understood completely -
.
.
<parameter class="org.jboss.modcluster.container.ContainerEventHandler"><inject bean="HAModClusterService"/>
.
.
<bean name="HAModClusterService" class="org.jboss.modcluster.ha.HAModClusterService" mode="On Demand">
.
.
-
10. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
rhusar Oct 10, 2012 11:10 AM (in response to varun_narula)It is removed in master, see 8bdebac.
-
11. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
pferraro Oct 10, 2012 11:14 AM (in response to varun_narula)You can still use HAModClusterConfig as a parameter to the ModClusterService constructor, since it extends ModClusterConfig. It will define a couple other properties which are only applicable to HAModClusterService.
As to why HAModClusterService exists in mod_cluster-jboss-beans.xml - it's only there for historical reasons. In AS7, this config file is not used at all, since mod_cluster has it's own subsystem.
-
12. Re: Using mod_cluster_1.2.0 with the JBoss 'default' profile
varun_narula Oct 10, 2012 5:49 PM (in response to pferraro)We have to use JBoss 5.1.0.GA due to various reasons, and in some instances use the 'default' profile (e.g. the Liferay bundle with JBoss runs using this profile ). Will try out the config using ModClusterConfig and share these findings. Thanks for your inputs.