2

I'm configuring Glassfish 4 Cluster on DigitalOcean which doesn't allow multicast. I want to deploy an EAR application with one WAR inside and I want all instances on Cluster share session info. The web.xml has the tag.

The setup: I have one Glassfish 4 server as DAS: server.

And I have other 2 Glassfish 4 servers as instances on different hosts from DAS: node01, node02

I configured the GMS_DISCOVERY_URI_LIST on Cluster to point to the instances as:

clusters.cluster.myCluster.property.GMS_DISCOVERY_URI_LIST=tcp://server:9090,tcp://node01:9090,tcp://node02:9090

and the GMS_LISTENER_PORT on Cluster to:

clusters.cluster.myCluster.property.GMS_LISTENER_PORT=9090

At Cluster starts the log of the instance shows GMS is ok (that's what I think):

GMS1092: GMS View Change Received for group: ntkCluster : Members in view for ADD_EVENT(before change analysis) are :
1: MemberId: instance01, MemberType: CORE, Address: 10.0.0.2:9090:228.9.143.254:10292:myluster:instance01
2: MemberId: instance02, MemberType: CORE, Address: 10.0.0.3:9090:228.9.143.254:10292:myluster:instance02
3: MemberId: server, MemberType: SPECTATOR, Address: 10.0.0.1:9090:228.9.143.254:10292:myCluster:server

But it shows too some messages about JMS failing. The point is that my application don't use JMS and I configured nothing of JMS:

[2014-07-22T12:33:16.431+0200] [glassfish 4.0] [INFO] [addresslist.setjmsservice.provider] [javax.enterprise.resource.jms.com.sun.enterprise.connectors.jms.system] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1406025196431] [levelValue: 800] [[
  JMS010: ADDRESSLIST in setJmsServiceProvider: mq://node01:27676/,mq://node02:27676/]]

[2014-07-22T12:33:16.438+0200] [glassfish 4.0] [INFO] [jms.connection.url] [javax.enterprise.resource.jms.com.sun.enterprise.connectors.jms.system] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1406025196438] [levelValue: 800] [[
  JMS08: JMS Service Connection URL is : mq://node01:27676/,mq://node02:27676/]]

[2014-07-22T12:33:16.444+0200] [glassfish 4.0] [SEVERE] [rardeployment.start_failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors] [tid: _ThreadID=1 _ThreadName=main] [timeMillis: 1406025196444] [levelValue: 1000] [[
  RAR6035 : Resource adapter start failed.
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException
    at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.setClusterRABeanProperties(ActiveJmsResourceAdapter.java:1298)
    at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.loadRAConfiguration(ActiveJmsResourceAdapter.java:387)
    at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:115)
    at com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:90)
    at com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:141)
    at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:108)
    at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:210)
    at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:346)
    at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:405)
    at com.sun.enterprise.connectors.jms.system.JmsProviderLifecycle.initializeBroker(JmsProviderLifecycle.java:127)
    at com.sun.enterprise.connectors.jms.system.JmsProviderLifecycle.postConstruct(JmsProviderLifecycle.java:107)
    at org.jvnet.hk2.internal.ClazzCreator.postConstructMe(ClazzCreator.java:281)
    at org.jvnet.hk2.internal.ClazzCreator.create(ClazzCreator.java:328)
    at org.jvnet.hk2.internal.SystemDescriptor.create(SystemDescriptor.java:448)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.findOrCreate(AsyncRunLevelContext.java:163)
    at org.jvnet.hk2.internal.Utilities.createService(Utilities.java:2204)
    at org.jvnet.hk2.internal.ServiceHandleImpl.getService(ServiceHandleImpl.java:93)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.oneJob(CurrentTaskFuture.java:673)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$QueueRunner.run(CurrentTaskFuture.java:660)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpOneJob.run(CurrentTaskFuture.java:490)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.go(CurrentTaskFuture.java:362)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture$UpAllTheWay.access$100(CurrentTaskFuture.java:279)
    at org.glassfish.hk2.runlevel.internal.CurrentTaskFuture.go(CurrentTaskFuture.java:113)
    at org.glassfish.hk2.runlevel.internal.AsyncRunLevelContext.proceedTo(AsyncRunLevelContext.java:296)
    at org.glassfish.hk2.runlevel.internal.RunLevelControllerImpl.proceedTo(RunLevelControllerImpl.java:66)
    at com.sun.enterprise.v3.server.AppServerStartup.proceedTo(AppServerStartup.java:532)
    at com.sun.enterprise.v3.server.AppServerStartup.run(AppServerStartup.java:346)
    at com.sun.enterprise.v3.server.AppServerStartup.doStart(AppServerStartup.java:226)
    at com.sun.enterprise.v3.server.AppServerStartup.start(AppServerStartup.java:217)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishImpl.start(GlassFishImpl.java:79)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.EmbeddedOSGiGlassFishImpl.start(EmbeddedOSGiGlassFishImpl.java:75)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishDecorator.start(GlassFishDecorator.java:63)
    at com.sun.enterprise.glassfish.bootstrap.osgi.OSGiGlassFishImpl.start(OSGiGlassFishImpl.java:71)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain$Launcher.launch(GlassFishMain.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.enterprise.glassfish.bootstrap.GlassFishMain.main(GlassFishMain.java:97)
    at com.sun.enterprise.glassfish.bootstrap.ASMain.main(ASMain.java:54)
Caused by: java.lang.NullPointerException
    at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.isDBEnabled(ActiveJmsResourceAdapter.java:1312)
    at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.setClusterRABeanProperties(ActiveJmsResourceAdapter.java:1282)
    ... 40 more
]]
[2014-07-22T12:33:16.691+0200] [glassfish 4.0] [SEVERE] [failed.to.load.deferred.ra] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196691] [levelValue: 1000] [[
  RAR8061: failed to load resource-adapter-config or RA [ jmsra ], com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to start resource adapter : null]]

[2014-07-22T12:33:16.691+0200] [glassfish 4.0] [SEVERE] [unable.to.lookup.pool] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196691] [levelValue: 1000] [[
  RAR8060: Unable to lookup pool [ jms/__defaultConnectionFactory-Connection-Pool ], javax.naming.NamingException: Lookup failed for '__SYSTEM/pools/jms/__defaultConnectionFactory-Connection-Pool' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming} [Root exception is javax.naming.NameNotFoundException: jms]]]

[2014-07-22T12:33:16.692+0200] [glassfish 4.0] [SEVERE] [rardeployment.jndi_lookup_failed] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196692] [levelValue: 1000] [[
  RAR6017 : Failed to get connection pool object jms/__defaultConnectionFactory via JNDI lookup : com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Lookup failed for '__SYSTEM/pools/jms/__defaultConnectionFactory-Connection-Pool' in SerialContext[myEnv={java.naming.factory.initial=com.sun.enterprise.naming.impl.SerialInitContextFactory, java.naming.factory.state=com.sun.corba.ee.impl.presentation.rmi.JNDIStateFactoryImpl, java.naming.factory.url.pkgs=com.sun.enterprise.naming}]]
[2014-07-22T12:33:16.973+0200] [glassfish 4.0] [SEVERE] [error.loading.connector.resources.during.recovery] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.recovery] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196973] [levelValue: 1000] [[
  RAR7110: Error while loading connector resources during recovery : jms/__defaultConnectionFactory]]

[2014-07-22T12:33:16.982+0200] [glassfish 4.0] [SEVERE] [error.loading.connector.resources.during.recovery] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.recovery] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196982] [levelValue: 1000] [[
  RAR7110: Error while loading connector resources during recovery : jms/__defaultConnectionFactory]]

[2014-07-22T12:33:16.984+0200] [glassfish 4.0] [WARNING] [datasource.xadatasource_error] [javax.enterprise.resource.resourceadapter.com.sun.enterprise.resource.recovery] [tid: _ThreadID=214 _ThreadName=Recovery Helper Thread] [timeMillis: 1406025196984] [levelValue: 900] [[
  RAR5005:Error in accessing XA resource with JNDI name [jms/__defaultConnectionFactory-Connection-Pool] for recovery]]

So the questions are:

Do I need to configure JMS and brokers to share sessions over the Cluster instances?

Or is the problem on the Cluster configuration?

Is it not possible to share sessions without multicast?

Thanks in advance.

kienvaser
  • 61
  • 6
  • 3 month left from question, probably you solve it, i have this error too, can you help me? how did you solve it? – Anar Orujov Oct 25 '14 at 07:03
  • Didn't solve it because you're unable to share sessions on Glassfish 4.0 without using multicast (readed on doc). Our workaround was to set/detect on the HAProxy balancer the user cookie and force the user to access always the same instance.I don't know if it will be possible on future versions. – kienvaser Oct 27 '14 at 07:16

0 Answers0