You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by ba...@wellsfargo.com on 2014/08/18 15:45:07 UTC

Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

User is trying to client connect over TCP/IP to an ActiveMQ broker with the correct hostname and password, but receiving the following error:

Can not Connect to ActiveMQ  The operation is not allowed on non-connected sockets




RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by artnaseef <ar...@artnaseef.com>.
I probably do not need the version.  I recommend using tcpdump, wireshark, or
the like to watch the TCP/IP traffic.

Is there anything logged by the broker?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684760.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by Timothy Bish <ta...@gmail.com>.
On 08/20/2014 09:36 AM, barry.barnett@wellsfargo.com wrote:
> 09:17:26,243 | WARN  | 4.40:65230@62716 | TransportConnection              | 97 - org.apache.activemq.activemq-osgi - 5.10.0 | Failed to add Connection ID: -635441230433329227-1:1
> java.lang.SecurityException: User name [null] or password is invalid.
>
> How do I specify the username/pw in the connection info  activemq:tcp://localhost:61616?  Where do I specify username/pw?

Just pass them as parameters to the create method in NMSConnectionFactory:

factory.CreateConnection(username, password)

> ----------------------------
>
>
>
>
>
> Subject: RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets
>
> It happens when they try to connect to the broker...  they never actually connect.  You still need the NMS version?
>
>
>
> -----Original Message-----
> From: artnaseef [mailto:art@artnaseef.com]
> Sent: Tuesday, August 19, 2014 9:39 AM
> To: users@activemq.apache.org
> Subject: RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets
>
> Looks like it must connect in order to hit that line of code, so this most likely means a socket connection created and dropped very quickly - either by the broker, or the network.
>
>
>
>
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684747.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>


-- 
Tim Bish
Sr Software Engineer | RedHat Inc.
tim.bish@redhat.com | www.redhat.com
skype: tabish121 | twitter: @tabish121
blog: http://timbish.blogspot.com/


RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by ba...@wellsfargo.com.
09:17:26,243 | WARN  | 4.40:65230@62716 | TransportConnection              | 97 - org.apache.activemq.activemq-osgi - 5.10.0 | Failed to add Connection ID: -635441230433329227-1:1
java.lang.SecurityException: User name [null] or password is invalid.

How do I specify the username/pw in the connection info  activemq:tcp://localhost:61616?  Where do I specify username/pw?

----------------------------





Subject: RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

It happens when they try to connect to the broker...  they never actually connect.  You still need the NMS version?



-----Original Message-----
From: artnaseef [mailto:art@artnaseef.com] 
Sent: Tuesday, August 19, 2014 9:39 AM
To: users@activemq.apache.org
Subject: RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Looks like it must connect in order to hit that line of code, so this most likely means a socket connection created and dropped very quickly - either by the broker, or the network.







--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684747.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by ba...@wellsfargo.com.
It happens when they try to connect to the broker...  they never actually connect.  You still need the NMS version?



-----Original Message-----
From: artnaseef [mailto:art@artnaseef.com] 
Sent: Tuesday, August 19, 2014 9:39 AM
To: users@activemq.apache.org
Subject: RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Looks like it must connect in order to hit that line of code, so this most likely means a socket connection created and dropped very quickly - either by the broker, or the network.







--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684747.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by artnaseef <ar...@artnaseef.com>.
Looks like it must connect in order to hit that line of code, so this most
likely means a socket connection created and dropped very quickly - either
by the broker, or the network.







--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684747.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by artnaseef <ar...@artnaseef.com>.
That helped a lot - the version number of the NMS client library would be
helpful here too.

Looking at the code, it appears the error is caused by an unconnected
socket, which means either (a) the socket never connected (more code digging
needed to see how feasible this is), or (b) the socket connected and
disconnected quickly.

Are there any messages logged on the broker?  Does this happen every time?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684746.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

RE: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by ba...@wellsfargo.com.
Is this a .NET client?
 Yes, we are using .NET

The following specifics will help to understand the problem:

* Which cilent library (ActiveMQ java client, AMQ-CPP, NMS, etc) 
 I'll have to get these details from the Dev team
* Client library version
 I'll have to get the details from the Dev team
* ActiveMQ broker version 
 I'm currently testing with verison 5.8
* Exact text of the error message
 [oradev] 2014-08-18 11:22:07,381 ERROR 1 Ot.ActiveMQ  Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets.    at System.Net.Sockets.NetworkStream.InitNetworkStream(Socket socket, FileAccess Access)
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.CreateSocketStream()
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Start()
   at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Start()
   at Apache.NMS.ActiveMQ.Connection.CheckConnected()
   at Apache.NMS.ActiveMQ.Connection.CreateActiveMQSession(AcknowledgementMode ackMode)
   at Apache.NMS.ActiveMQ.Connection.CreateSession()
   at xxxxxxxxxCommon.Contracts.ActiveMQ.AmqConnection.Connect()
   at xxxxxxxxCommon.Contracts.ActiveMQ.AMQSessionFactory.get_SharedConnection() 
System.IO.IOException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.NetworkStream.InitNetworkStream(Socket socket, FileAccess Access)
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.CreateSocketStream()
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Start()
   at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Start()
   at Apache.NMS.ActiveMQ.Connection.CheckConnected()
   at Apache.NMS.ActiveMQ.Connection.CreateActiveMQSession(AcknowledgementMode ackMode)
   at Apache.NMS.ActiveMQ.Connection.CreateSession()
   at xxxxxxxxxCommon.Contracts.ActiveMQ.AmqConnection.Connect()
   at xxxxxxxxxCommon.Contracts.ActiveMQ.AMQSessionFactory.get_SharedConnection()
[oradev] 2014-08-18 11:22:07,412 ERROR 1 Ot.CacheNotifier  ---------------Can not start PubSub ------------ Can not connect to ActiveMQ activemq:tcp://hostnamehere:61616?wireFormat=openwire    at xxxxxxxCommon.Contracts.ActiveMQ.AMQSessionFactory.get_SharedConnection()
   at xxxxxxxCommon.Contracts.ActiveMQ.AMQSessionFactory.Topic(String topic, PubSubMessageConsumer consumer)
   at xxxxxxxxCommon.Contracts.CacheNotifier.Start(Boolean heartBitListener) 
System.Exception: Can not connect to ActiveMQ activemq:tcp://hostnamehere:61616?wireFormat=openwire ---> System.IO.IOException: The operation is not allowed on non-connected sockets.
   at System.Net.Sockets.NetworkStream.InitNetworkStream(Socket socket, FileAccess Access)
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.CreateSocketStream()
   at Apache.NMS.ActiveMQ.Transport.Tcp.TcpTransport.Start()
   at Apache.NMS.ActiveMQ.Transport.WireFormatNegotiator.Start()
   at Apache.NMS.ActiveMQ.Connection.CheckConnected()
   at Apache.NMS.ActiveMQ.Connection.CreateActiveMQSession(AcknowledgementMode ackMode)
   at Apache.NMS.ActiveMQ.Connection.CreateSession()
   at xxxxxxxxCommon.Contracts.ActiveMQ.AmqConnection.Connect()
   at xxxxxxxxCommon.Contracts.ActiveMQ.AMQSessionFactory.get_SharedConnection()
   --- End of inner exception stack trace ---
* What is producing the error message (client lib, server, application code)
Client App Server is producing the message when it tries to connect.

-----Original Message-----
From: artnaseef [mailto:art@artnaseef.com] 
Sent: Monday, August 18, 2014 12:59 PM
To: users@activemq.apache.org
Subject: Re: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Is this a .NET client?

The following specifics will help to understand the problem:

* Which cilent library (ActiveMQ java client, AMQ-CPP, NMS, etc) 
* Client library version
* ActiveMQ broker version
* Exact text the error message
* What is producing the error message (client lib, server, application code)




--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684708.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: Can not Connect to ActiveMQ The operation is not allowed on non-connected sockets

Posted by artnaseef <ar...@artnaseef.com>.
Is this a .NET client?

The following specifics will help to understand the problem:

* Which cilent library (ActiveMQ java client, AMQ-CPP, NMS, etc) 
* Client library version
* ActiveMQ broker version
* Exact text of the error message
* What is producing the error message (client lib, server, application code)




--
View this message in context: http://activemq.2283324.n4.nabble.com/Can-not-Connect-to-ActiveMQ-The-operation-is-not-allowed-on-non-connected-sockets-tp4684696p4684708.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.