You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by DraCzech <dr...@gmail.com> on 2016/07/19 08:17:06 UTC

Cannot conect while using ActiveMQ with Qpid JMS client

Hi, I'm trying to make work following components to work together:

- Apache Active MQ 5.13.3
- Qpid JMS Client 0.10.0 (tested on 0.9.0 as well)

The goal is to connect to MS  Azure IoT Hub
<https://azure.microsoft.com/en-us/services/iot-hub/>   using the Qpid JMS
client while running ActiveMQ for legacy reasons (mainly message
persistence). Both components are used as maven dependencies of my bundle.
This bundle creates and maintains bridges between remote server and local
client. So it is responsible for the whole communication starting/closing
stuff.

When the bridge is created I pass the JmsConnectionFactory instance as
QueueConnectionFactory to the bridge. Later I want to open the connection
and I face the following issue:

*The connect method on the connection just hangs when called.* And I suppose
it is connected to the clientID problem.

If the clientID property is set on the JmsConnectionFactory, the Connection
class cannot be instantiated, because the process hangs in the
configureConnection() method.

On the other hand, when the clientID is set to the Connection instance
directly, JmsQueueConnection instance can be created. But the process hangs
once setClientId() is called on the instance. (It leads to the connect()
method of JmsConnection and that leads to a freeze on a synced future.)

If no ID is assigned the process goes seemingly fine. But the proces hangs
in the Connection.start() method which leads to connect() method call on
JmsConnection and then is synced on a lock and gets never unlocked again.

And lastly if none of those methods is called by my code, the process hangs
later anyway, because of the connect() method being called when Session is
instantiated on the connection or so...

This is the part of code where it gets stuck on the *request.sync()* call:

void createResource(JmsResource resource, ProviderSynchronization
synchronization) throws JMSException {
	checkClosedOrFailed();

	try {
		ProviderFuture request = new ProviderFuture(synchronization);
		requests.put(request, request);
		try {
			provider.create(resource, request);
			request.sync();
		} finally {
			requests.remove(request);
		}
	} catch (Exception ex) {
		throw JmsExceptionSupport.create(ex);
	}
}

I'd like to point out that the communication works fine if I use only Qpid
JMS client and proton-j to connect to the IoT Hub in a separate project
using the same credentials.

Thanks for any help!




--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
On 19 July 2016 at 15:11, DraCzech <dr...@gmail.com> wrote:
> URI given to the client JmsConnectionFactory:
> amqps://boxmessagehub.azure-devices.net:5671
>
> And it should work fine with qpid JMS client (tested separately and seems to
> be OK)
>
> I pass the amqp.idleTimeout=120000 property straight to the
> JmsConnectionFactory properties as I had an exception thrown when using it
> directly from the URI.
>

Depending on when you set that, it may not have any effect. It should
have no influence on the other issue, but what was the URI you tried
when it didn't work, and what was the exception?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
URI given to the client JmsConnectionFactory:
amqps://boxmessagehub.azure-devices.net:5671

And it should work fine with qpid JMS client (tested separately and seems to
be OK)

I pass the amqp.idleTimeout=120000 property straight to the
JmsConnectionFactory properties as I had an exception thrown when using it
directly from the URI.



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647885.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Timothy Bish <ta...@gmail.com>.
What is the connection URI that you are giving the client 
JmsConnectionFactory?

On 07/19/2016 08:28 AM, DraCzech wrote:
> One thing I found out is that activemq-amqp artifact has proton-j compile
> dependency:
>
> +- org.apache.activemq:activemq-amqp:jar:5.13.3:compile
> |  \- org.apache.qpid:proton-j:jar:0.12.1:compile
>
> But that one was overridden by direct dependency when I used it (and the
> issue had occurred even at that time). I now removed the activemq-amqp
> dependency from the project so the tree now look like this:
>
> --- maven-dependency-plugin:2.8:tree (default-cli) @ databroker ---
> com.openmatics.box:databroker:bundle:3.6.0-SNAPSHOT
> +- org.osgi:org.osgi.core:jar:4.2.0:compile
> +- org.osgi:org.osgi.compendium:jar:4.2.0:compile
> +- joda-time:joda-time:jar:1.6.2:compile
> +- log4j:log4j:jar:1.2.14:compile
> +- org.sonatype.tycho:org.eclipse.osgi:jar:3.5.1.R35x_v20090827:compile
> -------------------- > Bunch of company bundles < --------------------
> +- org.glassfish.main.admin:javax.management.j2ee:jar:3.1.2:compile
> |  \- org.glassfish.main.ejb:javax.ejb:jar:3.1.2:compile
> |     +- org.glassfish.main.transaction:javax.transaction:jar:3.1.2:compile
> |     \- org.glassfish.main.javaee-api:javax.annotation:jar:3.1.2:compile
> +- org.jasypt:jasypt:jar:1.7:compile
> +- org.slf4j:slf4j-api:jar:1.6.1:compile
> +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
> +- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
> |  \- aopalliance:aopalliance:jar:1.0:compile
> +- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
> +- org.apache.activemq:activemq-broker:jar:5.13.3:compile
> |  \- org.apache.activemq:activemq-openwire-legacy:jar:5.13.3:compile
> +- org.apache.activemq:activemq-client:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
> |  \-
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
> +- org.apache.activemq:activemq-kahadb-store:jar:5.13.3:compile
> |  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
> |  \- commons-net:commons-net:jar:2.2:compile
> +- org.apache.activemq:activemq-spring:jar:5.13.3:compile
> |  +- org.apache.activemq:activemq-pool:jar:5.13.3:compile
> |  |  \- org.apache.activemq:activemq-jms-pool:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
> |  \- org.apache.commons:commons-pool2:jar:2.4.2:compile
> +- org.apache.activemq:activemq-mqtt:jar:5.13.3:compile
> +- org.apache.qpid:qpid-jms-client:jar:0.10.0:compile
> |  +- org.apache.qpid:proton-j:jar:0.13.0:compile
> |  +- io.netty:netty-buffer:jar:4.0.17.Final:compile
> |  +- io.netty:netty-common:jar:4.0.17.Final:compile
> |  +- io.netty:netty-handler:jar:4.0.17.Final:compile
> |  |  \- io.netty:netty-codec:jar:4.0.17.Final:compile
> |  \- io.netty:netty-transport:jar:4.0.17.Final:compile
> +- io.netty:netty-all:jar:4.0.17.Final:compile
> +- org.fusesource.mqtt-client:mqtt-client:jar:1.2:compile
> +- org.fusesource.hawtdispatch:hawtdispatch-transport:jar:1.9:compile
> |  \- org.fusesource.hawtdispatch:hawtdispatch:jar:1.9:compile
> +- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
> +- junit:junit:jar:4.5:test
> +- org.mockito:mockito-all:jar:1.8.5:test
> +- org.apache.xbean:xbean-spring:jar:3.7:test
> \- com.google.code.findbugs:annotations:jar:2.0.2:compile
>
> I still haven't checked what the counterpart for calling *onSuccess()* or
> *onFailure* methods on the affected *ProviderFuture* instance. But I guess
> that will be my focus now.
>
> And one more question: is there any possible issue with connecting to the
> remote server on the netty side? I've noticed that different versions of the
> library suffer from various issues of their own...
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647872.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>
>


-- 
Tim Bish
twitter: @tabish121
blog: http://timbish.blogspot.com/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
It was really tied to the *amqp.idleTimeout* property!
Now I changed my connector.uri to
amqps://boxmessagehub.azure-devices.net:5671?amqp.idleTimeout=120000 and
messages are beeing dispatched.

Initially I removed this parameter as I received some Exceptions that the
ActiveMQ couldn't resolve such parameter. But it didn't work when assigned
as one of JmsConnectionFactory properties (somehow it was not passed to the
AMQP connection).

When I saw your post and the parameter in the proton frame it struck me.
Thanks!



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647932.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
The only thing I have seen mentioned for some of the Microsoft
services is needing to increase idleTimeout as they require the
advertised value requested from the client to be above a certain
value. The client defaults to a 60sec idle timeout, and so as can be
seen in your trace advertises/requests 30sec in the Open frame per by
the AMQP spec advice (i.e advertising half your actual timeout).
However in the cases where that was seen/mentioned, I think it was
clearly stated in any error returned.

Given the below, there is little I can think to advise as the trace
from the client seems reasonable and no reason is given for the
response, so I think you'd need to ask Microsoft, perhaps the included
trackingId can help narrow down the reason. The fact your original
mail said it works when used seperately is a bit puzzling though.

Robbie

On 20 July 2016 at 08:57, DraCzech <dr...@gmail.com> wrote:
> So now I have finer logs - you can clearly see that the connection is closed
> right after it is opened. No idea why the MS server closes it. In the log
> there is first the connection attempt, then the Exception formed based on
> the remote close. Then the connection should be closed in my part because an
> exception has been caught. (There is no exception to close though, but that
> is not the main problem.)
>
> Has anyone encountered similar behaviour while working with the Azure IoT
> Hub/Event Hub servers?
>
> 2016-07-20 07:32:03.811456  [11039143:0] -> Open{
> containerId='C4EDBA888344', hostname='boxmessagehub.azure-devices.net',
> maxFrameSize=1048576, channelMax=32767, idleTimeOut=30000,
> outgoingLocales=null, incomingLocales=null, offeredCapabilities=null,
> desiredCapabilities=[sole-connection-for-container],
> properties={product=QpidJMS, version=0.10.0, platform=JVM: 1.7.0_75,
> 24.75-b04, Oracle Corporation, OS: Linux, 3.2.0-1.3.0, arm}}
> 2016-07-20 07:32:04.022224  [11039143:0] <- Open{
> containerId='DeviceGateway_265f135f269149b987d38c7c63940b61',
> hostname='10.0.0.58', maxFrameSize=65536, channelMax=8191,
> idleTimeOut=240000, outgoingLocales=null, incomingLocales=null,
> offeredCapabilities=null, desiredCapabilities=null,
> properties={com.microsoft:open-error=Error{condition=amqp:internal-error,
> description='null',
> info={com.microsoft:tracking-id=f23be8d574544125b0fb1557647b728e-G:8-TimeStamp:07/20/2016
> 07:32:04, com.microsoft:is-filtered=true}}}}
> 2016-07-20 07:32:04.028086  [11039143:0] <-
> Close{error=Error{condition=amqp:internal-error, description='null',
> info={com.microsoft:tracking-id=f23be8d574544125b0fb1557647b728e-G:8-TimeStamp:07/20/2016
> 07:32:04, com.microsoft:is-filtered=true}}}
> 2016-07-20 07:32:04.045978  2016-07-20 07:32:04,038
> {ServerConnector:BoxExchange} databroker.amq.OMJmsQueueConnector [DEBUG]
> 2016-07-20 07:32:04.046192  javax.jms.JMSException: Received error from
> remote peer without description [condition = amqp:internal-error]
> 2016-07-20 07:32:04.046253      at
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:148)
> 2016-07-20 07:32:04.046345      at
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)
> 2016-07-20 07:32:04.046406      at
> org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.remotelyClosed(AmqpAbstractResource.java:147)
> 2016-07-20 07:32:04.046467      at
> org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:242)
> 2016-07-20 07:32:04.046528      at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:771)
> 2016-07-20 07:32:04.046620      at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92)
> 2016-07-20 07:32:04.046681      at
> org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:699)
> 2016-07-20 07:32:04.046742      at
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
> 2016-07-20 07:32:04.046803      at
> java.util.concurrent.FutureTask.run(FutureTask.java:262)
> 2016-07-20 07:32:04.056085      at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
> 2016-07-20 07:32:04.056237      at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
> 2016-07-20 07:32:04.056299      at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> 2016-07-20 07:32:04.056360      at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> 2016-07-20 07:32:04.056451      at java.lang.Thread.run(Thread.java:745)
> 2016-07-20 07:32:04.066008  2016-07-20 07:32:04,058 {QpidJMS Connection
> Executor: ID:7044249b-8821-48c5-ac5c-4785a8be6eb9:1}
> databroker.jms.ServerConnector [INFO ] About to stop server connection:
> javax.jms.JMSException: Received error from remote peer without description
> [condition = amqp:internal-error]
> (amqps://boxmessagehub.azure-devices.net:5671)
> 2016-07-20 07:32:04.068786  [11039143:0] -> Begin{remoteChannel=null,
> nextOutgoingId=1, incomingWindow=2047, outgoingWindow=2147483647,
> handleMax=65535, offeredCapabilities=null, desiredCapabilities=null,
> properties=null}
> 2016-07-20 07:32:04.074343  [11039143:0] -> Close{error=null}
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647916.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
So now I have finer logs - you can clearly see that the connection is closed
right after it is opened. No idea why the MS server closes it. In the log
there is first the connection attempt, then the Exception formed based on
the remote close. Then the connection should be closed in my part because an
exception has been caught. (There is no exception to close though, but that
is not the main problem.)

Has anyone encountered similar behaviour while working with the Azure IoT
Hub/Event Hub servers?

2016-07-20 07:32:03.811456  [11039143:0] -> Open{
containerId='C4EDBA888344', hostname='boxmessagehub.azure-devices.net',
maxFrameSize=1048576, channelMax=32767, idleTimeOut=30000,
outgoingLocales=null, incomingLocales=null, offeredCapabilities=null,
desiredCapabilities=[sole-connection-for-container],
properties={product=QpidJMS, version=0.10.0, platform=JVM: 1.7.0_75,
24.75-b04, Oracle Corporation, OS: Linux, 3.2.0-1.3.0, arm}}
2016-07-20 07:32:04.022224  [11039143:0] <- Open{
containerId='DeviceGateway_265f135f269149b987d38c7c63940b61',
hostname='10.0.0.58', maxFrameSize=65536, channelMax=8191,
idleTimeOut=240000, outgoingLocales=null, incomingLocales=null,
offeredCapabilities=null, desiredCapabilities=null,
properties={com.microsoft:open-error=Error{condition=amqp:internal-error,
description='null',
info={com.microsoft:tracking-id=f23be8d574544125b0fb1557647b728e-G:8-TimeStamp:07/20/2016
07:32:04, com.microsoft:is-filtered=true}}}}
2016-07-20 07:32:04.028086  [11039143:0] <-
Close{error=Error{condition=amqp:internal-error, description='null',
info={com.microsoft:tracking-id=f23be8d574544125b0fb1557647b728e-G:8-TimeStamp:07/20/2016
07:32:04, com.microsoft:is-filtered=true}}}
2016-07-20 07:32:04.045978  2016-07-20 07:32:04,038
{ServerConnector:BoxExchange} databroker.amq.OMJmsQueueConnector [DEBUG] 
2016-07-20 07:32:04.046192  javax.jms.JMSException: Received error from
remote peer without description [condition = amqp:internal-error]
2016-07-20 07:32:04.046253  	at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:148)
2016-07-20 07:32:04.046345  	at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)
2016-07-20 07:32:04.046406  	at
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.remotelyClosed(AmqpAbstractResource.java:147)
2016-07-20 07:32:04.046467  	at
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:242)
2016-07-20 07:32:04.046528  	at
org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:771)
2016-07-20 07:32:04.046620  	at
org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92)
2016-07-20 07:32:04.046681  	at
org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:699)
2016-07-20 07:32:04.046742  	at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
2016-07-20 07:32:04.046803  	at
java.util.concurrent.FutureTask.run(FutureTask.java:262)
2016-07-20 07:32:04.056085  	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
2016-07-20 07:32:04.056237  	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
2016-07-20 07:32:04.056299  	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
2016-07-20 07:32:04.056360  	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
2016-07-20 07:32:04.056451  	at java.lang.Thread.run(Thread.java:745)
2016-07-20 07:32:04.066008  2016-07-20 07:32:04,058 {QpidJMS Connection
Executor: ID:7044249b-8821-48c5-ac5c-4785a8be6eb9:1}
databroker.jms.ServerConnector [INFO ] About to stop server connection:
javax.jms.JMSException: Received error from remote peer without description
[condition = amqp:internal-error]
(amqps://boxmessagehub.azure-devices.net:5671)
2016-07-20 07:32:04.068786  [11039143:0] -> Begin{remoteChannel=null,
nextOutgoingId=1, incomingWindow=2047, outgoingWindow=2147483647,
handleMax=65535, offeredCapabilities=null, desiredCapabilities=null,
properties=null}
2016-07-20 07:32:04.074343  [11039143:0] -> Close{error=null}



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647916.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
Glasd you found the first issue. As I say, we'll look to improve the
clients handling in situations such as that.

If you are seeing the below exception though it means that the AMQP
connection has been opened and then remotely closed by the server,
seemingly without giving a specific description of why (just using the
internal-error code), i.e a separate issue at this point.

You could try ernabling protocol trace logging
(http://qpid.apache.org/releases/qpid-jms-0.10.0/docs/index.html#logging)
to see if there is any more detail earlier in the protocol exchange
that could be of use, but its entirely likely there wont be.

Robbie

On 19 July 2016 at 17:58, DraCzech <dr...@gmail.com> wrote:
> I found a stupid error which I had not noticed before:
> java.lang.NoClassDefFoundError: javax/security/sasl/SaslException
>
> It was thrown somewhere in the qpid part so it was hard to catch. But still
> stupid me for not seeing it earlier.
>
> But I'm afraid this is only one of a few problems I have in the program as
> it still doesn't seem to perform properly and hangs on the same spot. I'll
> try to find some potential sources of problems tomorrow.
>
> On the other hand there has been at least minor progress as it seems that
> the bundle tries to connect to the server after all (sometimes), but I'm now
> getting following exception:
>
> javax.jms.JMSException: Received error from remote peer without description
> [condition = amqp:internal-error]
>         at
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:148)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.remotelyClosed(AmqpAbstractResource.java:147)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:242)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:771)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92)
>         at
> org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:699)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:262)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
>         at
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
>         at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
>         at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
>         at java.lang.Thread.run(Thread.java:745)
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647904.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
I found a stupid error which I had not noticed before:
java.lang.NoClassDefFoundError: javax/security/sasl/SaslException

It was thrown somewhere in the qpid part so it was hard to catch. But still
stupid me for not seeing it earlier.

But I'm afraid this is only one of a few problems I have in the program as
it still doesn't seem to perform properly and hangs on the same spot. I'll
try to find some potential sources of problems tomorrow.

On the other hand there has been at least minor progress as it seems that
the bundle tries to connect to the server after all (sometimes), but I'm now
getting following exception:

javax.jms.JMSException: Received error from remote peer without description
[condition = amqp:internal-error]
	at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:148)
	at
org.apache.qpid.jms.provider.amqp.AmqpSupport.convertToException(AmqpSupport.java:103)
	at
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.remotelyClosed(AmqpAbstractResource.java:147)
	at
org.apache.qpid.jms.provider.amqp.AmqpAbstractResource.processRemoteClose(AmqpAbstractResource.java:242)
	at
org.apache.qpid.jms.provider.amqp.AmqpProvider.processUpdates(AmqpProvider.java:771)
	at
org.apache.qpid.jms.provider.amqp.AmqpProvider.access$1900(AmqpProvider.java:92)
	at
org.apache.qpid.jms.provider.amqp.AmqpProvider$17.run(AmqpProvider.java:699)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask.run(FutureTask.java:262)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178)
	at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292)
	at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:745)



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647904.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
On 19 July 2016 at 16:02, DraCzech <dr...@gmail.com> wrote:
> I don't think the problem could be caused by old slf4j dependency. Even if I
> try the newest version, the problem remains the same.
>
> If it helps I can paste complete dependency tree. Last time I just left out
> stuff made by our company and posted only 3rd party libraries. Now a
> complete tree:
>
> --- maven-dependency-plugin:2.8:tree (default-cli) @ databroker ---
> com.openmatics.box:databroker:bundle:3.6.0-SNAPSHOT
> +- org.osgi:org.osgi.core:jar:4.2.0:compile
> +- org.osgi:org.osgi.compendium:jar:4.2.0:compile
> +- joda-time:joda-time:jar:1.6.2:compile
> +- log4j:log4j:jar:1.2.14:compile
> +- org.sonatype.tycho:org.eclipse.osgi:jar:3.5.1.R35x_v20090827:compile
> +- com.openmatics.api:common:jar:3.8.0:compile
> +- com.openmatics.api:boxlet:jar:3.6.0:compile
> |  \- javax.servlet:com.springsource.javax.servlet:jar:2.5.0:compile
> +- com.openmatics.common:services:jar:3.13.0-SNAPSHOT:compile
> |  \- org.apache.commons:commons-math:jar:2.1:compile
> +- com.openmatics.shared:condensableobjects:jar:2.2.0:compile
> +- com.openmatics.shared:condensable:jar:2.3.0:compile
> |  \- com.caucho:hessian:jar:4.0.7:compile
> +- com.openmatics.shared:file:jar:2.7.1:compile
> |  \- commons-io:commons-io:jar:1.4:compile
> +- com.openmatics.shared:messaging:jar:1.4.0:compile
> +- com.openmatics.box:messaging:jar:2.1.0:compile
> +- com.openmatics.box:util:jar:2.3.1:compile
> +- com.openmatics.common:utils:jar:1.1.0:compile
> +- com.openmatics.common:alarming:jar:2.3.0:compile
> +- com.openmatics.common:message:jar:4.0.0:compile
> +- com.openmatics.common:messageheader:jar:3.1.0:compile
> +- com.openmatics.shared:messageheader:jar:3.1.0:compile
> +- com.openmatics.shared:serialization.kryo:jar:4.0.0:compile
> |  +- com.openmatics.common:serialization:jar:3.0.0:compile
> |  +- com.openmatics.common:updatemanager.messages:jar:2.3.0:compile
> |  +- com.openmatics.shared:serializers:jar:1.3.0:compile
> |  +- com.esotericsoftware.kryo:kryo:jar:2.16-dexed:compile
> |  |  +- com.esotericsoftware.reflectasm:reflectasm:jar:1.06-dexed:compile
> |  |  |  \- org.ow2.asm:asm:jar:4.0-dexed:compile
> |  |  +- com.esotericsoftware.minlog:minlog:jar:1.2-dexed:compile
> |  |  \- org.objenesis:objenesis:jar:1.2-dexed:compile
> |  \- de.javakaffee:kryo-serializers:jar:0.20-wip-dexed:compile
> +- commons-logging:commons-logging:jar:1.1.1:compile
> +- org.glassfish.main.admin:javax.management.j2ee:jar:3.1.2:compile
> |  \- org.glassfish.main.ejb:javax.ejb:jar:3.1.2:compile
> |     +- org.glassfish.main.transaction:javax.transaction:jar:3.1.2:compile
> |     \- org.glassfish.main.javaee-api:javax.annotation:jar:3.1.2:compile
> +- org.jasypt:jasypt:jar:1.7:compile
> +- org.slf4j:slf4j-api:jar:1.7.21:compile
> +- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
> +- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
> |  \- aopalliance:aopalliance:jar:1.0:compile
> +- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
> +- org.apache.activemq:activemq-broker:jar:5.13.3:compile
> |  \- org.apache.activemq:activemq-openwire-legacy:jar:5.13.3:compile
> +- org.apache.activemq:activemq-client:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
> |  \-
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
> +- org.apache.activemq:activemq-kahadb-store:jar:5.13.3:compile
> |  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
> |  \- commons-net:commons-net:jar:2.2:compile
> +- org.apache.activemq:activemq-spring:jar:5.13.3:compile
> |  +- org.apache.activemq:activemq-pool:jar:5.13.3:compile
> |  |  \- org.apache.activemq:activemq-jms-pool:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
> |  \- org.apache.commons:commons-pool2:jar:2.4.2:compile
> +- org.apache.activemq:activemq-mqtt:jar:5.13.3:compile
> +- org.apache.qpid:qpid-jms-client:jar:0.10.0:compile
> |  +- org.apache.qpid:proton-j:jar:0.13.0:compile
> |  +- io.netty:netty-buffer:jar:4.0.17.Final:compile
> |  +- io.netty:netty-common:jar:4.0.17.Final:compile
> |  +- io.netty:netty-handler:jar:4.0.17.Final:compile
> |  |  \- io.netty:netty-codec:jar:4.0.17.Final:compile
> |  \- io.netty:netty-transport:jar:4.0.17.Final:compile
> +- io.netty:netty-all:jar:4.0.17.Final:compile
> +- org.fusesource.mqtt-client:mqtt-client:jar:1.2:compile
> +- org.fusesource.hawtdispatch:hawtdispatch-transport:jar:1.9:compile
> |  \- org.fusesource.hawtdispatch:hawtdispatch:jar:1.9:compile
> +- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
> +- junit:junit:jar:4.5:test
> +- org.mockito:mockito-all:jar:1.8.5:test
> +- org.apache.xbean:xbean-spring:jar:3.7:test
> \- com.google.code.findbugs:annotations:jar:2.0.2:compile
>
> My point in mentioning netty issues earlier was connected to the fact I
> sometimes get the java.nio.channels.UnresolvedAddressException thrown from
> at
> org.apache.qpid.jms.JmsConnectionFactory.createQueueConnection(JmsConnectionFactory.java:201)
> but when I reboot the device it usually helps and the JmsConnection is
> created OK (and then I get stuck again on the aforementioned spot).
>


I don't think slf4j should make a difference either, I was just
pointing it out as an observable difference.

I think the easiest thing is going to be for you to run it under a
debugger and look around the section I mentioned before, see what if
any exceptions/errors are being thrown etc.

Robbie

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
I don't think the problem could be caused by old slf4j dependency. Even if I
try the newest version, the problem remains the same.

If it helps I can paste complete dependency tree. Last time I just left out
stuff made by our company and posted only 3rd party libraries. Now a
complete tree:

--- maven-dependency-plugin:2.8:tree (default-cli) @ databroker ---
com.openmatics.box:databroker:bundle:3.6.0-SNAPSHOT
+- org.osgi:org.osgi.core:jar:4.2.0:compile
+- org.osgi:org.osgi.compendium:jar:4.2.0:compile
+- joda-time:joda-time:jar:1.6.2:compile
+- log4j:log4j:jar:1.2.14:compile
+- org.sonatype.tycho:org.eclipse.osgi:jar:3.5.1.R35x_v20090827:compile
+- com.openmatics.api:common:jar:3.8.0:compile
+- com.openmatics.api:boxlet:jar:3.6.0:compile
|  \- javax.servlet:com.springsource.javax.servlet:jar:2.5.0:compile
+- com.openmatics.common:services:jar:3.13.0-SNAPSHOT:compile
|  \- org.apache.commons:commons-math:jar:2.1:compile
+- com.openmatics.shared:condensableobjects:jar:2.2.0:compile
+- com.openmatics.shared:condensable:jar:2.3.0:compile
|  \- com.caucho:hessian:jar:4.0.7:compile
+- com.openmatics.shared:file:jar:2.7.1:compile
|  \- commons-io:commons-io:jar:1.4:compile
+- com.openmatics.shared:messaging:jar:1.4.0:compile
+- com.openmatics.box:messaging:jar:2.1.0:compile
+- com.openmatics.box:util:jar:2.3.1:compile
+- com.openmatics.common:utils:jar:1.1.0:compile
+- com.openmatics.common:alarming:jar:2.3.0:compile
+- com.openmatics.common:message:jar:4.0.0:compile
+- com.openmatics.common:messageheader:jar:3.1.0:compile
+- com.openmatics.shared:messageheader:jar:3.1.0:compile
+- com.openmatics.shared:serialization.kryo:jar:4.0.0:compile
|  +- com.openmatics.common:serialization:jar:3.0.0:compile
|  +- com.openmatics.common:updatemanager.messages:jar:2.3.0:compile
|  +- com.openmatics.shared:serializers:jar:1.3.0:compile
|  +- com.esotericsoftware.kryo:kryo:jar:2.16-dexed:compile
|  |  +- com.esotericsoftware.reflectasm:reflectasm:jar:1.06-dexed:compile
|  |  |  \- org.ow2.asm:asm:jar:4.0-dexed:compile
|  |  +- com.esotericsoftware.minlog:minlog:jar:1.2-dexed:compile
|  |  \- org.objenesis:objenesis:jar:1.2-dexed:compile
|  \- de.javakaffee:kryo-serializers:jar:0.20-wip-dexed:compile
+- commons-logging:commons-logging:jar:1.1.1:compile
+- org.glassfish.main.admin:javax.management.j2ee:jar:3.1.2:compile
|  \- org.glassfish.main.ejb:javax.ejb:jar:3.1.2:compile
|     +- org.glassfish.main.transaction:javax.transaction:jar:3.1.2:compile
|     \- org.glassfish.main.javaee-api:javax.annotation:jar:3.1.2:compile
+- org.jasypt:jasypt:jar:1.7:compile
+- org.slf4j:slf4j-api:jar:1.7.21:compile
+- org.slf4j:slf4j-log4j12:jar:1.7.21:compile
+- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
|  \- aopalliance:aopalliance:jar:1.0:compile
+- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
+- org.apache.activemq:activemq-broker:jar:5.13.3:compile
|  \- org.apache.activemq:activemq-openwire-legacy:jar:5.13.3:compile
+- org.apache.activemq:activemq-client:jar:5.13.3:compile
|  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
|  \-
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
+- org.apache.activemq:activemq-kahadb-store:jar:5.13.3:compile
|  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
|  \- commons-net:commons-net:jar:2.2:compile
+- org.apache.activemq:activemq-spring:jar:5.13.3:compile
|  +- org.apache.activemq:activemq-pool:jar:5.13.3:compile
|  |  \- org.apache.activemq:activemq-jms-pool:jar:5.13.3:compile
|  +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
|  \- org.apache.commons:commons-pool2:jar:2.4.2:compile
+- org.apache.activemq:activemq-mqtt:jar:5.13.3:compile
+- org.apache.qpid:qpid-jms-client:jar:0.10.0:compile
|  +- org.apache.qpid:proton-j:jar:0.13.0:compile
|  +- io.netty:netty-buffer:jar:4.0.17.Final:compile
|  +- io.netty:netty-common:jar:4.0.17.Final:compile
|  +- io.netty:netty-handler:jar:4.0.17.Final:compile
|  |  \- io.netty:netty-codec:jar:4.0.17.Final:compile
|  \- io.netty:netty-transport:jar:4.0.17.Final:compile
+- io.netty:netty-all:jar:4.0.17.Final:compile
+- org.fusesource.mqtt-client:mqtt-client:jar:1.2:compile
+- org.fusesource.hawtdispatch:hawtdispatch-transport:jar:1.9:compile
|  \- org.fusesource.hawtdispatch:hawtdispatch:jar:1.9:compile
+- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
+- junit:junit:jar:4.5:test
+- org.mockito:mockito-all:jar:1.8.5:test
+- org.apache.xbean:xbean-spring:jar:3.7:test
\- com.google.code.findbugs:annotations:jar:2.0.2:compile

My point in mentioning netty issues earlier was connected to the fact I
sometimes get the java.nio.channels.UnresolvedAddressException thrown from
at
org.apache.qpid.jms.JmsConnectionFactory.createQueueConnection(JmsConnectionFactory.java:201)
but when I reboot the device it usually helps and the JmsConnection is
created OK (and then I get stuck again on the aforementioned spot).



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647892.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
I dont think the version of proton-j used by ActiveMQ should be an
issue. The 0.10.0 client uses that broker/client version in some of
its tests, and the broker test suite uses the 0.9.0 client, so they
should run together.

The only thing I notice from the partial tree info that directly
relates to the client is that you have a very old version of SLF4J in
there, whereas the client uses a more recent version normally. Not
sure if that would cause problems or not. Hard to say if the stuff you
trimmed is of any interest.

In terms of what calls the sucess/failure methods on the request,
follow from org.apache.qpid.jms.provider.amqp.AmqpProvider.create(...),
look in the processConnectionInfo section. Looking at it quickly, I
imagine either an error is being thrown and not caught or something
similar, you could try sticking it under a debugger and looking.

On 19 July 2016 at 13:28, DraCzech <dr...@gmail.com> wrote:
> One thing I found out is that activemq-amqp artifact has proton-j compile
> dependency:
>
> +- org.apache.activemq:activemq-amqp:jar:5.13.3:compile
> |  \- org.apache.qpid:proton-j:jar:0.12.1:compile
>
> But that one was overridden by direct dependency when I used it (and the
> issue had occurred even at that time). I now removed the activemq-amqp
> dependency from the project so the tree now look like this:
>
> --- maven-dependency-plugin:2.8:tree (default-cli) @ databroker ---
> com.openmatics.box:databroker:bundle:3.6.0-SNAPSHOT
> +- org.osgi:org.osgi.core:jar:4.2.0:compile
> +- org.osgi:org.osgi.compendium:jar:4.2.0:compile
> +- joda-time:joda-time:jar:1.6.2:compile
> +- log4j:log4j:jar:1.2.14:compile
> +- org.sonatype.tycho:org.eclipse.osgi:jar:3.5.1.R35x_v20090827:compile
> -------------------- > Bunch of company bundles < --------------------
> +- org.glassfish.main.admin:javax.management.j2ee:jar:3.1.2:compile
> |  \- org.glassfish.main.ejb:javax.ejb:jar:3.1.2:compile
> |     +- org.glassfish.main.transaction:javax.transaction:jar:3.1.2:compile
> |     \- org.glassfish.main.javaee-api:javax.annotation:jar:3.1.2:compile
> +- org.jasypt:jasypt:jar:1.7:compile
> +- org.slf4j:slf4j-api:jar:1.6.1:compile
> +- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
> +- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
> |  \- aopalliance:aopalliance:jar:1.0:compile
> +- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
> +- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
> +- org.apache.activemq:activemq-broker:jar:5.13.3:compile
> |  \- org.apache.activemq:activemq-openwire-legacy:jar:5.13.3:compile
> +- org.apache.activemq:activemq-client:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
> |  \-
> org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
> +- org.apache.activemq:activemq-kahadb-store:jar:5.13.3:compile
> |  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
> |  \- commons-net:commons-net:jar:2.2:compile
> +- org.apache.activemq:activemq-spring:jar:5.13.3:compile
> |  +- org.apache.activemq:activemq-pool:jar:5.13.3:compile
> |  |  \- org.apache.activemq:activemq-jms-pool:jar:5.13.3:compile
> |  +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
> |  \- org.apache.commons:commons-pool2:jar:2.4.2:compile
> +- org.apache.activemq:activemq-mqtt:jar:5.13.3:compile
> +- org.apache.qpid:qpid-jms-client:jar:0.10.0:compile
> |  +- org.apache.qpid:proton-j:jar:0.13.0:compile
> |  +- io.netty:netty-buffer:jar:4.0.17.Final:compile
> |  +- io.netty:netty-common:jar:4.0.17.Final:compile
> |  +- io.netty:netty-handler:jar:4.0.17.Final:compile
> |  |  \- io.netty:netty-codec:jar:4.0.17.Final:compile
> |  \- io.netty:netty-transport:jar:4.0.17.Final:compile
> +- io.netty:netty-all:jar:4.0.17.Final:compile
> +- org.fusesource.mqtt-client:mqtt-client:jar:1.2:compile
> +- org.fusesource.hawtdispatch:hawtdispatch-transport:jar:1.9:compile
> |  \- org.fusesource.hawtdispatch:hawtdispatch:jar:1.9:compile
> +- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
> +- junit:junit:jar:4.5:test
> +- org.mockito:mockito-all:jar:1.8.5:test
> +- org.apache.xbean:xbean-spring:jar:3.7:test
> \- com.google.code.findbugs:annotations:jar:2.0.2:compile
>
> I still haven't checked what the counterpart for calling *onSuccess()* or
> *onFailure* methods on the affected *ProviderFuture* instance. But I guess
> that will be my focus now.
>
> And one more question: is there any possible issue with connecting to the
> remote server on the netty side? I've noticed that different versions of the
> library suffer from various issues of their own...
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647872.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
One thing I found out is that activemq-amqp artifact has proton-j compile
dependency:

+- org.apache.activemq:activemq-amqp:jar:5.13.3:compile
|  \- org.apache.qpid:proton-j:jar:0.12.1:compile

But that one was overridden by direct dependency when I used it (and the
issue had occurred even at that time). I now removed the activemq-amqp
dependency from the project so the tree now look like this:

--- maven-dependency-plugin:2.8:tree (default-cli) @ databroker ---
com.openmatics.box:databroker:bundle:3.6.0-SNAPSHOT
+- org.osgi:org.osgi.core:jar:4.2.0:compile
+- org.osgi:org.osgi.compendium:jar:4.2.0:compile
+- joda-time:joda-time:jar:1.6.2:compile
+- log4j:log4j:jar:1.2.14:compile
+- org.sonatype.tycho:org.eclipse.osgi:jar:3.5.1.R35x_v20090827:compile
-------------------- > Bunch of company bundles < --------------------
+- org.glassfish.main.admin:javax.management.j2ee:jar:3.1.2:compile
|  \- org.glassfish.main.ejb:javax.ejb:jar:3.1.2:compile
|     +- org.glassfish.main.transaction:javax.transaction:jar:3.1.2:compile
|     \- org.glassfish.main.javaee-api:javax.annotation:jar:3.1.2:compile
+- org.jasypt:jasypt:jar:1.7:compile
+- org.slf4j:slf4j-api:jar:1.6.1:compile
+- org.slf4j:slf4j-log4j12:jar:1.6.1:compile
+- org.springframework:spring-context:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-aop:jar:3.0.3.RELEASE:compile
|  \- aopalliance:aopalliance:jar:1.0:compile
+- org.springframework:spring-beans:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-core:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-expression:jar:3.0.3.RELEASE:compile
+- org.springframework:spring-asm:jar:3.0.3.RELEASE:compile
+- org.apache.activemq:activemq-broker:jar:5.13.3:compile
|  \- org.apache.activemq:activemq-openwire-legacy:jar:5.13.3:compile
+- org.apache.activemq:activemq-client:jar:5.13.3:compile
|  +- org.apache.geronimo.specs:geronimo-jms_1.1_spec:jar:1.1.1:compile
|  \-
org.apache.geronimo.specs:geronimo-j2ee-management_1.1_spec:jar:1.0.1:compile
+- org.apache.activemq:activemq-kahadb-store:jar:5.13.3:compile
|  +- org.apache.activemq.protobuf:activemq-protobuf:jar:1.1:compile
|  \- commons-net:commons-net:jar:2.2:compile
+- org.apache.activemq:activemq-spring:jar:5.13.3:compile
|  +- org.apache.activemq:activemq-pool:jar:5.13.3:compile
|  |  \- org.apache.activemq:activemq-jms-pool:jar:5.13.3:compile
|  +- org.apache.geronimo.specs:geronimo-jta_1.0.1B_spec:jar:1.0.1:compile
|  \- org.apache.commons:commons-pool2:jar:2.4.2:compile
+- org.apache.activemq:activemq-mqtt:jar:5.13.3:compile
+- org.apache.qpid:qpid-jms-client:jar:0.10.0:compile
|  +- org.apache.qpid:proton-j:jar:0.13.0:compile
|  +- io.netty:netty-buffer:jar:4.0.17.Final:compile
|  +- io.netty:netty-common:jar:4.0.17.Final:compile
|  +- io.netty:netty-handler:jar:4.0.17.Final:compile
|  |  \- io.netty:netty-codec:jar:4.0.17.Final:compile
|  \- io.netty:netty-transport:jar:4.0.17.Final:compile
+- io.netty:netty-all:jar:4.0.17.Final:compile
+- org.fusesource.mqtt-client:mqtt-client:jar:1.2:compile
+- org.fusesource.hawtdispatch:hawtdispatch-transport:jar:1.9:compile
|  \- org.fusesource.hawtdispatch:hawtdispatch:jar:1.9:compile
+- org.fusesource.hawtbuf:hawtbuf:jar:1.9:compile
+- junit:junit:jar:4.5:test
+- org.mockito:mockito-all:jar:1.8.5:test
+- org.apache.xbean:xbean-spring:jar:3.7:test
\- com.google.code.findbugs:annotations:jar:2.0.2:compile

I still haven't checked what the counterpart for calling *onSuccess()* or
*onFailure* methods on the affected *ProviderFuture* instance. But I guess
that will be my focus now.

And one more question: is there any possible issue with connecting to the
remote server on the netty side? I've noticed that different versions of the
library suffer from various issues of their own...



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647872.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
On 19 July 2016 at 11:25, DraCzech <dr...@gmail.com> wrote:
> I've noticed the issue just when I finished the question...
>
> I tried to use proton-j 0.13.1 (as direct dependency) and 0.13.0 (transitive
> dependency of qpid-jms-client 0.10.0)
>
> But it still hangs on the same spot no matter what version of the library
> I'm using.
>
> I'm not saying the problem is not at the my side of code, but this freeze
> seems to be quite odd at least. The way the program hangs on a synchronizing
> method call also prevents any connection timeout parameter from being
> applied. So I don't have any exception to work with or so...
>

As I said, there is an issue in the client with its handling of the
scenario I described. The proton-j version issue is currently the only
way I've seen mention of it happening thus far. The fact you say
everything works when run separately still makes me think it is a
likely cause, but potentially there are others of similar nature. What
do you get from running mvn dependency:tree?

Robbie

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by DraCzech <dr...@gmail.com>.
I've noticed the issue just when I finished the question...

I tried to use proton-j 0.13.1 (as direct dependency) and 0.13.0 (transitive
dependency of qpid-jms-client 0.10.0)

But it still hangs on the same spot no matter what version of the library
I'm using.

I'm not saying the problem is not at the my side of code, but this freeze
seems to be quite odd at least. The way the program hangs on a synchronizing
method call also prevents any connection timeout parameter from being
applied. So I don't have any exception to work with or so...



--
View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859p7647868.html
Sent from the Apache Qpid users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org


Re: Cannot conect while using ActiveMQ with Qpid JMS client

Posted by Robbie Gemmell <ro...@gmail.com>.
Can you check which versions of proton-j are on the classpath? A
likely related report came up a couple of weeks ago, where someone was
trying to use the JMS client and another client together in the same
VM, but the latter embedded a fairly old version of proton-j which
lacks some newer methods the JMS client is using. That caused
behaviour similar to what you describe if the older proton-j version
came first on the classpath. I haven't yet had a look into where it is
misbehaving inside the client to try and improve the behaviour when it
does. The 0.10.0 release actually uses that version of the broker in
some of its tests, for what its worth.

Robbie

On 19 July 2016 at 09:17, DraCzech <dr...@gmail.com> wrote:
> Hi, I'm trying to make work following components to work together:
>
> - Apache Active MQ 5.13.3
> - Qpid JMS Client 0.10.0 (tested on 0.9.0 as well)
>
> The goal is to connect to MS  Azure IoT Hub
> <https://azure.microsoft.com/en-us/services/iot-hub/>   using the Qpid JMS
> client while running ActiveMQ for legacy reasons (mainly message
> persistence). Both components are used as maven dependencies of my bundle.
> This bundle creates and maintains bridges between remote server and local
> client. So it is responsible for the whole communication starting/closing
> stuff.
>
> When the bridge is created I pass the JmsConnectionFactory instance as
> QueueConnectionFactory to the bridge. Later I want to open the connection
> and I face the following issue:
>
> *The connect method on the connection just hangs when called.* And I suppose
> it is connected to the clientID problem.
>
> If the clientID property is set on the JmsConnectionFactory, the Connection
> class cannot be instantiated, because the process hangs in the
> configureConnection() method.
>
> On the other hand, when the clientID is set to the Connection instance
> directly, JmsQueueConnection instance can be created. But the process hangs
> once setClientId() is called on the instance. (It leads to the connect()
> method of JmsConnection and that leads to a freeze on a synced future.)
>
> If no ID is assigned the process goes seemingly fine. But the proces hangs
> in the Connection.start() method which leads to connect() method call on
> JmsConnection and then is synced on a lock and gets never unlocked again.
>
> And lastly if none of those methods is called by my code, the process hangs
> later anyway, because of the connect() method being called when Session is
> instantiated on the connection or so...
>
> This is the part of code where it gets stuck on the *request.sync()* call:
>
> void createResource(JmsResource resource, ProviderSynchronization
> synchronization) throws JMSException {
>         checkClosedOrFailed();
>
>         try {
>                 ProviderFuture request = new ProviderFuture(synchronization);
>                 requests.put(request, request);
>                 try {
>                         provider.create(resource, request);
>                         request.sync();
>                 } finally {
>                         requests.remove(request);
>                 }
>         } catch (Exception ex) {
>                 throw JmsExceptionSupport.create(ex);
>         }
> }
>
> I'd like to point out that the communication works fine if I use only Qpid
> JMS client and proton-j to connect to the IoT Hub in a separate project
> using the same credentials.
>
> Thanks for any help!
>
>
>
>
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/Cannot-conect-while-using-ActiveMQ-with-Qpid-JMS-client-tp7647859.html
> Sent from the Apache Qpid users mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
> For additional commands, e-mail: users-help@qpid.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org
For additional commands, e-mail: users-help@qpid.apache.org