Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

aragoubi
I have an embedded broker, and I am connection a Paho client to it.
This my broker config file :

  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true" useShutdownHook="false" brokerName="mimo.broker1">

     <managementContext>
       
       <managementContext createConnector="false"/>
     </managementContext>

    <persistenceAdapter>
       <kahaDB directory="activemq-data/kahadb"/>
     </persistenceAdapter>

    <transportConnectors>
      <transportConnector name="mimo.broker1" uri="tcp://0.0.0.0:61616?transport.useKeepAlive=true"/>
     <transportConnector name="tcp" uri="tcp://0.0.0.0:61619?transport.useKeepAlive=true"/>
   
  </broker> 


I am getting this error when I try to connect my paho java client to my broker via the "tcp://0.0.0.0:61619" transport port.

Here is the server log :

10:39:39,328 DEBUG [org.apache.activemq.transport.WireFormatNegotiator] (ActiveMQ BrokerService[mimo.broker1] Task-3) Sending: WireFormatInfo { version=12, properties={MaxFrameSize=9223372036854775807, CacheSize=1024, ProviderVersion=5.14.3, CacheEnabled=true, ProviderName=ActiveMQ, SizePrefixDisabled=false, PlatformDetails=JVM: 1.7.0_79, 24.79-b02, Oracle Corporation, OS: Windows 8.1, 6.3, amd64, MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true, MaxInactivityDuration=30000, TightEncodingEnabled=true, StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
10:39:39,334 DEBUG [org.apache.activemq.broker.TransportConnection.Transport] (ActiveMQ Transport: tcp:///192.168.0.116:61000@61619) Transport Connection to: tcp://192.168.0.116:61000 failed: java.io.IOException: Unknown data type: 77: java.io.IOException: Unknown data type: 77
        at org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(OpenWireFormat.java:359) [activemq-client-5.14.3.jar:5.14.3]
        at org.apache.activemq.openwire.OpenWireFormat.unmarshal(OpenWireFormat.java:278) [activemq-client-5.14.3.jar:5.14.3]
        at org.apache.activemq.transport.tcp.TcpTransport.readCommand(TcpTransport.java:240) [activemq-client-5.14.3.jar:5.14.3]
        at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232) [activemq-client-5.14.3.jar:5.14.3]
        at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215) [activemq-client-5.14.3.jar:5.14.3]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

10:39:39,349 DEBUG [org.apache.activemq.broker.jmx.ManagementContext] (ActiveMQ Transport: tcp:///192.168.0.116:61000@61619) Unregistering MBean org.apache.activemq:type=Broker,brokerName=mimo.broker1,connector=clientConnectors,connectorName=tcp,connectionViewType=remoteAddress,connectionName=tcp_//192.168.0.116_61000
10:39:39,349 DEBUG [org.apache.activemq.broker.TransportConnection] (ActiveMQ BrokerService[mimo.broker1] Task-1) Stopping connection: tcp://192.168.0.116:61000
10:39:39,365 DEBUG [org.apache.activemq.transport.tcp.TcpTransport] (ActiveMQ BrokerService[mimo.broker1] Task-1) Stopping transport tcp:///192.168.0.116:61000@61619
10:39:39,365 DEBUG [org.apache.activemq.thread.TaskRunnerFactory] (ActiveMQ BrokerService[mimo.broker1] Task-1) Initialized TaskRunnerFactory[ActiveMQ Task] using ExecutorService: java.util.concurrent.ThreadPoolExecutor@1703f9d4[Running, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
10:39:39,365 DEBUG [org.apache.activemq.transport.tcp.TcpTransport] (ActiveMQ Task-1) Closed socket Socket[addr=/192.168.0.116,port=61000,localport=61619]
10:39:39,365 DEBUG [org.apache.activemq.util.ThreadPoolUtils] (ActiveMQ BrokerService[mimo.broker1] Task-1) Forcing shutdown of ExecutorService: java.util.concurrent.ThreadPoolExecutor@1703f9d4[Running, pool size = 1, active threads = 1, queued tasks = 0, completed tasks = 0]
10:39:39,365 DEBUG [org.apache.activemq.broker.TransportConnection] (ActiveMQ BrokerService[mimo.broker1] Task-1) Stopped transport: tcp://192.168.0.116:61000
10:39:39,365 DEBUG [org.apache.activemq.broker.TransportConnection] (ActiveMQ BrokerService[mimo.broker1] Task-1) Connection Stopped: tcp://192.168.0.116:61000
10:39:43,235 DEBUG [org.apache.activemq.store.kahadb.MessageDatabase] (ActiveMQ Journal Checkpoint Worker) Checkpoint started.
10:39:43,313 DEBUG [org.apache.activemq.store.kahadb.MessageDatabase] (ActiveMQ Journal Checkpoint Worker) Checkpoint done.


Could someone help me with this ?
Reply | Threaded
Open this post in threaded view
|

Re: Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

Tim Bain
The TCP transport speaks OpenWire, so it's not valid to connect to it with
an MQTT client.

Tim

On May 18, 2017 3:07 AM, "aragoubi" <[hidden email]> wrote:

I have an embedded broker, and I am connection a Paho client to it.
This my broker config file :

  <broker xmlns="http://activemq.apache.org/schema/core" useJmx="true"
useShutdownHook="false" brokerName="mimo.broker1">

     <managementContext>

       <managementContext createConnector="false"/>
     </managementContext>

    <persistenceAdapter>
       <kahaDB directory="activemq-data/kahadb"/>
     </persistenceAdapter>

    <transportConnectors>
      <transportConnector name="mimo.broker1"
uri="tcp://0.0.0.0:61616?transport.useKeepAlive=true"/>
     <transportConnector name="tcp"
uri="tcp://0.0.0.0:61619?transport.useKeepAlive=true"/>

  </broker>


I am getting this error when I try to connect my paho java client to my
broker via the "tcp://0.0.0.0:61619" transport port.

Here is the server log :

10:39:39,328 DEBUG [org.apache.activemq.transport.WireFormatNegotiator]
(ActiveMQ BrokerService[mimo.broker1] Task-3) Sending: WireFormatInfo {
version=12, properties={MaxFrameSize=9223372036854775807, CacheSize=1024,
ProviderVersion=5.14.3, CacheEnabled=true, ProviderName=ActiveMQ,
SizePrefixDisabled=false, PlatformDetails=JVM: 1.7.0_79, 24.79-b02, Oracle
Corporation, OS: Windows 8.1, 6.3, amd64,
MaxInactivityDurationInitalDelay=10000, TcpNoDelayEnabled=true,
MaxInactivityDuration=30000, TightEncodingEnabled=true,
StackTraceEnabled=true}, magic=[A,c,t,i,v,e,M,Q]}
10:39:39,334 DEBUG
[org.apache.activemq.broker.TransportConnection.Transport] (ActiveMQ
Transport: tcp:///192.168.0.116:61000@61619) Transport Connection to:
tcp://192.168.0.116:61000 failed: java.io.IOException: Unknown data type:
77: java.io.IOException: Unknown data type: 77
        at
org.apache.activemq.openwire.OpenWireFormat.doUnmarshal(
OpenWireFormat.java:359)
[activemq-client-5.14.3.jar:5.14.3]
        at
org.apache.activemq.openwire.OpenWireFormat.unmarshal(
OpenWireFormat.java:278)
[activemq-client-5.14.3.jar:5.14.3]
        at
org.apache.activemq.transport.tcp.TcpTransport.readCommand(
TcpTransport.java:240)
[activemq-client-5.14.3.jar:5.14.3]
        at
org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:232)
[activemq-client-5.14.3.jar:5.14.3]
        at
org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)
[activemq-client-5.14.3.jar:5.14.3]
        at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_79]

10:39:39,349 DEBUG [org.apache.activemq.broker.jmx.ManagementContext]
(ActiveMQ Transport: tcp:///192.168.0.116:61000@61619) Unregistering MBean
org.apache.activemq:type=Broker,brokerName=mimo.broker1,connector=
clientConnectors,connectorName=tcp,connectionViewType=
remoteAddress,connectionName=tcp_//192.168.0.116_61000
10:39:39,349 DEBUG [org.apache.activemq.broker.TransportConnection]
(ActiveMQ BrokerService[mimo.broker1] Task-1) Stopping connection:
tcp://192.168.0.116:61000
10:39:39,365 DEBUG [org.apache.activemq.transport.tcp.TcpTransport]
(ActiveMQ BrokerService[mimo.broker1] Task-1) Stopping transport
tcp:///192.168.0.116:61000@61619
10:39:39,365 DEBUG [org.apache.activemq.thread.TaskRunnerFactory] (ActiveMQ
BrokerService[mimo.broker1] Task-1) Initialized TaskRunnerFactory[ActiveMQ
Task] using ExecutorService:
java.util.concurrent.ThreadPoolExecutor@1703f9d4[Running, pool size = 0,
active threads = 0, queued tasks = 0, completed tasks = 0]
10:39:39,365 DEBUG [org.apache.activemq.transport.tcp.TcpTransport]
(ActiveMQ Task-1) Closed socket
Socket[addr=/192.168.0.116,port=61000,localport=61619]
10:39:39,365 DEBUG [org.apache.activemq.util.ThreadPoolUtils] (ActiveMQ
BrokerService[mimo.broker1] Task-1) Forcing shutdown of ExecutorService:
java.util.concurrent.ThreadPoolExecutor@1703f9d4[Running, pool size = 1,
active threads = 1, queued tasks = 0, completed tasks = 0]
10:39:39,365 DEBUG [org.apache.activemq.broker.TransportConnection]
(ActiveMQ BrokerService[mimo.broker1] Task-1) Stopped transport:
tcp://192.168.0.116:61000
10:39:39,365 DEBUG [org.apache.activemq.broker.TransportConnection]
(ActiveMQ BrokerService[mimo.broker1] Task-1) Connection Stopped:
tcp://192.168.0.116:61000
10:39:43,235 DEBUG [org.apache.activemq.store.kahadb.MessageDatabase]
(ActiveMQ Journal Checkpoint Worker) Checkpoint started.
10:39:43,313 DEBUG [org.apache.activemq.store.kahadb.MessageDatabase]
(ActiveMQ Journal Checkpoint Worker) Checkpoint done.


Could someone help me with this ?




--
View this message in context: http://activemq.2283324.n4.
nabble.com/Could-not-accept-connection-from-tcp-192-168-0-
116-60999-org-apache-activemq-transport-InactivityIOE9-tp4726323.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: Could not accept connection from tcp://192.168.0.116:60999 : org.apache.activemq.transport.InactivityIOException: Cannot send, channel has already failed: tcp://192.168.0.116:60999

aragoubi
This post was updated on .
Thank you Tim for your response.
When I add mqtt transport connector to my broker-config " <transportConnector name="mqtt" uri="mqtt://0.0.0.0:1884?transport.useKeepAlive=true"/> " and I try to connect to it using apache paho java client, I am getting this exception :

Exception in thread "main" java.lang.IllegalArgumentException: mqtt://0.0.0.0:1884
        at org.eclipse.paho.client.mqttv3.MqttConnectOptions.validateURI(MqttConnectOptions.java:509)
        at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:291)
        at org.eclipse.paho.client.mqttv3.MqttAsyncClient.<init>(MqttAsyncClient.java:185)
        at client.Client.main(Client.java:46)

Also I still have problem with paho java client and activemq websocket(http://activemq.2283324.n4.nabble.com/Connection-to-activemq-broker-is-lost-within-one-second-td4726204.html), I am kind of blocked and I can't progress.

Is activemq supporting apache paho client ?