ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » IBM MQ Java / JMS » ResourceAdapterInternalException: max connections reached

Post new topic  Reply to topic
 ResourceAdapterInternalException: max connections reached « View previous topic :: View next topic » 
Author Message
smartz
PostPosted: Mon Feb 18, 2008 2:24 am    Post subject: ResourceAdapterInternalException: max connections reached Reply with quote

Newbie

Joined: 18 Feb 2008
Posts: 9

Hello,
I am writing an application to read messages from queues.
Everything seems to be working fine, but after a number of un-deployments and deployments I start getting the following exception and have no choice but to restart the application server.

Any hint on what the root cause might be?

Exception stack trace:
Code:

2008-02-15 14:47:19,095 WARN  [org.jboss.system.ServiceController:424] Problem starting service jboss.j2ee:ear=Application-1.0.ear,jar=Application-1.0.jar,name=MDB,service=EJB3
org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:wsmq/Q@@localhost; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: max connections reached)
   at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:53)
   at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:310)
   at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.start(JBossMessageEndpointFactory.java:194)
   at org.jboss.ejb3.mdb.MessagingContainer.startProxies(MessagingContainer.java:190)
   at org.jboss.ejb3.mdb.MessagingContainer.start(MessagingContainer.java:156)
   at org.jboss.ejb3.mdb.MDB.start(MDB.java:126)
   at sun.reflect.GeneratedMethodAccessor90.invoke(Unknown Source)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.jboss.ejb3.ServiceDelegateWrapper.startService(ServiceDelegateWrapper.java:103)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
   at sun.reflect.GeneratedMethodAccessor5.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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
   at $Proxy0.start(Unknown Source)
   at org.jboss.system.ServiceController.start(ServiceController.java:417)
   at org.jboss.system.ServiceController.start(ServiceController.java:435)
   at sun.reflect.GeneratedMethodAccessor10.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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy361.start(Unknown Source)
   at org.jboss.ejb3.JmxKernelAbstraction.install(JmxKernelAbstraction.java:120)
   at org.jboss.ejb3.Ejb3Deployment.registerEJBContainer(Ejb3Deployment.java:301)
   at org.jboss.ejb3.Ejb3Deployment.start(Ejb3Deployment.java:362)
   at org.jboss.ejb3.Ejb3Module.startService(Ejb3Module.java:91)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
   at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
   at sun.reflect.GeneratedMethodAccessor5.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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
   at $Proxy0.start(Unknown Source)
   at org.jboss.system.ServiceController.start(ServiceController.java:417)
   at sun.reflect.GeneratedMethodAccessor10.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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy34.start(Unknown Source)
   at org.jboss.ejb3.EJB3Deployer.start(EJB3Deployer.java:512)
   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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
   at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor.java:97)
   at org.jboss.system.InterceptorServiceMBeanSupport.invokeNext(InterceptorServiceMBeanSupport.java:238)
   at org.jboss.wsf.container.jboss42.DeployerInterceptor.start(DeployerInterceptor.java:87)
   at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
   at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy35.start(Unknown Source)
   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
   at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1015)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
   at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
   at sun.reflect.GeneratedMethodAccessor21.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:155)
   at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
   at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
   at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
   at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
   at $Proxy10.deploy(Unknown Source)
   at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:421)
   at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:634)
   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:263)
   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
   at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: javax.resource.spi.ResourceAdapterInternalException: max connections reached
   at com.ibm.mq.connector.ResourceAdapterConnectionPool.allocateConnection(ResourceAdapterConnectionPool.java:231)
   at com.ibm.mq.connector.ResourceAdapterImpl.endpointActivation(ResourceAdapterImpl.java:333)
   at org.jboss.resource.deployment.RARDeployment.endpointActivation(RARDeployment.java:271)
   at org.jboss.resource.deployment.RARDeployment.internalInvoke(RARDeployment.java:226)
   at org.jboss.system.ServiceDynamicMBeanSupport.invoke(ServiceDynamicMBeanSupport.java:156)
   at org.jboss.mx.server.RawDynamicInvoker.invoke(RawDynamicInvoker.java:164)
   at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
   at org.jboss.ejb3.JmxClientKernelAbstraction.invoke(JmxClientKernelAbstraction.java:44)
   at org.jboss.ejb3.mdb.inflow.JBossMessageEndpointFactory.activate(JBossMessageEndpointFactory.java:305)
   ... 101 more

............

ObjectName: jboss.j2ee:ear=Application-1.0.ear,jar=Application-1.0.jar,name=MDB,service=EJB3
  State: FAILED
  Reason: org.jboss.deployment.DeploymentException: Endpoint activation failed ra=jboss.jca:service=RARDeployment,name='wmq.jmsra.rar' activationSpec=javax.jms.Queue:wsmq/Q@@localhost; - nested throwable: (javax.resource.spi.ResourceAdapterInternalException: max connections reached)



My current configuration is:
- JBoss 4.2.2-GA (linux)
- WS MQ 6.0.2.2 (linux)

I have configured JBoss the following way:
- added wmq.jmsra.rar to the $JBOSS_SERVER/deploy directory
- added com.ibm.mqetclient.jar to the $JBOSS_SERVER/lib directory
- created $JBOSS_SERVER/deploy/wmq.jmsra-ds.xml as follows

Code:

<?xml version="1.0" encoding="UTF-8"?>

<connection-factories>

  <!-- mbeans defining JCA administered objects -->
  <mbean code="org.jboss.resource.deployment.AdminObject" name="jca.wmq:name=wsmqQ">
    <attribute name="JNDIName">wsmq/Q</attribute>
    <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='wmq.jmsra.rar'</depends>
    <attribute name="Type">javax.jms.Queue</attribute>
    <attribute name="Properties">
      baseQueueManagerName=QM1
      baseQueueName=Q
    </attribute>
  </mbean>

  <!-- JCA Connection factory definitions -->
  <tx-connection-factory>
    <jndi-name>MQCF</jndi-name>
    <xa-transaction />
    <rar-name>wmq.jmsra.rar</rar-name>
   <connection-definition>javax.jms.ConnectionFactory</connection-definition>
    <config-property name="channel" type="java.lang.String">SYSTEM.DEF.SVRCONN</config-property>
    <config-property name="hostName" type="java.lang.String">127.0.0.1</config-property>
    <config-property name="port" type="java.lang.String">1414</config-property>
    <config-property name="queueManager" type="java.lang.String">QM1</config-property>
    <config-property name="transportType" type="java.lang.String">CLIENT</config-property>
  </tx-connection-factory>



My java MDB (EJB3) is:

Code:

@MessageDriven(name = "MDB", activationConfig = {
        @ActivationConfigProperty(propertyName = "destination", propertyValue = "wsmq/Q"),
        @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
        @ActivationConfigProperty(propertyName = "transportType", propertyValue = "CLIENT"),
        @ActivationConfigProperty(propertyName = "useJNDI", propertyValue = "true"),
        @ActivationConfigProperty(propertyName = "maxPoolDepth", propertyValue = "1") }, messageListenerInterface = MessageListener.class)
@ResourceAdapter("wmq.jmsra.rar")
public class MDB implements MessageListener {

    public void onMessage(Message message) {
        return;
    }

}



Thanks in advance for any information!
cheers!
Back to top
View user's profile Send private message
jefflowrey
PostPosted: Mon Feb 18, 2008 3:58 am    Post subject: Reply with quote

Grand Poobah

Joined: 16 Oct 2002
Posts: 19981

Take this to your MQ administrator.
_________________
I am *not* the model of the modern major general.
Back to top
View user's profile Send private message
smartz
PostPosted: Mon Feb 18, 2008 4:38 am    Post subject: Reply with quote

Newbie

Joined: 18 Feb 2008
Posts: 9

jefflowrey wrote:
Take this to your MQ administrator.


hi jefflowrey, thanks for the response.
Could you please elaborate a little? what settings would the MQ Admin have to review?
I am asking because my idea is that this problem raises due to a mistake on my part (i.e. not closing connections correctly upon undeploying).
Evidence of this is that if I start jboss and deploy once I get no problems at all, all problems come when undeploying and redeploying: I have the impression that the undeploy does not close the connection and therefore multiple deploys "eat" up connections until the limit is reached, and that they are never freed.
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 18, 2008 5:59 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

smartz wrote:
jefflowrey wrote:
Take this to your MQ administrator.


hi jefflowrey, thanks for the response.
Could you please elaborate a little? what settings would the MQ Admin have to review?
I am asking because my idea is that this problem raises due to a mistake on my part (i.e. not closing connections correctly upon undeploying).
Evidence of this is that if I start jboss and deploy once I get no problems at all, all problems come when undeploying and redeploying: I have the impression that the undeploy does not close the connection and therefore multiple deploys "eat" up connections until the limit is reached, and that they are never freed.


Have you tried stopping the MDB services for the duration of the deploy?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smartz
PostPosted: Mon Feb 18, 2008 6:05 am    Post subject: Reply with quote

Newbie

Joined: 18 Feb 2008
Posts: 9

fjb_saper wrote:
smartz wrote:
jefflowrey wrote:
Take this to your MQ administrator.


hi jefflowrey, thanks for the response.
Could you please elaborate a little? what settings would the MQ Admin have to review?
I am asking because my idea is that this problem raises due to a mistake on my part (i.e. not closing connections correctly upon undeploying).
Evidence of this is that if I start jboss and deploy once I get no problems at all, all problems come when undeploying and redeploying: I have the impression that the undeploy does not close the connection and therefore multiple deploys "eat" up connections until the limit is reached, and that they are never freed.


Have you tried stopping the MDB services for the duration of the deploy?


Hi, how do I do that?
Are you mean stopping the MDBs themselves or the JBoss MDB service?
The MDBs themselves are stopped upon undeployment, so I would have nothing to stop upon redeployment; if you mean stopping the JBoss MDB service, could you please explain how this can be done?

thanks, bye
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Mon Feb 18, 2008 6:09 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

I mean stopping the JBOSS MDB Service.
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
smartz
PostPosted: Mon Feb 18, 2008 6:12 am    Post subject: Reply with quote

Newbie

Joined: 18 Feb 2008
Posts: 9

fjb_saper wrote:
I mean stopping the JBOSS MDB Service.


ok.
no, I haven't tried that, let me do it now.
I need to find a way to do it programmatically as the redeploys are performed by an ANT script, which is run by a continuous integration process (Hudson).

bye
Back to top
View user's profile Send private message
smartz
PostPosted: Thu Feb 28, 2008 8:22 am    Post subject: Reply with quote

Newbie

Joined: 18 Feb 2008
Posts: 9

hi

this is known to IBM as APAR IC54346 - fixed in pack 6.0.2.3
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » IBM MQ Java / JMS » ResourceAdapterInternalException: max connections reached
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.