You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@qpid.apache.org by Carlos Lugtu <ca...@live.com> on 2015/05/17 21:36:17 UTC

Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Hi All,

 

I'm new to amqp and qpid. I'm trying to get the base send.c and recv.c
examples to work on Windows out of the box with Java Broker 0.32.

 

For the broker: I changed the default authentication provider to anonymous
for the amqp port and I've turned logging level to debug.

 

If I run the python hello example from qpid-python-0.32, everything works
and I get the message back as expected with a whole of debug spew in the
qpid log.

 

If I run the send or recv qpid-proton-0.9.1-rc1 I end up with the following
log on the broker: 

 

2015-05-17 12:07:03,694 DEBUG [IoReceiver - /0:0:0:0:0:0:0:1:62110]
(protocol.MultiVersionProtocolEngine) - Unsupported protocol version
requested, replying with: AMQP_1_0

 

The send.exe exits as if everything is fine.

The recv.exe exits with a:
qpid-proton-0.9.1-rc1\examples\c\messenger\recv.c:132: no valid sources

 

Here are the send and recv commands that I'm using:

send.exe -a amqp://localhost:5672 hello

recv.exe amqp://localhost:5672

 

Can someone tell me what I'm doing wrong?

 

Thanks,

 

Carlos

 


RE: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Carlos Lugtu <cl...@microsoft.com>.
Ok I finally got things to work. I scrubbed my installation of the java broker and started over. Switched to anonymous for authentication. I'm doing this as a simple test for now, not going to run with this long term. Then ran with the following connection strings:
.\recv.exe amqp://anonymous@localhost:5672/amq.topic
.\send.exe -a amqp://anonymous@localhost:5672/amq.topic hello

Messages are sent and received as expected.

Thanks for all of your help getting here.

Carlos



-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Tuesday, May 19, 2015 2:44 AM
To: users@qpid.apache.org
Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

On 05/19/2015 10:35 AM, Rob Godfrey wrote:
> Probably not you but some issue with the "does this name map to the 
> interface the port is bound to" logic... what version of Linux are you 
> running?  I'll try to replicate.

I tried with 127.0.0.1 and the (unqualified) hostname, both gave the same not-found error.

I'm running fedora 17 (yes, I know its old!) on the laptop on which I ran this test, java 1.7 (OpenJDK).

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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/19/2015 10:35 AM, Rob Godfrey wrote:
> Probably not you but some issue with the "does this name map to the
> interface the port is bound to" logic... what version of Linux are you
> running?  I'll try to replicate.

I tried with 127.0.0.1 and the (unqualified) hostname, both gave the 
same not-found error.

I'm running fedora 17 (yes, I know its old!) on the laptop on which I 
ran this test, java 1.7 (OpenJDK).

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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Probably not you but some issue with the "does this name map to the
interface the port is bound to" logic... what version of Linux are you
running?  I'll try to replicate.

-- Rob

On 19 May 2015 at 11:28, Gordon Sim <gs...@redhat.com> wrote:
> On 05/19/2015 10:19 AM, Rob Godfrey wrote:
>>
>> Gordon: I'm a bit surprised if you needed to create a new virtual host
>> ... from 0.32 onwards the Java Broker supports the notion of aliases
>> for virtual hosts... on type of alias is the "hostnameAlias" which
>> when used on a port (as it is by default) will map the connection to
>> the default virtual host if the hostname in the open frame matches a
>> valid name for the address the port is bound to (and there isn't a
>> virtualhost with an exact match for the given name - in which case
>> that would be used).
>
>
> Quite possible I was doing something wrong. What I was seeing initially was:
>
>> [0xe6a620]:  -> SASL
>> [0xe6a620]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS,
>> initial-response=b""]
>> [0xe6a620]:  <- SASL
>> [0xe6a620]:0 <- @sasl-mechanisms(64)
>> [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS]]
>> [0xe6a620]:0 <- @sasl-outcome(68) [code=0]
>> [0xe6a620]:  -> AMQP
>> [0xe6a620]:0 -> @open(16)
>> [container-id="79ef0a4f-8be7-4e3a-bde6-30fe29c258f5", hostname="localhost"]
>> [0xe6a620]:0 -> @begin(17) [next-outgoing-id=0,
>> incoming-window=2147483647, outgoing-window=1]
>> [0xe6a620]:0 -> @attach(18) [name="sender-xxx", handle=0, role=false,
>> snd-settle-mode=2, rcv-settle-mode=0, source=@source(40)
>> [address="amq.fanout", durable=0, timeout=0, dynamic=false],
>> target=@target(41) [address="amq.fanout", durable=0, timeout=0,
>> dynamic=false], initial-delivery-count=0]
>> [0xe6a620]:  <- AMQP
>> [0xe6a620]:0 <- @open(16)
>> [container-id="9d5a0c75-0afd-4ccf-90ff-8a2e8eee1d32", max-frame-size=32768,
>> channel-max=0, properties={:product="qpid", :version="0.32",
>> :"qpid.build"="Unversioned directory", :"qpid.instance_name"="Broker"}]
>> [0xe6a620]:0 <- @close(24) [error=@error(29) [condition=:"amqp:not-found",
>> description="Unknown hostname in connection open: 'localhost'"]]
>> [0xe6a620]:  <- EOS
>> [0xe6a620]:0 -> @close(24) []
>> [0xe6a620]:  -> EOS
>
>
> After adding the virtual host called 'localhost' I didn't see this error
> anymore.
>
>
>
> ---------------------------------------------------------------------
> 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: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/19/2015 10:19 AM, Rob Godfrey wrote:
> Gordon: I'm a bit surprised if you needed to create a new virtual host
> ... from 0.32 onwards the Java Broker supports the notion of aliases
> for virtual hosts... on type of alias is the "hostnameAlias" which
> when used on a port (as it is by default) will map the connection to
> the default virtual host if the hostname in the open frame matches a
> valid name for the address the port is bound to (and there isn't a
> virtualhost with an exact match for the given name - in which case
> that would be used).

Quite possible I was doing something wrong. What I was seeing initially was:

> [0xe6a620]:  -> SASL
> [0xe6a620]:0 -> @sasl-init(65) [mechanism=:ANONYMOUS, initial-response=b""]
> [0xe6a620]:  <- SASL
> [0xe6a620]:0 <- @sasl-mechanisms(64) [sasl-server-mechanisms=@PN_SYMBOL[:ANONYMOUS]]
> [0xe6a620]:0 <- @sasl-outcome(68) [code=0]
> [0xe6a620]:  -> AMQP
> [0xe6a620]:0 -> @open(16) [container-id="79ef0a4f-8be7-4e3a-bde6-30fe29c258f5", hostname="localhost"]
> [0xe6a620]:0 -> @begin(17) [next-outgoing-id=0, incoming-window=2147483647, outgoing-window=1]
> [0xe6a620]:0 -> @attach(18) [name="sender-xxx", handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, source=@source(40) [address="amq.fanout", durable=0, timeout=0, dynamic=false], target=@target(41) [address="amq.fanout", durable=0, timeout=0, dynamic=false], initial-delivery-count=0]
> [0xe6a620]:  <- AMQP
> [0xe6a620]:0 <- @open(16) [container-id="9d5a0c75-0afd-4ccf-90ff-8a2e8eee1d32", max-frame-size=32768, channel-max=0, properties={:product="qpid", :version="0.32", :"qpid.build"="Unversioned directory", :"qpid.instance_name"="Broker"}]
> [0xe6a620]:0 <- @close(24) [error=@error(29) [condition=:"amqp:not-found", description="Unknown hostname in connection open: 'localhost'"]]
> [0xe6a620]:  <- EOS
> [0xe6a620]:0 -> @close(24) []
> [0xe6a620]:  -> EOS

After adding the virtual host called 'localhost' I didn't see this error 
anymore.


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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Gordon: I'm a bit surprised if you needed to create a new virtual host
... from 0.32 onwards the Java Broker supports the notion of aliases
for virtual hosts... on type of alias is the "hostnameAlias" which
when used on a port (as it is by default) will map the connection to
the default virtual host if the hostname in the open frame matches a
valid name for the address the port is bound to (and there isn't a
virtualhost with an exact match for the given name - in which case
that would be used).

Carlos: apologies, I use a Mac, and although I do have a Windows VM I
don't actually have any of tooling (or - more importantly - the
knowledge) necessary to build C programs on that.

As Gordon suggests, getting the FRM logging enabled on the client
would be great... meanwhile I'll check into why my suggestion didn't
work on the broker.

-- Rob

On 19 May 2015 at 10:37, Gordon Sim <gs...@redhat.com> wrote:
> On 05/19/2015 12:06 AM, Carlos Lugtu wrote:
>>
>> Thanks for the response. Can you send me your configuration? Config.json
>
>
> Attached.
>
>> I'd like to make sure I'm adding the virtual hosts correctly.
>
>
> I'm not 100% sure I did things correctly - I just used the web gui - I have
> no real expertise on configuration of the java broker.
>
>> The asserts that I'm getting are totally different on Windows, so I'm
>> guessing there are some differences.
>
>
> Did removing the extra colon help at all? Can you run with PN_TRACE_FRM=1
> set as an environment variable? That will give the protocol trace which
> hopefully will shed some light...
>
>
>> Can anyone out there reproduce this on Windows?
>
>
>
>
> ---------------------------------------------------------------------
> 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: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/19/2015 12:06 AM, Carlos Lugtu wrote:
> Thanks for the response. Can you send me your configuration? Config.json

Attached.

> I'd like to make sure I'm adding the virtual hosts correctly.

I'm not 100% sure I did things correctly - I just used the web gui - I 
have no real expertise on configuration of the java broker.

> The asserts that I'm getting are totally different on Windows, so I'm guessing there are some differences.

Did removing the extra colon help at all? Can you run with 
PN_TRACE_FRM=1 set as an environment variable? That will give the 
protocol trace which hopefully will shed some light...

> Can anyone out there reproduce this on Windows?


RE: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Carlos Lugtu <cl...@microsoft.com>.
Thanks for the response. Can you send me your configuration? Config.json

I'd like to make sure I'm adding the virtual hosts correctly.

The asserts that I'm getting are totally different on Windows, so I'm guessing there are some differences.

Can anyone out there reproduce this on Windows?

Thanks,

C

-----Original Message-----
From: Gordon Sim [mailto:gsim@redhat.com] 
Sent: Monday, May 18, 2015 9:14 AM
To: users@qpid.apache.org
Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

On 05/18/2015 04:46 PM, Carlos Lugtu wrote:
> .\send.exe -a amqp://anonymous:@localhost:5672 hello

Use amqp://anonymous@localhost:5672, with that I see a successful anonymous authentication (if that is not a contradiction in terms) from messenger 0.9.1 to java broker 0.32. (With the extra colon I get an
assertion: transport.c:1599: transport_consume: Assertion `n == (-1)' 
failed).

However I can't actually successfully send, as messenger puts 'localhost' in as the hostname on open, which the broker rejects. If I add a virtualhostnode and virtualhost  with that name, then I can connect successfully.

To actually send a message you also need some node identifier in the url, e.g. amqp://anonymous:@localhost:5672/amq.fanout, or I get a the connection closed by the broker with amqp:connection:forced, NullPointerException. Using that url I can send a message to a receiver using the same url via the java broker.

Note I'm running on linux, not windows, however. Not sure whether that makes a difference.

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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/18/2015 04:46 PM, Carlos Lugtu wrote:
> .\send.exe -a amqp://anonymous:@localhost:5672 hello

Use amqp://anonymous@localhost:5672, with that I see a successful 
anonymous authentication (if that is not a contradiction in terms) from 
messenger 0.9.1 to java broker 0.32. (With the extra colon I get an 
assertion: transport.c:1599: transport_consume: Assertion `n == (-1)' 
failed).

However I can't actually successfully send, as messenger puts 
'localhost' in as the hostname on open, which the broker rejects. If I 
add a virtualhostnode and virtualhost  with that name, then I can 
connect successfully.

To actually send a message you also need some node identifier in the 
url, e.g. amqp://anonymous:@localhost:5672/amq.fanout, or I get a the 
connection closed by the broker with amqp:connection:forced, 
NullPointerException. Using that url I can send a message to a receiver 
using the same url via the java broker.

Note I'm running on linux, not windows, however. Not sure whether that 
makes a difference.

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


RE: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Carlos Lugtu <cl...@microsoft.com>.
Thanks again Rob.

Unfortunately nothing much changed. I'm not seeing any logs from the framer.  I'm also continuing to get the same assert.

2015-05-18 15:57:14,356 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:51932] (stats.StatisticsCounter) - Resetting statistics for counter: messages-delivered-0-13
2015-05-18 15:57:14,356 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:51932] (stats.StatisticsCounter) - Resetting statistics for counter: data-delivered-0-14
2015-05-18 15:57:14,356 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:51932] (stats.StatisticsCounter) - Resetting statistics for counter: messages-received-0-15
2015-05-18 15:57:14,356 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:51932] (stats.StatisticsCounter) - Resetting statistics for counter: data-received-0-16



-----Original Message-----
From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com] 
Sent: Monday, May 18, 2015 9:05 AM
To: users@qpid.apache.org
Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Is it possible you to turn on frame debug logging in the Java Broker...

Adding something like the following:

    <logger additivity="true" name="FRM">

        <level value="debug"/>

    </logger>

to the log4j.xml for the broker should do it.


I'm guessing that proton is trying to send to some address on the broker that isn't an already defined queue or exchange.  In this case the broker will be responding to the client to say that no such address exists.

Having the log details should make this clear though,

-- Rob

On 18 May 2015 at 17:46, Carlos Lugtu <cl...@microsoft.com> wrote:
> Thanks for the response. Now I'm getting this from proton when I run 
> the following command
>
> .\send.exe -a amqp://anonymous:@localhost:5672 hello
>
> Assertion failed: n == PN_EOS, file 
> qpid-proton-0.9.1-rc1\proton-c\src\transport\transport.c, line 1599
>
> If I switch back to the password authentication I see the same thing. This happens on both send and recv.
>
> On the broker I get the following logs:
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] 
> (stats.StatisticsCounter) - Resetting statistics for counter: 
> messages-delivered-7-33
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] 
> (stats.StatisticsCounter) - Resetting statistics for counter: 
> data-delivered-7-34
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] 
> (stats.StatisticsCounter) - Resetting statistics for counter: 
> messages-received-7-35
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] 
> (stats.StatisticsCounter) - Resetting statistics for counter: 
> data-received-7-36
>
> So something different is going on, but I'm still not sure where the failure is.
>
> Can anyone reproduce this simple test?
>
> Thanks in advance for your help.
>
> C
>
>
> -----Original Message-----
> From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> Sent: Monday, May 18, 2015 3:01 AM
> To: users@qpid.apache.org
> Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker
>
> OK - so for Carlos, if he wants to use anonymous with proton 0.9.1 he 
> could use
>
> amqp://anonymous:@localhost:5672
>
> (where anonymous could actually be substituted by any non-zero length 
> string)
>
> -- Rob
>
> On 18 May 2015 at 11:56, Gordon Sim <gs...@redhat.com> wrote:
>> On 05/18/2015 10:19 AM, Rob Godfrey wrote:
>>>
>>> Does the proton client support Anonymous SASL, or would Carlos need 
>>> to set up some user/password database on the server side (i.e. is 
>>> supplying a user/password just to force the client into doing SASL 
>>> negotiation)?
>>
>>
>> Sorry, I guess I didn't actually answer the question!
>>
>> In 0.8 and earlier, messenger always used a SASL layer, with 
>> ANONYMOUS being the default unless a username was supplied. In 0.9 
>> and 0.9.1, a SASL layer is only used if a username is specified. If 
>> there is no password specified, then ANONYMOUS is chosen, else PLAIN.
>>
>> In the next release, 0.10, for linux at least there is cyrus SASL 
>> support which if built may alter the picture as well (it appears to 
>> choose the first suitable mechanism offered by the peer/broker).
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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


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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Is it possible you to turn on frame debug logging in the Java Broker...

Adding something like the following:

    <logger additivity="true" name="FRM">

        <level value="debug"/>

    </logger>

to the log4j.xml for the broker should do it.


I'm guessing that proton is trying to send to some address on the
broker that isn't an already defined queue or exchange.  In this case
the broker will be responding to the client to say that no such
address exists.

Having the log details should make this clear though,

-- Rob

On 18 May 2015 at 17:46, Carlos Lugtu <cl...@microsoft.com> wrote:
> Thanks for the response. Now I'm getting this from proton when I run the following command
>
> .\send.exe -a amqp://anonymous:@localhost:5672 hello
>
> Assertion failed: n == PN_EOS, file qpid-proton-0.9.1-rc1\proton-c\src\transport\transport.c, line 1599
>
> If I switch back to the password authentication I see the same thing. This happens on both send and recv.
>
> On the broker I get the following logs:
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: messages-delivered-7-33
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: data-delivered-7-34
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: messages-received-7-35
> 2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: data-received-7-36
>
> So something different is going on, but I'm still not sure where the failure is.
>
> Can anyone reproduce this simple test?
>
> Thanks in advance for your help.
>
> C
>
>
> -----Original Message-----
> From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com]
> Sent: Monday, May 18, 2015 3:01 AM
> To: users@qpid.apache.org
> Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker
>
> OK - so for Carlos, if he wants to use anonymous with proton 0.9.1 he could use
>
> amqp://anonymous:@localhost:5672
>
> (where anonymous could actually be substituted by any non-zero length string)
>
> -- Rob
>
> On 18 May 2015 at 11:56, Gordon Sim <gs...@redhat.com> wrote:
>> On 05/18/2015 10:19 AM, Rob Godfrey wrote:
>>>
>>> Does the proton client support Anonymous SASL, or would Carlos need
>>> to set up some user/password database on the server side (i.e. is
>>> supplying a user/password just to force the client into doing SASL
>>> negotiation)?
>>
>>
>> Sorry, I guess I didn't actually answer the question!
>>
>> In 0.8 and earlier, messenger always used a SASL layer, with ANONYMOUS
>> being the default unless a username was supplied. In 0.9 and 0.9.1, a
>> SASL layer is only used if a username is specified. If there is no
>> password specified, then ANONYMOUS is chosen, else PLAIN.
>>
>> In the next release, 0.10, for linux at least there is cyrus SASL
>> support which if built may alter the picture as well (it appears to
>> choose the first suitable mechanism offered by the peer/broker).
>>
>>
>> ---------------------------------------------------------------------
>> 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
>
>
> ---------------------------------------------------------------------
> 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: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Carlos Lugtu <cl...@microsoft.com>.
Thanks for the response. Now I'm getting this from proton when I run the following command

.\send.exe -a amqp://anonymous:@localhost:5672 hello

Assertion failed: n == PN_EOS, file qpid-proton-0.9.1-rc1\proton-c\src\transport\transport.c, line 1599

If I switch back to the password authentication I see the same thing. This happens on both send and recv.

On the broker I get the following logs:
2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: messages-delivered-7-33
2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: data-delivered-7-34
2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: messages-received-7-35
2015-05-18 08:45:03,693 INFO  [IoReceiver - /0:0:0:0:0:0:0:1:46494] (stats.StatisticsCounter) - Resetting statistics for counter: data-received-7-36

So something different is going on, but I'm still not sure where the failure is.

Can anyone reproduce this simple test?

Thanks in advance for your help.

C


-----Original Message-----
From: Rob Godfrey [mailto:rob.j.godfrey@gmail.com] 
Sent: Monday, May 18, 2015 3:01 AM
To: users@qpid.apache.org
Subject: Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

OK - so for Carlos, if he wants to use anonymous with proton 0.9.1 he could use

amqp://anonymous:@localhost:5672

(where anonymous could actually be substituted by any non-zero length string)

-- Rob

On 18 May 2015 at 11:56, Gordon Sim <gs...@redhat.com> wrote:
> On 05/18/2015 10:19 AM, Rob Godfrey wrote:
>>
>> Does the proton client support Anonymous SASL, or would Carlos need 
>> to set up some user/password database on the server side (i.e. is 
>> supplying a user/password just to force the client into doing SASL 
>> negotiation)?
>
>
> Sorry, I guess I didn't actually answer the question!
>
> In 0.8 and earlier, messenger always used a SASL layer, with ANONYMOUS 
> being the default unless a username was supplied. In 0.9 and 0.9.1, a 
> SASL layer is only used if a username is specified. If there is no 
> password specified, then ANONYMOUS is chosen, else PLAIN.
>
> In the next release, 0.10, for linux at least there is cyrus SASL 
> support which if built may alter the picture as well (it appears to 
> choose the first suitable mechanism offered by the peer/broker).
>
>
> ---------------------------------------------------------------------
> 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


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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
OK - so for Carlos, if he wants to use anonymous with proton 0.9.1 he could use

amqp://anonymous:@localhost:5672

(where anonymous could actually be substituted by any non-zero length string)

-- Rob

On 18 May 2015 at 11:56, Gordon Sim <gs...@redhat.com> wrote:
> On 05/18/2015 10:19 AM, Rob Godfrey wrote:
>>
>> Does the proton client support Anonymous SASL, or would Carlos need to
>> set up some user/password database on the server side (i.e. is
>> supplying a user/password just to force the client into doing SASL
>> negotiation)?
>
>
> Sorry, I guess I didn't actually answer the question!
>
> In 0.8 and earlier, messenger always used a SASL layer, with ANONYMOUS being
> the default unless a username was supplied. In 0.9 and 0.9.1, a SASL layer
> is only used if a username is specified. If there is no password specified,
> then ANONYMOUS is chosen, else PLAIN.
>
> In the next release, 0.10, for linux at least there is cyrus SASL support
> which if built may alter the picture as well (it appears to choose the first
> suitable mechanism offered by the peer/broker).
>
>
> ---------------------------------------------------------------------
> 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: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/18/2015 10:19 AM, Rob Godfrey wrote:
> Does the proton client support Anonymous SASL, or would Carlos need to
> set up some user/password database on the server side (i.e. is
> supplying a user/password just to force the client into doing SASL
> negotiation)?

Sorry, I guess I didn't actually answer the question!

In 0.8 and earlier, messenger always used a SASL layer, with ANONYMOUS 
being the default unless a username was supplied. In 0.9 and 0.9.1, a 
SASL layer is only used if a username is specified. If there is no 
password specified, then ANONYMOUS is chosen, else PLAIN.

In the next release, 0.10, for linux at least there is cyrus SASL 
support which if built may alter the picture as well (it appears to 
choose the first suitable mechanism offered by the peer/broker).

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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Does the proton client support Anonymous SASL, or would Carlos need to
set up some user/password database on the server side (i.e. is
supplying a user/password just to force the client into doing SASL
negotiation)?

-- Rob

On 18 May 2015 at 10:53, Gordon Sim <gs...@redhat.com> wrote:
> On 05/17/2015 11:01 PM, Rob Godfrey wrote:
>>
>> Hi Carlos,
>>
>> at a guess the proton client is trying to communicate without creating
>> a SASL authentication layer.
>>
>> AMQP 1.0 allows establishment without establishing any authentication
>> layer - distinct from requiring an authentication layer but allowing
>> the ANONYMOUS mechanism.
>>
>> The Java Broker does not currently support this mode of establishment
>> and requires that the SASL layer is established - though the chosen
>> mechanism can (and would be given you configuration) ANONYMOUS.
>>
>> I'm not very familiar with the Proton clients and how you can
>> configure them to establish in this way.
>
>
> You should be able to do so by specifying the user and password in the url,
> e.g. amqp://myuser:mypassword@myhostname
>
>
> ---------------------------------------------------------------------
> 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: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Gordon Sim <gs...@redhat.com>.
On 05/17/2015 11:01 PM, Rob Godfrey wrote:
> Hi Carlos,
>
> at a guess the proton client is trying to communicate without creating
> a SASL authentication layer.
>
> AMQP 1.0 allows establishment without establishing any authentication
> layer - distinct from requiring an authentication layer but allowing
> the ANONYMOUS mechanism.
>
> The Java Broker does not currently support this mode of establishment
> and requires that the SASL layer is established - though the chosen
> mechanism can (and would be given you configuration) ANONYMOUS.
>
> I'm not very familiar with the Proton clients and how you can
> configure them to establish in this way.

You should be able to do so by specifying the user and password in the 
url, e.g. amqp://myuser:mypassword@myhostname


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


Re: Help with Proton-c 0.9.1 and Qpid 0.32 Java Broker

Posted by Rob Godfrey <ro...@gmail.com>.
Hi Carlos,

at a guess the proton client is trying to communicate without creating
a SASL authentication layer.

AMQP 1.0 allows establishment without establishing any authentication
layer - distinct from requiring an authentication layer but allowing
the ANONYMOUS mechanism.

The Java Broker does not currently support this mode of establishment
and requires that the SASL layer is established - though the chosen
mechanism can (and would be given you configuration) ANONYMOUS.

I'm not very familiar with the Proton clients and how you can
configure them to establish in this way.  The response from the broker
"Unsupported protocol version requested, replying with: AMQP_1_0" is
saying it is sending information back to the client that it should
attempt reconnection but to first establish an authentication layer -
obviously the client is not doing this.

Hopefully someone more familiar with those clients can step in and can
help some more.

-- Rob

On 17 May 2015 at 21:36, Carlos Lugtu <ca...@live.com> wrote:
> Hi All,
>
>
>
> I'm new to amqp and qpid. I'm trying to get the base send.c and recv.c
> examples to work on Windows out of the box with Java Broker 0.32.
>
>
>
> For the broker: I changed the default authentication provider to anonymous
> for the amqp port and I've turned logging level to debug.
>
>
>
> If I run the python hello example from qpid-python-0.32, everything works
> and I get the message back as expected with a whole of debug spew in the
> qpid log.
>
>
>
> If I run the send or recv qpid-proton-0.9.1-rc1 I end up with the following
> log on the broker:
>
>
>
> 2015-05-17 12:07:03,694 DEBUG [IoReceiver - /0:0:0:0:0:0:0:1:62110]
> (protocol.MultiVersionProtocolEngine) - Unsupported protocol version
> requested, replying with: AMQP_1_0
>
>
>
> The send.exe exits as if everything is fine.
>
> The recv.exe exits with a:
> qpid-proton-0.9.1-rc1\examples\c\messenger\recv.c:132: no valid sources
>
>
>
> Here are the send and recv commands that I'm using:
>
> send.exe -a amqp://localhost:5672 hello
>
> recv.exe amqp://localhost:5672
>
>
>
> Can someone tell me what I'm doing wrong?
>
>
>
> Thanks,
>
>
>
> Carlos
>
>
>

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