java - Getting TransportDisposedIOException : Peer (vm://ipaddress#3) disposed. in active MQ -
i used sample code implement active mq http://www.tomcatexpert.com/blog/2010/12/20/integrating-activemq-tomcat-using-global-jndi#ex-tomcat-server-xml.
able send , receive message tomcat server.
now required implement shared file system master slave. have followed steps below change activemq.xml configuration
added networkconnector , transportconnector in activemq.xml
<networkconnectors> <networkconnector name="my queue" uri="static://(tcp://172.16.121.144:61616,tcp://172.16.121.146:61616)" /> </networkconnectors> <transportconnectors> <transportconnector name="openwire" uri="tcp://172.16.121.144:61616"/> </transportconnectors>
activemq.xml
<?xml version="1.0"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core" xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xsi:schemalocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd http://activemq.apache.org/schema/core http://activemq.apache.org/schema/core/activemq-core-5.3.0.xsd"> <bean class="org.springframework.beans.factory.config.propertyplaceholderconfigurer" /> <broker xmlns="http://activemq.apache.org/schema/core" brokername="172.16.121.144" datadirectory="\\172.16.121.145\shared doc\amq\activemq\activemq-data" schedulersupport="false" usejmx="true"> <destinationpolicy> <policymap> <policyentries> <policyentry topic=">"> <pendingsubscriberpolicy> <vmcursor /> </pendingsubscriberpolicy> </policyentry> <policyentry queue=">"> <pendingqueuepolicy> <vmqueuecursor /> </pendingqueuepolicy> </policyentry> </policyentries> </policymap> </destinationpolicy> <managementcontext> <managementcontext createconnector="false"/> </managementcontext> <networkconnectors> <networkconnector name="my queue" uri="static://(tcp://172.16.121.144:61616,tcp://172.16.121.146:61616)" /> </networkconnectors> <persistenceadapter> <kahadb directory="\\172.16.121.145\shared doc\amq\activemq\activemq-data\kahadb"/> </persistenceadapter> <systemusage> <systemusage> <memoryusage> <memoryusage limit="128 mb"/> </memoryusage> <storeusage> <storeusage limit="1 gb"/> </storeusage> <tempusage> <tempusage limit="100 mb"/> </tempusage> </systemusage> </systemusage> <transportconnectors> <transportconnector name="openwire" uri="tcp://172.16.121.144:61616"/> </transportconnectors> </broker> </beans>
getting below exception
info - contextloader - root webapplicationcontext: initialization started info - xmlwebapplicationcontext - refreshing root webapplicationcontext: startup date [tue aug 20 12:31:15 ist 2013]; root of context hierarchy info - xmlbeandefinitionreader - loading xml bean definitions servletcontext resource [/web-inf/spring/jms-context.xml] info - defaultlistablebeanfactory - pre-instantiating singletons in org.springframework.beans.factory.support.defaultlistablebeanfactory@bc6a12:defining beans [connectionfactory,fooqueue,singleconnectionfactory,jmstemplate,messagesenderservice,jmsmessagedelegate,mymessagelistener,org.springfra mework.jms.listener.defaultmessagelistenercontainer#0]; root of factory hierarchy info - defaultlifecycleprocessor - starting beans in phase 2147483647 info - defaultlistablebeanfactory - pre-instantiating singletons in org.springframework.beans.factory.support.defaultlistablebeanfactory@1bc3ec9: defining beans [org.springframework.beans.factory.config.propertyplaceholderconfigurer#0,org.apache.activemq.xbean.xbeanbrokerservice#0]; root of factory hierarchy info - brokerservice - using persistence adapter: kahadbpersistenceadapter[\\172.16.121.145\shareddoc\amq\activemq\activemq-data\ka hadb] info - brokerservice - activemq 5.4.1 jms message broker (172.16.121.144) starting info - brokerservice - or more information please see: http://activemq.apache.org/ info - transportserverthreadsupport - listening connections at: tcp://01hw385526:61616 info - transportconnector - connector openwire started info - discoverynetworkconnector - establishing network connection vm://172.16.121.144?async=false&network=true tcp://172.16.121.144:616 16 info - transportconnector - connector vm://172.16.121.144 started info - discoverynetworkconnector - establishing network connection vm://172.16.121.144?async=false&network=true tcp://172.16.121.146:616 16 info - demandforwardingbridgesupport - 172.16.121.144 bridge 172.16.121.144 stopped info - transport - transport failed: org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#3) di sposed. org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#3) disposed. @ org.apache.activemq.transport.vm.vmtransport.stop(vmtransport.java:159) @ org.apache.activemq.transport.vm.vmtransportserver$1.stop(vmtransportserver.java:81) @ org.apache.activemq.transport.transportfilter.stop(transportfilter.java:65) @ org.apache.activemq.transport.transportfilter.stop(transportfilter.java:65) @ org.apache.activemq.transport.responsecorrelator.stop(responsecorrelator.java:132) @ org.apache.activemq.util.servicesupport.dispose(servicesupport.java:43) @ org.apache.activemq.network.discoverynetworkconnector.onserviceadd(discoverynetworkconnector.java:137) @ org.apache.activemq.transport.discovery.simple.simplediscoveryagent.start(simplediscoveryagent.java:77) @ org.apache.activemq.network.discoverynetworkconnector.handlestart(discoverynetworkconnector.java:186) @ org.apache.activemq.network.networkconnector$1.dostart(networkconnector.java:61) @ org.apache.activemq.util.servicesupport.start(servicesupport.java:53) @ org.apache.activemq.network.networkconnector.start(networkconnector.java:202) @ org.apache.activemq.broker.brokerservice.startallconnectors(brokerservice.java:2094) @ org.apache.activemq.broker.brokerservice.start(brokerservice.java:518) @ org.apache.activemq.xbean.xbeanbrokerservice.afterpropertiesset(xbeanbrokerservice.java:60) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokecustominitmethod(abstractautowirecapablebeanfactory.java :1581) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.invokeinitmethods(abstractautowirecapablebeanfactory.java:1522 ) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.initializebean(abstractautowirecapablebeanfactory.java:1452) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.docreatebean(abstractautowirecapablebeanfactory.java:519) @ org.springframework.beans.factory.support.abstractautowirecapablebeanfactory.createbean(abstractautowirecapablebeanfactory.java:456) @ org.springframework.beans.factory.support.abstractbeanfactory$1.getobject(abstractbeanfactory.java:294) @ org.springframework.beans.factory.support.defaultsingletonbeanregistry.getsingleton(defaultsingletonbeanregistry.java:225) @ org.springframework.beans.factory.support.abstractbeanfactory.dogetbean(abstractbeanfactory.java:291) @ org.springframework.beans.factory.support.abstractbeanfactory.getbean(abstractbeanfactory.java:193) @ org.springframework.beans.factory.support.defaultlistablebeanfactory.preinstantiatesingletons(defaultlistablebeanfactory.java:585) @ org.springframework.context.support.abstractapplicationcontext.finishbeanfactoryinitialization(abstractapplicationcontext.java:913) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:464) @ org.apache.xbean.spring.context.resourcexmlapplicationcontext.<init>(resourcexmlapplicationcontext.java:64) @ org.apache.xbean.spring.context.resourcexmlapplicationcontext.<init>(resourcexmlapplicationcontext.java:52) @ org.apache.activemq.xbean.xbeanbrokerfactory.createapplicationcontext(xbeanbrokerfactory.java:96) @ org.apache.activemq.xbean.xbeanbrokerfactory.createbroker(xbeanbrokerfactory.java:52) @ org.apache.activemq.broker.brokerfactory.createbroker(brokerfactory.java:71) @ org.apache.activemq.broker.brokerfactory.createbroker(brokerfactory.java:54) @ org.apache.activemq.transport.vm.vmtransportfactory.docompositeconnect(vmtransportfactory.java:121) @ org.apache.activemq.transport.vm.vmtransportfactory.doconnect(vmtransportfactory.java:53) @ org.apache.activemq.transport.transportfactory.doconnect(transportfactory.java:51) @ org.apache.activemq.transport.transportfactory.connect(transportfactory.java:80) @ org.apache.activemq.activemqconnectionfactory.createtransport(activemqconnectionfactory.java:243) @ org.apache.activemq.activemqconnectionfactory.createactivemqconnection(activemqconnectionfactory.java:258) @ org.apache.activemq.activemqconnectionfactory.createactivemqconnection(activemqconnectionfactory.java:230) @ org.apache.activemq.activemqconnectionfactory.createconnection(activemqconnectionfactory.java:178) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:601) @ org.springframework.aop.support.aoputils.invokejoinpointusingreflection(aoputils.java:318) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:196) @ $proxy4.createconnection(unknown source) @ org.springframework.jms.support.jmsaccessor.createconnection(jmsaccessor.java:184) @ org.springframework.jms.listener.abstractjmslisteningcontainer.createsharedconnection(abstractjmslisteningcontainer.java:404) @ org.springframework.jms.listener.abstractjmslisteningcontainer.establishsharedconnection(abstractjmslisteningcontainer.java:372) @ org.springframework.jms.listener.defaultmessagelistenercontainer.establishsharedconnection(defaultmessagelistenercontainer.java:760) @ org.springframework.jms.listener.abstractjmslisteningcontainer.dostart(abstractjmslisteningcontainer.java:279) @ org.springframework.jms.listener.abstractjmslisteningcontainer.start(abstractjmslisteningcontainer.java:264) @ org.springframework.jms.listener.defaultmessagelistenercontainer.start(defaultmessagelistenercontainer.java:561) @ org.springframework.context.support.defaultlifecycleprocessor.dostart(defaultlifecycleprocessor.java:167) @ org.springframework.context.support.defaultlifecycleprocessor.access$1(defaultlifecycleprocessor.java:154) @ org.springframework.context.support.defaultlifecycleprocessor$lifecyclegroup.start(defaultlifecycleprocessor.java:339) @ org.springframework.context.support.defaultlifecycleprocessor.startbeans(defaultlifecycleprocessor.java:143) @ org.springframework.context.support.defaultlifecycleprocessor.onrefresh(defaultlifecycleprocessor.java:108) @ org.springframework.context.support.abstractapplicationcontext.finishrefresh(abstractapplicationcontext.java:926) @ org.springframework.context.support.abstractapplicationcontext.refresh(abstractapplicationcontext.java:467) @ org.springframework.web.context.contextloader.configureandrefreshwebapplicationcontext(contextloader.java:385) @ org.springframework.web.context.contextloader.initwebapplicationcontext(contextloader.java:284) @ org.springframework.web.context.contextloaderlistener.contextinitialized(contextloaderlistener.java:111) @ org.apache.catalina.core.standardcontext.listenerstart(standardcontext.java:4779) @ org.apache.catalina.core.standardcontext.startinternal(standardcontext.java:5273) @ org.apache.catalina.util.lifecyclebase.start(lifecyclebase.java:150) @ org.apache.catalina.core.containerbase.addchildinternal(containerbase.java:897) @ org.apache.catalina.core.containerbase.addchild(containerbase.java:873) @ org.apache.catalina.core.standardhost.addchild(standardhost.java:615) @ org.apache.catalina.startup.hostconfig.deploywar(hostconfig.java:958) @ org.apache.catalina.startup.hostconfig$deploywar.run(hostconfig.java:1599) @ java.util.concurrent.executors$runnableadapter.call(executors.java:471) @ java.util.concurrent.futuretask$sync.innerrun(futuretask.java:334) @ java.util.concurrent.futuretask.run(futuretask.java:166) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722) info - transportconnector - connector vm://172.16.121.144 stopped info - demandforwardingbridgesupport - network connection between vm://172.16.121.144#2 , tcp://172.16.121.146:61616 shutdown due local error : org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#2) disposed. info - demandforwardingbridgesupport - 172.16.121.144 bridge unknown stopped info - networkconnector - network connector queue started info - brokerservice - activemq jms message broker (172.16.121.144, id:01hw385526-51685-1376982077589-0:0) started info - transportconnector - connector vm://localhost started info - contextloader - root webapplicationcontext: initialization completed in 3479 ms info - dispatcherservlet - frameworkservlet 'jms-webapp': initialization started info - xmlwebapplicationcontext - refreshing webapplicationcontext namespace 'jms-webapp-servlet': startup date [tue aug 20 12:31:18 ist 20 13]; parent: root webapplicationcontext info - xmlbeandefinitionreader - loading xml bean definitions servletcontext resource [/web-inf/jms-webapp-servlet.xml] info - defaultlistablebeanfactory - pre-instantiating singletons in org.springframework.beans.factory.support.defaultlistablebeanfactory@e975db: defining beans [jmsmessagesendercontroller,org.springframework.context.annotation.internalconfigurationannotationprocessor,org.springframework.context .annotation.internalautowiredannotationprocessor,org.springframework.context.annotation.internalrequiredannotationprocessor,org.springframework.contex t.annotation.internalcommonannotationprocessor,org.springframework.web.servlet.mvc.annotation.annotationmethodhandleradapter#0,org.springframework.web .servlet.view.internalresourceviewresolver#0,org.springframework.context.annotation.configurationclasspostprocessor$importawarebeanpostprocessor#0]; p arent: org.springframework.beans.factory.support.defaultlistablebeanfactory@bc6a12 info - defaultannotationhandlermapping - mapped url path [/send.html] onto handler 'jmsmessagesendercontroller' info - dispatcherservlet - frameworkservlet 'jms-webapp': initialization completed in 375 ms aug 20, 2013 12:31:19 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory c:\apache-tomcat-7.0.25\webapps\docs aug 20, 2013 12:31:19 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory c:\apache-tomcat-7.0.25\webapps\examples aug 20, 2013 12:31:19 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory c:\apache-tomcat-7.0.25\webapps\host-manager aug 20, 2013 12:31:19 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory c:\apache-tomcat-7.0.25\webapps\manager aug 20, 2013 12:31:19 pm org.apache.catalina.startup.hostconfig deploydirectory info: deploying web application directory c:\apache-tomcat-7.0.25\webapps\root aug 20, 2013 12:31:19 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["http-bio-8080"] aug 20, 2013 12:31:19 pm org.apache.coyote.abstractprotocol start info: starting protocolhandler ["ajp-bio-8009"] aug 20, 2013 12:31:19 pm org.apache.catalina.startup.catalina start info: server startup in 4825 ms info - discoverynetworkconnector - establishing network connection vm://172.16.121.144?async=false&network=true tcp://172.16.121.146:616 16 info - transportconnector - connector vm://172.16.121.144 started info - transport - transport failed: org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#7) di sposed. org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#7) disposed. @ org.apache.activemq.transport.vm.vmtransport.stop(vmtransport.java:159) @ org.apache.activemq.transport.vm.vmtransportserver$1.stop(vmtransportserver.java:81) @ org.apache.activemq.transport.transportfilter.stop(transportfilter.java:65) @ org.apache.activemq.transport.transportfilter.stop(transportfilter.java:65) @ org.apache.activemq.transport.responsecorrelator.stop(responsecorrelator.java:132) @ org.apache.activemq.util.servicesupport.dispose(servicesupport.java:43) @ org.apache.activemq.network.discoverynetworkconnector.onserviceadd(discoverynetworkconnector.java:137) @ org.apache.activemq.transport.discovery.simple.simplediscoveryagent$1.run(simplediscoveryagent.java:164) @ java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1110) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:603) @ java.lang.thread.run(thread.java:722) info - demandforwardingbridgesupport - network connection between vm://172.16.121.144#6 , tcp://172.16.121.146:61616 shutdown due local error : org.apache.activemq.transport.transportdisposedioexception: peer (vm://172.16.121.144#6) disposed. info - transportconnector - connector vm://172.16.121.144 stopped info - demandforwardingbridgesupport - 172.16.121.144 bridge unknown stopped
Comments
Post a Comment