You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Robert Greig <ro...@gmail.com> on 2008/05/11 19:16:03 UTC

Re: Communication problem between M3 Broker and AMQP client

2008/5/11 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Hi everyone: I've downloaded and built the M3 version of QPID, and tried to
> run the AMQP example DeclareQueue against the Java broker in this release.
> The error I'm receiving is "Unsupported protocol version: 0.10".  I would
> appreciate it if anyone could tell me what I'm doing wrong. I've made sure
> that the path, classpath, and the other environment variables point to the
> libraries in this release.

The java broker on trunk (i.e M3) does not yet support 0-10.

If you want to use that API you will need to use the C++ broker.

If you want to use a Java broker, I recommend you use the M2.1
release, and the M2.1 java client (which is JMS only).

Using trunk if you are just trying to explore qpid and get things up
and running isn't really recommended at this stage of the M3
development lifecycle - there are going to be bugs and issues and
missing or incomplete features.

Robert

RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
Below, please find the stack trace.  I've not bothered to resolve the two
warning messages yet. Also, the connect call I'm using is:

con.connect("192.168.100.110", 5672, "", "root", "rootpwd");

Thanks for the help.

**** the trace is below ****

log4j:WARN No appenders could be found for logger
(org.apache.qpidity.nclient.Cl
ient).
log4j:WARN Please initialize the log4j system properly.
Error connecting to broker
org.apache.mina.common.RuntimeIOException: Failed to get the session.
        at
org.apache.mina.common.support.DefaultConnectFuture.getSession(DefaultConnec
tFuture.java:69)
        at
org.apache.qpidity.transport.network.mina.MinaHandler.connect(MinaHandler.ja
va:216)
        at
org.apache.qpidity.transport.network.mina.MinaHandler.connect(MinaHandler.ja
va:198)
        at
org.apache.qpidity.transport.network.mina.MinaHandler.connect(MinaHandler.ja
va:251)
        at org.apache.qpidity.nclient.Client.connect(Client.java:164)
        at DeclareQueue.main(DeclareQueue.java:21)
Caused by: java.net.ConnectException: Connection timed out: no further
information
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
        at
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:574)
        at
org.apache.mina.transport.socket.nio.SocketConnector.processSessions(SocketC
onnector.java:305)
        at
org.apache.mina.transport.socket.nio.SocketConnector.access$900(SocketConnec
tor.java:52)
        at
org.apache.mina.transport.socket.nio.SocketConnector$Worker.run(SocketConnec
tor.java:414)
        at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:
43)
        at java.lang.Thread.run(Thread.java:619)
Exception in thread "main" java.lang.NullPointerException
        at org.apache.qpidity.nclient.Client.createSession(Client.java:258)
        at DeclareQueue.main(DeclareQueue.java:30)

Kamran Saadatjoo

-----Original Message-----
From: Robert Greig [mailto:robert.j.greig@gmail.com] 
Sent: Sunday, May 11, 2008 6:02 PM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

2008/5/11 Kamran Saadatjoo <ka...@openflowsystems.com>:

> Thanks Robert: If you could, please tell me how I can find out the virtual
> host name of a C++ broker. I have one running on a Linux system and I'm
> trying to connect to it from a Windows Java client (the DeclareQueue.java
> example). The client terminates after about 20 or so seconds of wait with
> "Error connecting to broker" which is outputted in the "catch" section of
> connection.  I've used an empty string for the virtual host name, and used
> my root user and password to connect with. I think the problem may be that
I
> don't have the correct virtual host name.  Would you know what I'm
missing?

Can you post the stack trace from the java client?

Robert

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 


Re: Communication problem between M3 Broker and AMQP client

Posted by Robert Greig <ro...@gmail.com>.
2008/5/11 Kamran Saadatjoo <ka...@openflowsystems.com>:

> Thanks Robert: If you could, please tell me how I can find out the virtual
> host name of a C++ broker. I have one running on a Linux system and I'm
> trying to connect to it from a Windows Java client (the DeclareQueue.java
> example). The client terminates after about 20 or so seconds of wait with
> "Error connecting to broker" which is outputted in the "catch" section of
> connection.  I've used an empty string for the virtual host name, and used
> my root user and password to connect with. I think the problem may be that I
> don't have the correct virtual host name.  Would you know what I'm missing?

Can you post the stack trace from the java client?

Robert

Re: Communication problem between M3 Broker and AMQP client

Posted by Gordon Sim <gs...@redhat.com>.
Kamran Saadatjoo wrote:
> I just started the trace and don’t see any trace output after the line "Info
> Listening on port 5672".  This is my in-house network, so I don’t think this
> could be a firewall problem. Below is the trace output.  Thanks for your
> help.

The trace shows that the broker is not even seeing any connection attempts.

Try this: start your broker with tracing on again, then try to telnet to 
it (e.g. 'telnet hostname 5672').

If you get 'connection refused' then there is some setup preventing the 
tcp socket being established.

If on the other hand the connection works try to type six random chars 
and hit return. You should then see something like:

2008-may-12 13:03:47 debug RECV [127.0.0.1:51286] INIT(13-10)
2008-may-12 13:03:47 debug SENT [127.0.0.1:51286] INIT(0-10)

If you see that but can't connect with the client then there is some 
setup issue with the client and you need to turn on some logging to 
figure out what (Rajith, any tips for easily turning on 
debugging/logging for the java AMQP client?)

RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
I just started the trace and don’t see any trace output after the line "Info
Listening on port 5672".  This is my in-house network, so I don’t think this
could be a firewall problem. Below is the trace output.  Thanks for your
help.

[root@localhost lib]# qpidd --no-data-dir -t
2008-May-12 07:31:52 info No data directory - Disabling persistent
configuration
2008-May-12 07:31:52 debug ManagementAgent added package qpid
2008-May-12 07:31:52 debug ManagementAgent added class qpid.system
2008-May-12 07:31:52 debug ManagementAgent added class qpid.broker
2008-May-12 07:31:52 debug ManagementAgent added class qpid.vhost
2008-May-12 07:31:52 debug ManagementAgent added class qpid.exchange
2008-May-12 07:31:52 info Persistence not enabled, no recovery attempted.
2008-May-12 07:31:52 info Exchange'amq.direct' will not be durable.  
Persistence not enabled.
2008-May-12 07:31:52 info Exchange'amq.topic' will not be durable.  
Persistence not enabled.
2008-May-12 07:31:52 info Exchange'amq.fanout' will not be durable.  
Persistence not enabled.
2008-May-12 07:31:52 info Exchange'amq.match' will not be durable.  
Persistence not enabled.
2008-May-12 07:31:52 info Management enabled
2008-May-12 07:31:52 info Listening on port 5672

Kamran Saadatjoo

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Monday, May 12, 2008 2:55 AM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

Kamran Saadatjoo wrote:
> Thanks Robert: If you could, please tell me how I can find out the virtual
> host name of a C++ broker. I have one running on a Linux system and I'm
> trying to connect to it from a Windows Java client (the DeclareQueue.java
> example). The client terminates after about 20 or so seconds of wait with
> "Error connecting to broker" which is outputted in the "catch" section of
> connection.  I've used an empty string for the virtual host name, and used
> my root user and password to connect with. I think the problem may be that
I
> don’t have the correct virtual host name.  Would you know what I'm
missing? 

Can you turn on tracing for the c++ broker (pass in the -t option when 
starting it)? That will show what is happening. If when you try to 
connect you then see no output it may be a firewall issue. If you do see 
some output send it to the list and we should be able to determine what 
is going wrong. Thanks!

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 


RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
M3 C++ broker with the "--auth no" option did the job.  I'll worry about the
authentication failure problem later. Thanks Gordon/Robert for your help.

Kamran Saadatjoo

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Monday, May 12, 2008 8:19 AM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

Kamran Saadatjoo wrote:
> It turns out that this is a firewall problem after all. I though I had
> disabled the firewall on the Linux machine, but I guess I had not. I
> attempted to disable the firewall again, and now I'm getting further. I
see
> the connection traced on the broker side, but the client is hanging
> indefinitely on the connect statement. 

Thats most likely an authentication failure that the client isn't 
handling. (I could confirm if you send the broker trace). The simplest 
thing initially is to turn of authentication for the broker: pass in 
--auth no when starting it up and try again.

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 


Re: Communication problem between M3 Broker and AMQP client

Posted by Robert Godfrey <ro...@gmail.com>.
2008/5/12 Robert Greig <ro...@gmail.com>:
> 2008/5/12 Kamran Saadatjoo <ka...@openflowsystems.com>:
>> Gordon: I was running the M2 C++ broker which does not offer the --auth
>>  command line option. I'm building the M3 version now and will try it
>>  shortly. I'll then post my findings. Thanks.
>
> Ah. The M2 C++ broker does not support AMQP 0-10.
>
> Robert
>

It makes sense to use the clients and brokers from the same version.

The Java client from M2 should work with the M2 C++ broker (and M2
Java broker)...

If you want to use the trunk C++ broker, use the client from trunk...

-- Rob

Re: Communication problem between M3 Broker and AMQP client

Posted by Robert Greig <ro...@gmail.com>.
2008/5/12 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Gordon: I was running the M2 C++ broker which does not offer the --auth
>  command line option. I'm building the M3 version now and will try it
>  shortly. I'll then post my findings. Thanks.

Ah. The M2 C++ broker does not support AMQP 0-10.

Robert

RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
Gordon: I was running the M2 C++ broker which does not offer the --auth
command line option. I'm building the M3 version now and will try it
shortly. I'll then post my findings. Thanks.

Kamran Saadatjoo

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Monday, May 12, 2008 8:19 AM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

Kamran Saadatjoo wrote:
> It turns out that this is a firewall problem after all. I though I had
> disabled the firewall on the Linux machine, but I guess I had not. I
> attempted to disable the firewall again, and now I'm getting further. I
see
> the connection traced on the broker side, but the client is hanging
> indefinitely on the connect statement. 

Thats most likely an authentication failure that the client isn't 
handling. (I could confirm if you send the broker trace). The simplest 
thing initially is to turn of authentication for the broker: pass in 
--auth no when starting it up and try again.

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 


Re: Communication problem between M3 Broker and AMQP client

Posted by Gordon Sim <gs...@redhat.com>.
Kamran Saadatjoo wrote:
> It turns out that this is a firewall problem after all. I though I had
> disabled the firewall on the Linux machine, but I guess I had not. I
> attempted to disable the firewall again, and now I'm getting further. I see
> the connection traced on the broker side, but the client is hanging
> indefinitely on the connect statement. 

Thats most likely an authentication failure that the client isn't 
handling. (I could confirm if you send the broker trace). The simplest 
thing initially is to turn of authentication for the broker: pass in 
--auth no when starting it up and try again.

RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
It turns out that this is a firewall problem after all. I though I had
disabled the firewall on the Linux machine, but I guess I had not. I
attempted to disable the firewall again, and now I'm getting further. I see
the connection traced on the broker side, but the client is hanging
indefinitely on the connect statement. 

Thanks for your help.

Kamran Saadatjoo

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Monday, May 12, 2008 2:55 AM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

Kamran Saadatjoo wrote:
> Thanks Robert: If you could, please tell me how I can find out the virtual
> host name of a C++ broker. I have one running on a Linux system and I'm
> trying to connect to it from a Windows Java client (the DeclareQueue.java
> example). The client terminates after about 20 or so seconds of wait with
> "Error connecting to broker" which is outputted in the "catch" section of
> connection.  I've used an empty string for the virtual host name, and used
> my root user and password to connect with. I think the problem may be that
I
> don’t have the correct virtual host name.  Would you know what I'm
missing? 

Can you turn on tracing for the c++ broker (pass in the -t option when 
starting it)? That will show what is happening. If when you try to 
connect you then see no output it may be a firewall issue. If you do see 
some output send it to the list and we should be able to determine what 
is going wrong. Thanks!

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 


Re: Communication problem between M3 Broker and AMQP client

Posted by Gordon Sim <gs...@redhat.com>.
Kamran Saadatjoo wrote:
> Thanks Robert: If you could, please tell me how I can find out the virtual
> host name of a C++ broker. I have one running on a Linux system and I'm
> trying to connect to it from a Windows Java client (the DeclareQueue.java
> example). The client terminates after about 20 or so seconds of wait with
> "Error connecting to broker" which is outputted in the "catch" section of
> connection.  I've used an empty string for the virtual host name, and used
> my root user and password to connect with. I think the problem may be that I
> don’t have the correct virtual host name.  Would you know what I'm missing? 

Can you turn on tracing for the c++ broker (pass in the -t option when 
starting it)? That will show what is happening. If when you try to 
connect you then see no output it may be a firewall issue. If you do see 
some output send it to the list and we should be able to determine what 
is going wrong. Thanks!

RE: Communication problem between M3 Broker and AMQP client

Posted by Kamran Saadatjoo <ka...@openflowsystems.com>.
Thanks Robert: If you could, please tell me how I can find out the virtual
host name of a C++ broker. I have one running on a Linux system and I'm
trying to connect to it from a Windows Java client (the DeclareQueue.java
example). The client terminates after about 20 or so seconds of wait with
"Error connecting to broker" which is outputted in the "catch" section of
connection.  I've used an empty string for the virtual host name, and used
my root user and password to connect with. I think the problem may be that I
don’t have the correct virtual host name.  Would you know what I'm missing? 

Thank you in advance.

Kamran Saadatjoo

-----Original Message-----
From: Robert Greig [mailto:robert.j.greig@gmail.com] 
Sent: Sunday, May 11, 2008 1:16 PM
To: qpid-users@incubator.apache.org
Subject: Re: Communication problem between M3 Broker and AMQP client

2008/5/11 Kamran Saadatjoo <ka...@openflowsystems.com>:
> Hi everyone: I've downloaded and built the M3 version of QPID, and tried
to
> run the AMQP example DeclareQueue against the Java broker in this release.
> The error I'm receiving is "Unsupported protocol version: 0.10".  I would
> appreciate it if anyone could tell me what I'm doing wrong. I've made sure
> that the path, classpath, and the other environment variables point to the
> libraries in this release.

The java broker on trunk (i.e M3) does not yet support 0-10.

If you want to use that API you will need to use the C++ broker.

If you want to use a Java broker, I recommend you use the M2.1
release, and the M2.1 java client (which is JMS only).

Using trunk if you are just trying to explore qpid and get things up
and running isn't really recommended at this stage of the M3
development lifecycle - there are going to be bugs and issues and
missing or incomplete features.

Robert

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM
 

Internal Virus Database is out-of-date.
Checked by AVG. 
Version: 7.5.519 / Virus Database: 269.22.13/1375 - Release Date: 4/12/2008
11:32 AM