[JBoss Messaging] New message: "Problem with cluster failover."
by Krystian Siuda
User development,
A new message was posted in the thread "Problem with cluster failover.":
http://community.jboss.org/message/518812#518812
Author : Krystian Siuda
Profile : http://community.jboss.org/people/ksiuda
Message:
--------------------------------------------------------------
Hi,
I'm crashtests of an JBoss cluster dedicated to be an JMS server.
I wrote an simple (2 threaded) JMS client that connects to the server and simultaneously sends&receives uniq messages checking …
[View More]whether they are duplicated/lost etc...
The scenario I'm currently stuck with is:
- i put 2 server nodes up
- i start the client (mentioned before)
- i see the traffic
- kill (sig kill) the 1st node
- i still see the traffic after failover
- kill (sig kill) the 2nd node
- the traffic stops
- after some time client starts to throw exceptions like:
javax.jms.IllegalStateException: The object is closed
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:157)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConsumerDelegate.receive(ClientConsumerDelegate.java)
at org.jboss.jms.client.JBossMessageConsumer.receive(JBossMessageConsumer.java:86)
at auto.Main.receive(Main.java:92)
at auto.Main.receiveWrap(Main.java:138)
at auto.Main$2.run(Main.java:195)
at java.lang.Thread.run(Thread.java:619)
- and after some more time:
javax.jms.JMSException: Maximum number of failover attempts exceeded. Cannot find a server to failover onto.
at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:234)
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:597)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
at auto.Main.receive(Main.java:86)
at auto.Main.receiveWrap(Main.java:138)
at auto.Main$2.run(Main.java:195)
at java.lang.Thread.run(Thread.java:619)
- i put the 1st node up
- client throws:
org.jboss.jms.exception.MessagingShutdownException: Cannot handle invocation since messaging server is not active (it is either starting up or shutting down)
at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:133)
at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:891)
at org.jboss.remoting.transport.socket.ServerThread.completeInvocation(ServerThread.java:744)
at org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:697)
at org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:551)
at org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:232)
at org.jboss.remoting.MicroRemoteClientInvoker.invoke(MicroRemoteClientInvoker.java:211)
at org.jboss.remoting.Client.invoke(Client.java:1724)
at org.jboss.remoting.Client.invoke(Client.java:629)
(...)
- after some time it throws:
org.jboss.jms.exception.MessagingJMSException: Failed to invoke
at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable(DelegateSupport.java:271)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionDelegate$aop(ClientConnectionFactoryDelegate.java:191)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.invokeTarget(ClientConnectionFactoryDelegate$createConnectionDelegate_N3019492359065420858.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:111)
at org.jboss.jms.client.container.StateCreationAspect.handleCreateConnectionDelegate(StateCreationAspect.java:81)
at org.jboss.aop.advice.org.jboss.jms.client.container.StateCreationAspect_z_handleCreateConnectionDelegate_26293492.invoke(StateCreationAspect_z_handleCreateConnectionDelegate_26293492.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate.createConnectionDelegate(ClientConnectionFactoryDelegate.java)
at org.jboss.jms.client.container.ClusteringAspect.handleCreateConnectionDelegate(ClusteringAspect.java:134)
at sun.reflect.GeneratedMethodAccessor47.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:122)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientClusteredConnectionFactoryDelegate.createConnectionDelegate(ClientClusteredConnectionFactoryDelegate.java)
at org.jboss.jms.client.JBossConnectionFactory.createConnectionInternal(JBossConnectionFactory.java:205)
at org.jboss.jms.client.JBossConnectionFactory.createConnection(JBossConnectionFactory.java:87)
(...)
- and finally the client start to listen again
Everything looks fine after that.
But all of the stacktraces come from the "receiver" thread. None of them come from "sender" thread.
And after all that fatal failovers none message can be send.
The "sender" thread is blocked. Here is the snapshoot from VisualVM:
(...)
"sender" prio=10 tid=0x8f62c800 nid=0x4a1a in Object.wait() [0x8f3c7000]
java.lang.Thread.State: WAITING (on object monitor)
at java.lang.Object.wait(Native Method)
- waiting on <0x947601a0> (a org.jboss.jms.client.container.ClosedInterceptor)
at java.lang.Object.wait(Object.java:485)
at org.jboss.jms.client.container.ClosedInterceptor.checkCloseAlreadyDone(ClosedInterceptor.java:245)
- locked <0x947601a0> (a org.jboss.jms.client.container.ClosedInterceptor)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:142)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientProducerDelegate.close(ClientProducerDelegate.java)
at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:306)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientSessionDelegate.closing(ClientSessionDelegate.java)
at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:305)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
at org.jboss.jms.client.FailoverCommandCenter.failureDetected(FailoverCommandCenter.java:208)
at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:124)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:269)
at org.jboss.aop.advice.org.jboss.jms.client.container.ProducerAspect_z_handleSend_26293492.invoke(ProducerAspect_z_handleSend_26293492.java)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:86)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:207)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
at auto.Main.send(Main.java:45)
at auto.Main.sendWrap(Main.java:70)
at auto.Main$1.run(Main.java:189)
at java.lang.Thread.run(Thread.java:619)
Locked ownable synchronizers:
- None
(...)
I'm using:
Java JRE 6 (build 1.6.0_17-b04)
JBossMessaging 1.4.3.GA
JBoss 5.1.0.GA
The client is ussing port 1099 to lookup the JNDI (is this significant?).
The client code is extended version of this: http://pastebin.com/m410ce7d0 (the connection is created and maintainted in the very same way as in this example)
Is it an configuration issue or jboss error?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518812#518812
[View Less]
15 years, 3 months
[Beginner's Corner] New message: "EJB3 access via servlet-invoker looses user credentials"
by Chris Russell
User development,
A new message was posted in the thread "EJB3 access via servlet-invoker looses user credentials":
http://community.jboss.org/message/518807#518807
Author : Chris Russell
Profile : http://community.jboss.org/people/crussell42
Message:
--------------------------------------------------------------
I am using the servlet-invoker.war method of accessing an SLSB via https.
Works great *until* my Swing client is idle for more than 60 seconds.
The next method the client tries to …
[View More]calls on the SLSB returns
Exception:Invalid User
I assume this is happening because of either a http session timeout,
socket or sslsocket time out.
As per http://community.jboss.org/message/368816#368816
I have tried changing the InvokerLocator to include ?timeout=300000&invokerDestructionDelay
Neither seems to help with this situation. Also tried adding this paramater to the RemoteBinding as well
Nothing seems to help.
What am I missing here. Why and where do I configure this 60 second dumping of the ejb inokers user credentials.
============================
The pertinent client code
securityClient = SecurityClientFactory.getSecurityClient();
securityClient.setSimple(username, password)
securityClient.login();
Properties props = new Properties();
props.put("java.naming.factory.initial", "org.jboss.naming.HttpNamingContextFactory");
props.put("java.naming.provider.url", "https://10.0.0.75:8443/invoker/JNDIFactory");
props.put("java.naming.factory.url.pkgs", "org.jboss.naming");
Context jndiContext = new InitialContext(props);
=============================
My SLSB has the following RemoteBinding:
@RemoteBinding(clientBindUrl = "https://10.0.0.75:8443/servlet-invoker/SSLServerInvokerServlet/?timeout=3...")
==============================
Here is my servlet-invoker-service.xml
<?xml version="1.0" encoding="UTF-8"?>
<server>
<mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=connector,transport=servlet"
display-name="Servlet transport Connector">
<attribute name="InvokerLocator">servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet/?timeout=300000&invokerDestructionDelay=300000</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>
<mbean code="org.jboss.remoting.transport.Connector" name="jboss.remoting:service=connector,transport=sslservlet"
display-name="Servlet transport Connector">
<attribute name="InvokerLocator">sslservlet://${jboss.bind.address}:8443/servlet-invoker/SSLServerInvokerServlet/?timeout=300000&invokerDestructionDelay=300000</attribute>
<attribute name="Configuration">
<handlers>
<handler subsystem="AOP">org.jboss.aspects.remoting.AOPRemotingInvocationHandler</handler>
</handlers>
</attribute>
</mbean>
</server>
=============================
Here is the deploy/servlet-invoker.war/WEB-INF/web.xml
<?xml version="1.0" encoding="UTF-8"?>
<!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>
<servlet>
<servlet-name>ServerInvokerServlet</servlet-name>
<description>The ServerInvokerServlet receives requests via HTTP
protocol from within a web container and passes it onto the
ServletServerInvoker for processing.
</description>
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
<param-name>locatorUrl</param-name>
<param-value>servlet://${jboss.bind.address}:8080/servlet-invoker/ServerInvokerServlet/?timeout=300000&invokerDestructionDelay=300000</param-value>
<description>The servlet server invoker</description>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet>
<servlet-name>SSLServerInvokerServlet</servlet-name>
<description>The ServerInvokerServlet receives requests via HTTPS
protocol from within a web container and passes it onto the
ServletServerInvoker for processing.
</description>
<servlet-class>org.jboss.remoting.transport.servlet.web.ServerInvokerServlet</servlet-class>
<init-param>
<param-name>locatorUrl</param-name>
<param-value>sslservlet://${jboss.bind.address}:8443/servlet-invoker/SSLServerInvokerServlet/?timeout=300000&invokerDestructionDelay=300000</param-value>
<description>The servlet server invoker</description>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>ServerInvokerServlet</servlet-name>
<url-pattern>/ServerInvokerServlet/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>SSLServerInvokerServlet</servlet-name>
<url-pattern>/SSLServerInvokerServlet/*</url-pattern>
</servlet-mapping>
</web-app>
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518807#518807
[View Less]
15 years, 3 months
[JBoss Microcontainer Development POJO Server] New message: "Re: StructureModificationChecker and Synch with VFS3"
by John Bailey
User development,
A new message was posted in the thread "StructureModificationChecker and Synch with VFS3":
http://community.jboss.org/message/518806#518806
Author : John Bailey
Profile : http://community.jboss.org/people/johnbailey
Message:
--------------------------------------------------------------
One option for the profile service to guarantee to have a VFS pointer to the original file is to mount the real filesystem pointing to the original file, but using a different VFS mount …
[View More]point. So if you have an archive like test.jar, you could mount it into a special VFS location managed by the profile service. This would allow the PS to always have a way to access the original.
File test = new File(uriToTestFile);
VirtualFile psCopy = VFS.getChild("/profileservice").getChild("test.jar");
VFS.mountReal(test, psCopy);
>From that point on you can always get the original through psCopy regardless of what mounting/over-mounting occurs during deployment.
This would help since there would then be no reason for the VFS or the deployers to try and manage what the original really is.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/518806#518806
[View Less]
15 years, 3 months