You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by John McLaughlin <jo...@exara.net> on 2016/08/24 00:54:10 UTC

QPID C++ Broker and QPID Proton C++ Example interoperability problem

QPID/AMPQ noob here, but I could use some help.

I git-cloned the latest repos for qpid-cpp and qpid-proton.  For each, I
successfully built and "sudo installed" with CMake/Make using default
configs.

As a test, I wanted to run qpidd and an example client & server from each
repo (cpp & proton).

The qpid-cpp broker (qpidd) seemed to work fine with the qpid-cpp examples
server & client.

However, when I tried to use the qpid-proton example server I had the
following results:

1. Running qpidd with a default qpidd.conf and then trying to execute
qpid-proton/bld/examples/cpp/server I get the following:
$ ./server
server connected to amqp://0.0.0.0:5672/examples
*amqp:connection:framing-error: AMQP header mismatch: Pre standard AMQP
connection ['AMQP\x01\x01\x00\x0a']*

so I seemed to recall reading somewhere that AMPQ 1.0 was not enabled by
default in qpidd (which seems odd to me), so I added "protocols=amqp1.0" to
my qpidd.conf and restarted the daemon.

2. Running qpidd with the modified qpidd.conf and then trying to execute
qpid-proton/bld/examples/cpp/server I get the following:

$ ./server
server connected to amqp://0.0.0.0:5672/examples
*amqp:connection:framing-error: AMQP header mismatch: Pre standard AMQP
connection ['AMQP\x01\x01\x00\x00']*

Seeing that the hex values changed I believe my change had an effect, but I
am left with a mystery as to why my qpid-proton based server cannot connect
to my qpid-cpp broker (qpidd).

*Can anyone shed some light or point me in a meaningful direction?*

Tech details:
$ qpidd --version -> qpidd (qpid-cpp) version 0.35
$ which qpidd -> /usr/local/sbin/qpidd
$ gcc --version -> gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
$ g++ --version -> g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
$ lsb_release -a -> Ubuntu 14.04.4 LTS
$ uname -a -> Linux john1 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15
03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
Last qpid-proton GIT commit : 7f87f1bbc674e2021da7cbd97d23a1400c5dadd4
Last qpid-cpp GIT commit : 61361614703a459483aa5f2135637daf15e1864a




--
View this message in context: http://qpid.2158936.n2.nabble.com/QPID-C-Broker-and-QPID-Proton-C-Example-interoperability-problem-tp7649519.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: QPID C++ Broker and QPID Proton C++ Example interoperability problem

Posted by Gordon Sim <gs...@redhat.com>.
On 25/08/16 21:40, John McLaughlin wrote:
> I am not sure of the proper etiquette here, but I wanted to say thanks to
> Gordon.

Most welcome, thanks for giving the QPid project a try!

> Building the C++ qpidd with "-Damqp_force=true" did, in fact, solve my
> problem.

Great!


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


Re: QPID C++ Broker and QPID Proton C++ Example interoperability problem

Posted by John McLaughlin <jo...@exara.net>.
I am not sure of the proper etiquette here, but I wanted to say thanks to
Gordon.

Building the C++ qpidd with "-Damqp_force=true" did, in fact, solve my
problem.

Thank you.
John




--
View this message in context: http://qpid.2158936.n2.nabble.com/QPID-C-Broker-and-QPID-Proton-C-Example-interoperability-problem-tp7649519p7649635.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: QPID C++ Broker and QPID Proton C++ Example interoperability problem

Posted by Gordon Sim <gs...@redhat.com>.
On 24/08/16 01:54, John McLaughlin wrote:
> QPID/AMPQ noob here, but I could use some help.
>
> I git-cloned the latest repos for qpid-cpp and qpid-proton.  For each, I
> successfully built and "sudo installed" with CMake/Make using default
> configs.
>
> As a test, I wanted to run qpidd and an example client & server from each
> repo (cpp & proton).
>
> The qpid-cpp broker (qpidd) seemed to work fine with the qpid-cpp examples
> server & client.
>
> However, when I tried to use the qpid-proton example server I had the
> following results:
>
> 1. Running qpidd with a default qpidd.conf and then trying to execute
> qpid-proton/bld/examples/cpp/server I get the following:
> $ ./server
> server connected to amqp://0.0.0.0:5672/examples
> *amqp:connection:framing-error: AMQP header mismatch: Pre standard AMQP
> connection ['AMQP\x01\x01\x00\x0a']*
>
> so I seemed to recall reading somewhere that AMPQ 1.0 was not enabled by
> default in qpidd (which seems odd to me), so I added "protocols=amqp1.0" to
> my qpidd.conf and restarted the daemon.

The protocols option limits the available protocols offered. It doesn't 
add them. As Adel points out, to have amqp 1.0 enabled, you need to have 
the amqp.so module built (it depends on proton) and loaded (using 
--module-dir or --load-module, or by having the module in the default 
modules directory).

qpidd --help should show you the default module directory location and 
you can check there whether amqp.so is available. If not, most likely 
your broker was built without proton being installed. At present it is 
treated as an optional dependency unless you set -Damqp_force=true (in 
which case you'll get an error if proton can't be found).

We should probably start considering switching that round, so that 
proton is required by default but if you don't want 1.0 you can 
explicitly disable it.


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


RE: QPID C++ Broker and QPID Proton C++ Example interoperability problem

Posted by Adel Boutros <ad...@live.com>.
Hello John,

A while ago, when I was testing with Qpid C++ broker, I encountered similar errors where I couldn't communicate using AMQP 1.0. 

I solved it by launching qpidd with the following option "--load-module=amqp.so". Amqp.so is a library which is also built when you cmake/make Qpid C++ Broker. If you don't have it anywhere, make sure in the Cmake logs, you don't have something like "amqp disabled".

In the logs of the Qpid broker, you would see a log similar to "AMQP 1.0 support enabled" when the load-module is working.

Reference: http://qpid.apache.org/releases/qpid-cpp-0.34/cpp-broker/book/ch01.html#RASC-Slightlymorecomplexconfiguration 

Regards,
Adel

> Date: Tue, 23 Aug 2016 17:54:10 -0700
> From: john@exara.net
> To: users@qpid.apache.org
> Subject: QPID C++ Broker and QPID Proton C++ Example interoperability problem
> 
> QPID/AMPQ noob here, but I could use some help.
> 
> I git-cloned the latest repos for qpid-cpp and qpid-proton.  For each, I
> successfully built and "sudo installed" with CMake/Make using default
> configs.
> 
> As a test, I wanted to run qpidd and an example client & server from each
> repo (cpp & proton).
> 
> The qpid-cpp broker (qpidd) seemed to work fine with the qpid-cpp examples
> server & client.
> 
> However, when I tried to use the qpid-proton example server I had the
> following results:
> 
> 1. Running qpidd with a default qpidd.conf and then trying to execute
> qpid-proton/bld/examples/cpp/server I get the following:
> $ ./server
> server connected to amqp://0.0.0.0:5672/examples
> *amqp:connection:framing-error: AMQP header mismatch: Pre standard AMQP
> connection ['AMQP\x01\x01\x00\x0a']*
> 
> so I seemed to recall reading somewhere that AMPQ 1.0 was not enabled by
> default in qpidd (which seems odd to me), so I added "protocols=amqp1.0" to
> my qpidd.conf and restarted the daemon.
> 
> 2. Running qpidd with the modified qpidd.conf and then trying to execute
> qpid-proton/bld/examples/cpp/server I get the following:
> 
> $ ./server
> server connected to amqp://0.0.0.0:5672/examples
> *amqp:connection:framing-error: AMQP header mismatch: Pre standard AMQP
> connection ['AMQP\x01\x01\x00\x00']*
> 
> Seeing that the hex values changed I believe my change had an effect, but I
> am left with a mystery as to why my qpid-proton based server cannot connect
> to my qpid-cpp broker (qpidd).
> 
> *Can anyone shed some light or point me in a meaningful direction?*
> 
> Tech details:
> $ qpidd --version -> qpidd (qpid-cpp) version 0.35
> $ which qpidd -> /usr/local/sbin/qpidd
> $ gcc --version -> gcc (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
> $ g++ --version -> g++ (Ubuntu 4.8.4-2ubuntu1~14.04.3) 4.8.4
> $ lsb_release -a -> Ubuntu 14.04.4 LTS
> $ uname -a -> Linux john1 3.13.0-32-generic #57-Ubuntu SMP Tue Jul 15
> 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
> Last qpid-proton GIT commit : 7f87f1bbc674e2021da7cbd97d23a1400c5dadd4
> Last qpid-cpp GIT commit : 61361614703a459483aa5f2135637daf15e1864a
> 
> 
> 
> 
> --
> View this message in context: http://qpid.2158936.n2.nabble.com/QPID-C-Broker-and-QPID-Proton-C-Example-interoperability-problem-tp7649519.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
>