[JBoss Messaging] - Failover scenario is not working
by sabdulkareem
Hi all,
I am trying to setup failover for our standalone applications(MessageSender and MessageReceiver) using JBoss Messaging.
I have created 3 nodes in my local machine to form a cluster like:
Message-Node0, Message-Node1,Message-Node2 and started the three nodes.
This is the ConnectionFactory properties I used for the Sender and Receiver applications:
jmsConnectionFactory.jndiInitialContextFactory=org.jnp.interfaces.NamingContextFactory
jmsConnectionFactory.jndiProviderUrl=jnp://localhost:1099
jmsConnectionFactory.jndiNameForJmsConnectionFactory=ConnectionFactory
I tested the following scenario:
1. Started the Receiver application (It is a 24x7 application)
2. Started the Sender application which sends text messages to the testDistributedQueue.
3. While publishing some messages I stopped the Messaging-node0 server.
4. The Sender and Receiver applications tries to get Connections using Recovery Algorithms.
I expected the messages will be published by getting connection(auto-discovery) using the other available nodes in the cluster(ie, node1 and node2)
But this is not happening.
This is because the application fails to discover the other nodes in the cluster.( We tried the same failover scenario for JbossMQ, that works fine.)
The application throws the following exception:
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Failed to connect to server 10.212.65.25:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.212.65.25:1100 [Root exception is java.net.ConnectException: Connection timed out: connect]] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
If I use the port 1100 instead of 1099 the applications hanging (ie, the application does not throws any exception and also not publishing and receiving messages)
Do I need to setup anything to enable HAJNDI for each instance? Pls help.
Version Details:
Jboss 4.0.5
Jboss Messaging 1.2.0 sp1
Thanks in Advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038736#4038736
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038736
19 years
[JBoss jBPM] - The error of datasource
by niday
My application server is jboss, and set the individual datasource, but when start the jboss, I get the error as follow . why and How .
Thank you in advance .
14:28:54,209 ERROR [MainDeployer] Could not initialise deployment: file:/usr/local/jboss-4.0.3SP1/server/default/deploy/jbpm-ds.xml
org.jboss.deployment.DeploymentException: Could not parse dd; - nested throwable: (org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:219)
at org.jboss.deployment.XSLSubDeployer.init(XSLSubDeployer.java:147)
at org.jboss.deployment.MainDeployer.init(MainDeployer.java:843)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:780)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at sun.reflect.GeneratedMethodAccessor50.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy9.deploy(Unknown Source)
at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:319)
at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:507)
at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:192)
at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:265)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:943)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:428)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:118)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:127)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330)
at org.jboss.Main.boot(Main.java:187)
at org.jboss.Main$1.run(Main.java:438)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.xml.sax.SAXParseException: The processing instruction target matching "[xX][mM][lL]" is not allowed.
at org.apache.xerces.parsers.DOMParser.parse(Unknown Source)
at org.apache.xerces.jaxp.DocumentBuilderImpl.parse(Unknown Source)
at javax.xml.parsers.DocumentBuilder.parse(Unknown Source)
at org.jboss.deployment.XSLSubDeployer.findDd(XSLSubDeployer.java:215)
... 68 more
14:28:55,408 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038734#4038734
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038734
19 years
[Messaging, JMS & JBossMQ] - Failover scenario is not working
by sabdulkareem
Hi all,
I am trying to setup failover for our standalone applications(MessageSender and MessageReceiver) using JBoss Messaging.
I have created 3 nodes in my local machine to form a cluster like:
Message-Node0, Message-Node1,Message-Node2 and started the three nodes.
This is the ConnectionFactory properties I used for the Sender and Receiver applications:
jmsConnectionFactory.jndiInitialContextFactory=org.jnp.interfaces.NamingContextFactory
jmsConnectionFactory.jndiProviderUrl=jnp://localhost:1099
jmsConnectionFactory.jndiNameForJmsConnectionFactory=ConnectionFactory
I tested the following scenario:
1. Started the Receiver application (It is a 24x7 application)
2. Started the Sender application which sends text messages to the testDistributedQueue.
3. While publishing some messages I stopped the Messaging-node0 server.
4. The Sender and Receiver applications tries to get Connections using Recovery Algorithms.
I expected the messages will be published by getting connection(auto-discovery) using the other available nodes in the cluster(ie, node1 and node2)
But this is not happening.
This is because the application fails to discover the other nodes in the cluster.( We tried the same failover scenario for JbossMQ, that works fine.)
The application throws the following exception:
javax.naming.CommunicationException: Could not obtain connection to any of these urls: localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Failed to connect to server 10.212.65.25:1100 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 10.212.65.25:1100 [Root exception is java.net.ConnectException: Connection timed out: connect]] [Root exception is javax.naming.CommunicationException: Failed to connect to server localhost:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server localhost:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
If I use the port 1100 instead of 1099 the applications hanging (ie, the application does not throws any exception and also not publishing and receiving messages)
What could be the problem?
Do I need to setup anything to enable HAJNDI for each instance? Pls help.
Version Details:
Jboss 4.0.5
Jboss Messaging 1.2.0 sp1
Thanks in Advance!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038733#4038733
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038733
19 years
[Clustering/JBoss] - Re: Clustering and Load Balancing in Jboss-4.0.2 using Apach
by chillal.kishor
Actually DMWebSession which extends UserSession is having inner classes. They are also Serialized. There are 4 to 5 inner classes and each inner class contains public static final String variables.
Following is my DMWebSession class....I am creating the object of this and calling from login.jsp and settirng true or false.
----------DMWebSession.java-----------
public class DmWebSession extends UserSession {
private HttpSession session_;
private static final String SESSION_MGR = "SESSION_MANAGER";
public static DmWebSession getDmWebSession(HttpSession session) {
DmWebSession sessionMgr = null;
sessionMgr = (DmWebSession) session.getAttribute(SESSION_MGR);
if (sessionMgr == null) {
sessionMgr = new DmWebSession(session);
}
return sessionMgr;
}
private DmWebSession(HttpSession session) {
session.setAttribute(SESSION_MGR, this);
session_ = session;
}
protected Object getAttribute(String key) {
return session_.getAttribute(key);
}
protected void setAttribute(String key, Object value) {
session_.setAttribute(key, value);
}
protected void removeAttribute(String key) {
session_.removeAttribute(key);
}
public void invalidateSession() {
session_.invalidate();
session_ = null;
}
public void removeSelectedItems() {
//This class is also Serialized
UtilitiesBean util = new UtilitiesBean();
util.cleanSession(session_);
}
}
The classes which are imported is it necessary they should also be Serialized ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038730#4038730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038730
19 years