activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MQ Newbie <su...@sphsearch.sg>
Subject Re: Master/Slave Connection and Synchronization Error
Date Fri, 28 Dec 2007 05:26:08 GMT

Thanks. I have removed the networkConnectors. But i am still seeing the
following errors:

ERROR TransportConnector             - Could not accept connection : Broken
pipe
ERROR TransportConnector             - Could not accept connection : Broken
pipe
ERROR TransportConnector             - Could not accept connection : Broken
pipe





ttmdev wrote:
> 
> The configuration that you have provided has the broker connecting to
> itself. 
> 
> It has this transport connector
> 
> <transportConnector name="openwire" uri="tcp://localhost:61616"
> discoveryUri="multicast://default"/>
> 
> Followed by this network connector. 
> 
> <networkConnector name="host1 and host2"
> uri="static://(tcp://localhost:61616,tcp://host1:61616)" />
> 
> Note how the network and transport connector tcp uri's have the same host
> and port (i.e., localhost:61616). 
> 
> Before running your next test, try cleaning out your data directories. 
> 
> Joe
> 
> 
> 
> 
> 
> MQ Newbie wrote:
>> 
>> Hi,
>> 
>> I have setup the jms to work on the master/slave architecture. It works
>> fine on localhost Windows machine on 2 different ports. But i have the
>> errors when i run on 2 separate linux machine on the same port on both
>> the master and slave nodes.
>> 
>> The following  is the configuration that i hCoave used:
>> 
>>   <broker xmlns="http://activemq.org/config/1.0" brokerName="mq02"
>> dataDirectory="${activemq.base}/data">
>>   
>>     <!-- Destination specific policies using destination names or
>> wildcards -->
>>     <destinationPolicy>
>>       <policyMap>
>>         <policyEntries>
>> 
>>           <policyEntry topic="FOO.>" producerFlowControl="false"
>> memoryLimit="1mb">
>>             <dispatchPolicy>
>>               <strictOrderDispatchPolicy/>
>>             </dispatchPolicy>
>>             <subscriptionRecoveryPolicy>
>>               <lastImageSubscriptionRecoveryPolicy/>
>>             </subscriptionRecoveryPolicy>
>>           </policyEntry>
>> 
>>         </policyEntries>
>>       </policyMap>
>>     </destinationPolicy>
>> 
>> 
>>     <!-- The transport connectors ActiveMQ will listen to -->
>>     <transportConnectors>
>>        <transportConnector name="openwire" uri="tcp://localhost:61616"
>> discoveryUri="multicast://default"/>
>>        <transportConnector name="ssl"     uri="ssl://localhost:61617"/>
>>        <transportConnector name="stomp"   uri="stomp://localhost:61613"/>
>>        <transportConnector name="xmpp"    uri="xmpp://localhost:61222"/>
>>     </transportConnectors>
>> 
>>     <!-- The store and forward broker networks ActiveMQ will listen to
>> -->
>>     <networkConnectors>
>>       <!-- by default just auto discover the other brokers -->
>>        <networkConnector name="host1 and host2"
>> uri="static://(tcp://localhost:61616,tcp://host1:61616)" />
>>     </networkConnectors>
>> 
>> 
>>     <!-- Or if you want to use pure JDBC without a journal -->
>>     <persistenceAdapter>
>>         <jdbcPersistenceAdapter dataSource="#mysql-ds"/>
>>     </persistenceAdapter>
>>    
>>     <!--  Use the following to set the broker memory limit
>> 	<systemUsage>
>> 	            <systemUsage>
>> 		            <memoryUsage>
>> 	    	            	<memoryUsage limit="10 mb" percentUsageMinDelta="20"/>
>> 		            </memoryUsage>
>> 		            <tempUsage>
>> 	    	            	<tempUsage limit="100 mb"/>
>> 		            </tempUsage>
>> 		            <storeUsage>
>> 	    	            	<storeUsage limit="1 gb" name="foo"/>
>> 		            </storeUsage>
>> 	            </systemUsage>
>> 	    </systemUsage>
>>    -->
>>     
>>     <!-- Use the following to configure how ActiveMQ is exposed in JMX
>>     <managementContext>
>>        <managementContext connectorPort="1099"
>> jmxDomainName="org.apache.activemq"/>
>>     </managementContext>
>>     -->
>> 
>>   </broker>
>> 
>>   <!-- lets create a command agent to respond to message based admin
>> commands on the ActiveMQ.Agent topic -->
>>   <commandAgent xmlns="http://activemq.org/config/1.0"/>
>> 
>> 
>>   <!-- An embedded servlet engine for serving up the Admin console -->
>>   <jetty xmlns="http://mortbay.com/schemas/jetty/1.0">
>>     <connectors>
>>       <nioConnector port="8161" />
>>     </connectors>
>> 
>>     <handlers>
>>       <webAppContext contextPath="/admin"
>> resourceBase="${activemq.base}/webapps/admin" logUrlOnStart="true" />
>>       <webAppContext contextPath="/demo"
>> resourceBase="${activemq.base}/webapps/demo" logUrlOnStart="true" />
>>     </handlers>
>>   </jetty>
>> 
>> 
>> 
>>   <!-- MySql DataSource Sample Setup -->
>>   <bean id="mysql-ds" class="org.apache.commons.dbcp.BasicDataSource"
>> destroy-method="close">
>>     <property name="driverClassName" value="com.mysql.jdbc.Driver"/>
>>     <property name="url"
>> value="jdbc:mysql://dbhost/activemq?relaxAutoCommit=true"/>
>>     <property name="username" value="activemq"/>
>>     <property name="password" value="activemq"/>
>>     <property name="poolPreparedStatements" value="true"/>
>>   </bean>
>> 
>> 
>> 
>> Slave Node:
>> 
>> ERROR TransportConnector             - Could not accept connection : Peer
>> (vm://mq01#14) disposed.
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> 
>> 
>> Master Node:
>> 
>> INFO  BrokerService                  - Using Persistence Adapter:
>> JDBCPersistenceAdaptor(org.apache.commons.dbcp.BasicDataSource@5c95da38)
>> INFO  BrokerService                  - ActiveMQ 5.0.0 JMS Message Broker
>> (mq02) is starting
>> INFO  BrokerService                  - For help or more information
>> please see: http://activemq.apache.org/
>> INFO  ManagementContext              - JMX consoles can connect to
>> service:jmx:rmi:///jndi/rmi://localhost:1099/jmxrmi
>> INFO  JDBCPersistenceAdapter         - Database driver recognized:
>> [mysql-ab_jdbc_driver]
>> INFO  DefaultDatabaseLocker          - Attempting to acquire the
>> exclusive lock to become the Master broker
>> INFO  DefaultDatabaseLocker          - Becoming the master on dataSource:
>> org.apache.commons.dbcp.BasicDataSource@5c95da38
>> INFO  TransportServerThreadSupport   - Listening for connections at:
>> tcp://host2:61616
>> INFO  TransportConnector             - Connector openwire Started
>> INFO  TransportServerThreadSupport   - Listening for connections at:
>> ssl://host2:61617
>> INFO  TransportConnector             - Connector ssl Started
>> INFO  TransportServerThreadSupport   - Listening for connections at:
>> stomp://host2:61613
>> INFO  TransportConnector             - Connector stomp Started
>> INFO  TransportServerThreadSupport   - Listening for connections at:
>> xmpp://host2:61222
>> INFO  TransportConnector             - Connector xmpp Started
>> INFO  DiscoveryNetworkConnector      - Establishing network connection
>> between from vm://mq02 to tcp://localhost:61616
>> INFO  TransportConnector             - Connector vm://mq02 Started
>> INFO  DiscoveryNetworkConnector      - Establishing network connection
>> between from vm://mq02 to tcp://host1:61616
>> INFO  NetworkConnector               - Network Connector
>> org.apache.activemq.transport.discovery.simple.SimpleDiscoveryAgent@46b4be3d
>> Started
>> INFO  BrokerService                  - ActiveMQ JMS Message Broker (mq02,
>> ID:host2-38833-1198747174283-0:0) started
>> INFO  DemandForwardingBridge         - Disconnecting loop back
>> connection.
>> INFO  DemandForwardingBridge         - mq02 bridge to mq02 stopped
>> org.apache.activemq.transport.TransportDisposedIOException: Transport
>> disposed.
>>         at
>> org.apache.activemq.transport.vm.VMTransport.oneway(VMTransport.java:76)
>>         at
>> org.apache.activemq.transport.MutexTransport.oneway(MutexTransport.java:40)
>>         at
>> org.apache.activemq.transport.ResponseCorrelator.oneway(ResponseCorrelator.java:59)
>>         at
>> org.apache.activemq.network.DemandForwardingBridgeSupport.serviceRemoteCommand(DemandForwardingBridgeSupport.java:392)
>>         at
>> org.apache.activemq.network.DemandForwardingBridgeSupport$2.onCommand(DemandForwardingBridgeSupport.java:149)
>>         at
>> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
>>         at
>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>>         at
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:134)
>>         at
>> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:138)
>>         at
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:185)
>>         at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:172)
>>         at java.lang.Thread.run(Thread.java:619)
>> WARN  BrokerRegistry                 - Broker localhost not started so
>> using mq02 instead
>> INFO  TransportConnector             - Connector vm://localhost Started
>> INFO  DemandForwardingBridge         - Network connection between
>> vm://mq02#2 and tcp:///host1:61616(mq01) has been established.
>> INFO  log                            - Logging to
>> org.slf4j.impl.JCLLoggerAdapter(org.mortbay.log) via
>> org.mortbay.log.Slf4jLog
>> INFO  log                            - jetty-6.1.4
>> WARN  log                            - Can't reuse
>> /tmp/Jetty_0_0_0_0_8161_admin__admin__9l5s6p, using
>> /tmp/Jetty_0_0_0_0_8161_admin__admin__9l5s6p_235
>> INFO  WebConsoleStarter              - ActiveMQ WebConsole initialized.
>> INFO  /admin                         - Initializing Spring
>> FrameworkServlet 'dispatcher'
>> INFO  log                            - ActiveMQ Console at
>> http://0.0.0.0:8161/admin
>> WARN  log                            - Can't reuse
>> /tmp/Jetty_0_0_0_0_8161_demo__demo__uj3swb, using
>> /tmp/Jetty_0_0_0_0_8161_demo__demo__uj3swb_236
>> INFO  log                            - ActiveMQ Web Demos at
>> http://0.0.0.0:8161/demo
>> INFO  log                            - Started
>> SelectChannelConnector@0.0.0.0:8161
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR Service                        - Async error occurred:
>> javax.jms.JMSException: Durable consumer is in use for client:
>> NC_mq01_inboundmq02 and subscriptionName:
>> mq02_responseTopic@sg.sphsearch.dira.billing
>> javax.jms.JMSException: Durable consumer is in use for client:
>> NC_mq01_inboundmq02 and subscriptionName: mq02_responseTopic@com.billing
>>         at
>> org.apache.activemq.broker.region.TopicRegion.addConsumer(TopicRegion.java:75)
>>         at
>> org.apache.activemq.broker.region.RegionBroker.addConsumer(RegionBroker.java:338)
>>         at
>> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:85)
>>         at
>> org.apache.activemq.advisory.AdvisoryBroker.addConsumer(AdvisoryBroker.java:80)
>>         at
>> org.apache.activemq.broker.BrokerFilter.addConsumer(BrokerFilter.java:85)
>>         at
>> org.apache.activemq.broker.MutableBrokerFilter.addConsumer(MutableBrokerFilter.java:95)
>>         at
>> org.apache.activemq.broker.TransportConnection.processAddConsumer(TransportConnection.java:525)
>>         at
>> org.apache.activemq.command.ConsumerInfo.visit(ConsumerInfo.java:334)
>>         at
>> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:281)
>>         at
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:178)
>>         at
>> org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:100)
>>         at
>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:67)
>>         at
>> org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:202)
>>         at
>> org.apache.activemq.thread.DedicatedTaskRunner.runTask(DedicatedTaskRunner.java:98)
>>         at
>> org.apache.activemq.thread.DedicatedTaskRunner$1.run(DedicatedTaskRunner.java:36)
>> INFO  DemandForwardingBridge         - Network connection between
>> vm://mq02#6 and tcp:///host1:61616 shutdown due to a local error:
>> javax.jms.JMSException: Durable consumer is in use for client:
>> NC_mq01_inboundmq02 and subscriptionName: mq02_responseTopic@com.billing
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> ERROR TransportConnector             - Could not accept connection :
>> Broken pipe
>> 
>> 
>> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Master-Slave-Connection-and-Synchronization-Error-tp14511158s2354p14522430.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message