-
15. Re: Re: Can not forward request to another clustered server
jbertram Dec 6, 2013 9:54 AM (in response to ohmygod)1 of 1 people found this helpfulYou have indeed missed a few critical configuration parameters.
First, you have specified <shared-store>true</shared-store>, but you haven't specified where the "store" is located which means the two servers will not actually share a store since they will be using the default location. The documentation states, "In order for live - backup groups to operate properly with a shared store, both servers must have configured the location of journal directory to point to the same shared location (as explained in Section 15.3, “Configuring the message journal”)."
Second, you have not specified <backup>true</backup> on the backup node. The documentation states, "...each backup server must be flagged explicitly as a backup..."
-
16. Re: Re: Re: Can not forward request to another clustered server
ohmygod Dec 7, 2013 1:27 AM (in response to jbertram)Thanks, Justin.
But I have added below directory and it seems the server can not startup with xml parse error.
<journal-directory>D:/temp</journal-directory>
<failover-on-shutdown>true</failover-on-shutdown> <shared-store>true</shared-store> <persistence-enabled>false</persistence-enabled> <security-enabled>false</security-enabled> <journal-directory>D:/temp</journal-directory> <journal-type>NIO</journal-type> <journal-sync-transactional>false</journal-sync-transactional> <journal-sync-non-transactional>false</journal-sync-non-transactional> <journal-file-size>10485760</journal-file-size> <journal-min-files>10</journal-min-files>
2013-12-07 14:26:10,684;[Controller Boot Thread];ERROR;org.jboss.as.server;JBAS0 15956: Caught exception during boot: org.jboss.as.controller.persistence.Configu rationPersistenceException: JBAS014676: Failed to parse configuration at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(Xm lConfigurationPersister.java:141) at org.jboss.as.server.ServerService.boot(ServerService.java:308) at org.jboss.as.controller.AbstractControllerService$1.run(AbstractContr ollerService.java:188) at java.lang.Thread.run(Thread.java:619) Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[371,5] Message: JBAS014724: Missing required attribute(s): PATH at org.jboss.as.controller.parsing.ParseUtils.missingRequired(ParseUtils .java:135) at org.jboss.as.messaging.MessagingSubsystemParser.parseDirectory(Messag ingSubsystemParser.java:1249) at org.jboss.as.messaging.MessagingSubsystemParser.processHornetQServer( MessagingSubsystemParser.java:244) at org.jboss.as.messaging.Messaging13SubsystemParser.processHornetQServe rs(Messaging13SubsystemParser.java:207) at org.jboss.as.messaging.MessagingSubsystemParser.readElement(Messaging SubsystemParser.java:132) at org.jboss.as.messaging.MessagingSubsystemParser.readElement(Messaging SubsystemParser.java:93) at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:1 10) at org.jboss.staxmapper.XMLExtendedStreamReaderImpl.handleAny(XMLExtende dStreamReaderImpl.java:69) at org.jboss.as.server.parsing.StandaloneXml.parseServerProfile(Standalo neXml.java:1028) at org.jboss.as.server.parsing.StandaloneXml.readServerElement_1_4(Stand aloneXml.java:449) at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.j ava:136) at org.jboss.as.server.parsing.StandaloneXml.readElement(StandaloneXml.j ava:103) at org.jboss.staxmapper.XMLMapperImpl.processNested(XMLMapperImpl.java:1 10) at org.jboss.staxmapper.XMLMapperImpl.parseDocument(XMLMapperImpl.java:6 9) at org.jboss.as.controller.persistence.XmlConfigurationPersister.load(Xm lConfigurationPersister.java:133) ... 3 more 2013-12-07 14:26:10,705;[Controller Boot Thread];FATAL;org.jboss.as.server;JBAS0 15957: Server boot has failed in an unrecoverable manner; exiting. See previous messages for details. 2013-12-07 14:26:10,717;[MSC service thread 1-6];INFO ;org.jboss.as;JBAS015950: JBoss EAP 6.1.0.Alpha1 (AS 7.2.0.Alpha1-redhat-4) stopped in 5ms
How to specify a shared journal directory?
-
17. Re: Re: Re: Re: Can not forward request to another clustered server
ohmygod Dec 8, 2013 10:01 PM (in response to ohmygod)I fixed the error by setting the directory like this:
<journal-directory path="./temp"/>
but then after the two servers, the directories are poiting to their own temp directory in
server1\...\standalone\data\temp server2\...\standalone\data\temp
I tried to stop one server and now the warning message disappeared in another server, but the jms request seems still not fowarding to the second server to continue handling.
-
18. Re: Re: Re: Re: Can not forward request to another clustered server
jbertram Dec 9, 2013 10:22 AM (in response to ohmygod)This is actually an area where the configuration of HornetQ standalone differs from that of HornetQ in EAP. You need to specify 4 different configuration elements:
<paging-directory path="/path/to/directory" /> <bindings-directory path="/path/to/directory" /> <journal-directory path="/path/to/directory" /> <large-messages-directory path="/path/to/directory" />
See the <JBOSS_HOME>/docs/schema/jboss-as-messaging_1_3.xsd for more details about these configuration elements.
-
19. Re: Re: Re: Re: Can not forward request to another clustered server
ohmygod Dec 9, 2013 8:50 PM (in response to jbertram)Thanks, Justin.
Yes, I have seen he schema file, but I have one thing confused to me, which is now that the directory should be shared and accessed by both of the servers, how can it be configured? (Because it is only configured in their own /standalone/configuration directory).
-
20. Re: Can not forward request to another clustered server
jbertram Dec 9, 2013 9:30 PM (in response to ohmygod) -
21. Re: Re: Can not forward request to another clustered server
ohmygod Dec 9, 2013 9:42 PM (in response to jbertram)Thanks for the articles, but what I am confused is quite simple.
I have set the paths below for two servers, but they are seprately in their own /standalone/data/ directory. My question is how to make them shared across each other?
<journal-directory path="./server1"/> <paging-directory path="./server1"/> <bindings-directory path="./server1"/> <large-messages-directory path="./server1"/> <journal-directory path="./server2"/> <paging-directory path="./server2"/> <bindings-directory path="./server2"/> <large-messages-directory path="./server2"/>
-
22. Re: Re: Re: Can not forward request to another clustered server
ohmygod Dec 9, 2013 9:47 PM (in response to ohmygod)Another strange thing is when I configured the paths like below
<journal-directory relative-to="D:/temp" path="/server1"/> <paging-directory relative-to="D:/temp" path="/server1"/> <bindings-directory relative-to="D:/temp" path="/server1"/> <large-messages-directory relative-to="D:/temp" path="/server1"/>
I found the the server1 directory is generated under D: instead of D:/temp. I am confused. Do you know why? If setting path as "sever1", an error will be reported saying
Caused by: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'server1'
-
23. Re: Can not forward request to another clustered server
jbertram Dec 9, 2013 10:10 PM (in response to ohmygod)The two servers need to share the same HornetQ data directories (i.e. for journal, paging, bindings, and large messages). That's the whole point of setting <shared-store>true</shared-store>. If you configure one server to use "./server1" and the other server to use "./server2" then they won't share the same HornetQ data directories since "./server1" != "./server2". You need to configure some kind of shared storage between the two servers (e.g. SAN or NAS) and then create a local mapping to that shared storage location on both servers and then use that directory in your configuration.
-
24. Re: Re: Can not forward request to another clustered server
ohmygod Dec 9, 2013 11:19 PM (in response to jbertram)I see.
Now I am trying to set a local directory for both servers in my machine.
<journal-directory path="path/to/journal" relative-to="demo.home"/> <bindings-directory path="path/to/bindings" relative-to="demo.home"/> <large-messages-directory path="path/to/large-message" relative-to="demo.home"/> <paging-directory path="path/to/paging" relative-to="demo.home"/>
demo.home has been set into env. But when starting the server, below error occurs saying
2013-12-10 12:15:51,827;[MSC service thread 1-8];ERROR;org.jboss.msc.service.fail;MSC00001: Failed to start service jboss.messaging.default: org.jboss.msc.service.StartException in service jboss.messaging.default: Failed to start service at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1767) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.IllegalArgumentException: JBAS014847: Could not find a path called 'path/to/bindings' at org.jboss.as.controller.services.path.PathManagerService.resolveRelativePathEntry(PathManagerService.java:91) at org.jboss.as.messaging.HornetQService$PathConfig.resolve(HornetQService.java:387) at org.jboss.as.messaging.HornetQService$PathConfig.resolveBindingsPath(HornetQService.java:368) at org.jboss.as.messaging.HornetQService.start(HornetQService.java:154) at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) ... 3 more
I have created the bindings,journal,large-message and paging folders there but still see this error.
Any advise how to set the path?
-
25. Re: Re: Can not forward request to another clustered server
jbertram Dec 9, 2013 11:32 PM (in response to ohmygod)It's probably simplest to just drop the "relative-to" and use an absolute path.
-
26. Re: Re: Can not forward request to another clustered server
ohmygod Dec 10, 2013 3:23 AM (in response to jbertram)Hi Justin,
This time the server starts up without problem if dropping the "relative-to" and using an absolute path, but because currenlty my mod_cluster is not working
Re: Re: can not access application root
I can not try if the request transfer is working or not.
BTW, is it possible to just use hornetq bridge to transfer jms request from one server to another without using the mod_cluster? Currently my biggest expectation is the JMS request can be transferred from one server(server1) to another(server2) so that server1 can get a better performance without handling any jms requests.
Re: Is there a way to configure jms request working on another server
Can you suggest?
-
27. Re: Re: Can not forward request to another clustered server
jbertram Dec 10, 2013 9:36 AM (in response to ohmygod)Mod_cluster has nothing to do with HornetQ clustering so I'm not really sure what you're talking about. Messages can be load-balanced across a HornetQ clustering either by the clients (i.e. using client-side load-balancing) or by the cluster nodes themselves (i.e. server-side load-balancing and message redistribution). The HornetQ User Guide discusses all this.