You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by basavaraj <co...@gmail.com> on 2018/11/03 21:21:25 UTC

Qpid Proton 0.26.0 AMQP1.0 connection error

Hi All,  

I am working on Qpid AMQP  for my master thesis. I am able to communicate to
an external ActiveMQ server using JMS based client applications.
Additionally I need to create a C++ based AMQP client application which
listens to queue and write back to to the same queue as response. 

I can see that a client application built using qpid c++ messaging api works
perfectly with AMQP1.0. However, the examples of qpid proton built using
instructions on github doesn't. I get below error when use any of the c++
examples. When i run helloworld example i get below error. 

amqp:connection:framing-error: AMQP header mismatch: AMQP SASL layer
['AMQP\x03\x01\x00\x00']


Can some one help me solve this issue. I need to work with qpid proton as it
is easy to build reactive client applications using it. Or Is it possible to
create a method like on_message using qpid cpp messaging api. 

Many Thanks, 

Basavaraj



--
Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html

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


Re: Qpid Proton 0.26.0 AMQP1.0 connection error

Posted by Alan Conway <ac...@redhat.com>.
On Sat, Nov 3, 2018 at 6:32 PM Chuck Rolke <cr...@redhat.com> wrote:

> Hi basavaraj,
>
> The issue here is that the broker wants to negotiate a SASL layer but the
> Proton C++ example is skipping that during connection startup. AMQP allows
> startup options SASL and TLS before jumping into an AMQP session. SASL
> provides authentication variants and TLS provides authentication and
> encryption.
>
> In proton C++ the client will not send a SASL negotiation if the username
> and password are absent in the connection URL. To get your example working
> try providing a username and password in the connection url:
>
>     ./helloworld amqp://admin:password@127.0.0.1:5672
>
> Use the username and password that were configured for your broker. Now
> the client issues a SASL phase and supplies 'admin' as the username and
> 'password' as the password to the SASL negotiation.
>
>
Chuck is correct. Just for extra info: you can force the C++ client to use
SASL even if there is no user/pass like this:

    container.connect(url, connection_options().sasl_enabled(true));


> --Chuck
>
> ----- Original Message -----
> > From: "basavaraj" <co...@gmail.com>
> > To: users@qpid.apache.org
> > Sent: Saturday, November 3, 2018 5:21:25 PM
> > Subject: Qpid Proton 0.26.0 AMQP1.0 connection error
> >
> > Hi All,
> >
> > I am working on Qpid AMQP  for my master thesis. I am able to
> communicate to
> > an external ActiveMQ server using JMS based client applications.
> > Additionally I need to create a C++ based AMQP client application which
> > listens to queue and write back to to the same queue as response.
> >
> > I can see that a client application built using qpid c++ messaging api
> works
> > perfectly with AMQP1.0. However, the examples of qpid proton built using
> > instructions on github doesn't. I get below error when use any of the c++
> > examples. When i run helloworld example i get below error.
> >
> > amqp:connection:framing-error: AMQP header mismatch: AMQP SASL layer
> > ['AMQP\x03\x01\x00\x00']
> >
> >
> > Can some one help me solve this issue. I need to work with qpid proton
> as it
> > is easy to build reactive client applications using it. Or Is it
> possible to
> > create a method like on_message using qpid cpp messaging api.
> >
> > Many Thanks,
> >
> > Basavaraj
> >
> >
> >
> > --
> > Sent from:
> http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
> >
> > ---------------------------------------------------------------------
> > 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: Qpid Proton 0.26.0 AMQP1.0 connection error

Posted by Chuck Rolke <cr...@redhat.com>.
Hi basavaraj,

The issue here is that the broker wants to negotiate a SASL layer but the Proton C++ example is skipping that during connection startup. AMQP allows startup options SASL and TLS before jumping into an AMQP session. SASL provides authentication variants and TLS provides authentication and encryption.

In proton C++ the client will not send a SASL negotiation if the username and password are absent in the connection URL. To get your example working try providing a username and password in the connection url:

    ./helloworld amqp://admin:password@127.0.0.1:5672

Use the username and password that were configured for your broker. Now the client issues a SASL phase and supplies 'admin' as the username and 'password' as the password to the SASL negotiation.

--Chuck

----- Original Message -----
> From: "basavaraj" <co...@gmail.com>
> To: users@qpid.apache.org
> Sent: Saturday, November 3, 2018 5:21:25 PM
> Subject: Qpid Proton 0.26.0 AMQP1.0 connection error
> 
> Hi All,
> 
> I am working on Qpid AMQP  for my master thesis. I am able to communicate to
> an external ActiveMQ server using JMS based client applications.
> Additionally I need to create a C++ based AMQP client application which
> listens to queue and write back to to the same queue as response.
> 
> I can see that a client application built using qpid c++ messaging api works
> perfectly with AMQP1.0. However, the examples of qpid proton built using
> instructions on github doesn't. I get below error when use any of the c++
> examples. When i run helloworld example i get below error.
> 
> amqp:connection:framing-error: AMQP header mismatch: AMQP SASL layer
> ['AMQP\x03\x01\x00\x00']
> 
> 
> Can some one help me solve this issue. I need to work with qpid proton as it
> is easy to build reactive client applications using it. Or Is it possible to
> create a method like on_message using qpid cpp messaging api.
> 
> Many Thanks,
> 
> Basavaraj
> 
> 
> 
> --
> Sent from: http://qpid.2158936.n2.nabble.com/Apache-Qpid-users-f2158936.html
> 
> ---------------------------------------------------------------------
> 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