In the function:
pni_process_mechanisms(pn_transport_t *transport, const char *mechs)
mechs = MSSBCBS PLAIN ANONYMOUS EXTERNAL

transport->sasl->username and transport->sasl->password are correct.

EXTERNAL is selected because it is first to be tested in the function.
I changed the order so PLAIN was processed first and it connects and receives 1 
message.
I then get what looks like a NULL pointer error from .NET:

[00AADD40]:0 <- @transfer(20) [handle=0, delivery-id=0, 
delivery-tag=b"w\xff\xf7&\xa1y\x82H\x96\xd7p4:\xe5H\x84", message-format=0, 
more=false, batchable=true] (532) 
"\x00Sp\xc0\x0a\x05@@p\x00\x00\xea`@C\x00Sr\xc1\\x06\xa3\x13x-opt-enqueued-time\x83\x00\x00\x01S\x1a\x870b\xa3\x15x-opt-sequence-number\x81\x00\x00\x00\x00\x00\x00\xd0G\xa3\x12x-opt-locked-until\x83\x00\x00\x01S\x1a\x87\xa5\xa2\x00Ss\xc0\x8a\x0d\xa1$818bdc02-5412-4204-bf45-f54be347db0e@@@\xa1?http://opcfoundation-prototyping.servicebus.windows.net/MyTopic@\xa3\x16application/opcua+amqp@@@@C@\x00St\xc1\x01\x00\x00Su\xb0\x00\x00\x01\x07{"EventId":"9CaTawVxAEqCL+U2tU5r6w==","SourceNode":{"Id":"i=2253"},"SourceName":"System","EventType":{"Id":"i=11446"},"Time":"2016-02-25T22:22:43.6084751Z","ReceiveTime":"2016-02-25T22:22:43.6084751Z","Message":"The
 system cycle '5531' has started.","Severity":1}"
Application consumed 574 bytes from peer
process_input_ssl() returning 613, forwarded 574
Address: (null)
Subject: (no subject)
Content: 
b"{"EventId":"9CaTawVxAEqCL+U2tU5r6w==","SourceNode":{"Id":"i=2253"},"SourceName":"System","EventType":{"Id":"i=11446"},"Time":"2016-02-25T22:22:43.6084751Z","ReceiveTime":"2016-02-25T22:22:43.6084751Z","Message":"The
 system cycle '5531' has started.","Severity":1}"
process_output_ssl( max_len=16384 )
[00AADD40]:0 -> @disposition(21) [role=true, first=0, last=0, settled=true]
Gathered 27 bytes from app to send to peer
ssl_encrypt 53 network bytes
Next decryption, 0 left over
[00AADD40]:0 <- @detach(22) [handle=0, closed=true, error=@error(29) 
[condition=:"amqp:link:detach-forced", description="The link 
'G12:16548697:MyTopic/Subscriptions/default' is force detached by the broker 
due to errors occurred in consumer(link39638). Detach origin: ExceptionId: 
1d35d46d-a26d-493e-8b1c-a01ffbe0cdad-System.ArgumentNullException: Value cannot 
be null.\x0d\x0aParameter name: collection. 
TrackingId:44365b430002001000009ad656cf7eb9_G12_B31,TimeStamp:2/25/2016 
10:23:01 PM"]]
Application consumed 427 bytes from peer

I am guessing this is because my message is missing a field that proton expects.
Any idea what this field is?

-----Original Message-----
From: Cliff Jansen [mailto:cliffjan...@gmail.com] 
Sent: Thursday, February 25, 2016 12:54 PM
To: users@qpid.apache.org
Subject: Re: ServiceBus and Proton-C 0.12 IOP Issue

Thank-you for the additional information.

It appears that you successfully create an SSL encrypted TCP connection 
acceptable to each peer.  So SSL configuration seems fine.

It further appears that the service bus refuses to create a link to your topic 
based on an unauthorized access attempt, presumably based on the credentials 
you supplied.  Yet the credentials are OK based on their same use in AMQPLite.

Perhaps there is some quoting problem providing the url to messenger (from the 
command line?).  Or possibly the url encoded service bus key is being parsed 
incorrectly by Proton.

You could try creating your own pn_url_t (see url.h) from the url you are using 
with pn_url_parse(), and see if the associated
pn_url_username() and pn_url_password() are what you expect.

If all that is fine and you are compiling your own Proton library, you could 
further check that PLAIN sasl processing is the chosen sasl mechanism and that 
a correct username and password make it to that layer (in none_sasl.c).

On Thu, Feb 25, 2016 at 8:01 AM, Randy Armstrong <ra...@sparhawksoftware.com> 
wrote:
> I am using the "recv" example from the 0.12 codebase.
>
>
>
> The URL I am using is:
>
> amqps://receiver:<url encoded service bus
> key>@opcfoundation-prototyping.servicebus.windows.net/MyTopic/Subscrip
> key>tions/
> default"
>
>
>
> I have tried with
>
> pn_messenger_set_flags(messenger, PN_FLAGS_ALLOW_INSECURE_MECHS);
>
> and
>
> pn_messenger_set_flags(messenger, 0);
>
>
>
> The credentials are identical to what I provide to a AMQPLite client 
> that has no problems connecting and receiving messages.
>
>
>
> Any hints/suggestions/links to documentation would be appreciated.
>
>
>
> The trace from the program shows this error:
>
>
>
> [00B3D578]:0 <- @attach(18) [name="MyTopic/Subscriptions/default", 
> handle=0, role=false, snd-settle-mode=2, rcv-settle-mode=0, 
> initial-delivery-count=0, max-message-size=266240]
>
> Application consumed 68 bytes from peer
>
> process_input_ssl() returning 101, forwarded 68
>
> process_output_ssl( max_len=16384 )
>
> process_output_ssl() returning 0
>
> process_output_ssl( max_len=16384 )
>
> process_output_ssl() returning 0
>
> process_input_ssl( data size=357 )
>
> Next decryption, 0 left over
>
> [00B3D578]:0 <- @detach(22) [handle=0, closed=true, error=@error(29) 
> [condition=:"amqp:unauthorized-access", description="Unauthorized access.
> 'Listen' claim(s) are required to perform this operation. Resource:
> 'sb://opcfoundation-prototyping.servicebus.windows.net/mytopic/subscri
> ptions
> /default'.
> TrackingId:46e13f2c7e0043978dd72021e52b7d22_G22,TimeStamp:2/25/2016 
> 3:26:50 PM"]]
>
> Application consumed 317 bytes from peer
>
> process_input_ssl() returning 357, forwarded 317
>
> process_output_ssl( max_len=16384 )
>
> [00B3D578]:0 -> @detach(22) [handle=0, closed=true]
>
> Gathered 24 bytes from app to send to peer
>
> ssl_encrypt 53 network bytes
>
>
>
>
>


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

Reply via email to