[
https://issues.apache.org/jira/browse/PROTON-1695?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16412854#comment-16412854
]
Roddie Kieley commented on PROTON-1695:
---------------------------------------
In doing some follow up work on this I first ran into:
{code:java}
1: proton_tests.reactor.ApplicationEventTest.test_application_events .......
pass
1: proton_tests.reactor.ContainerTest. \
1: test_authentication_via_container_attributes ........................
start
1: 2018-03-24 22:39:54,593 ERROR proton:io:sasl_error: SASL(-13): user not
found: no secret in database (Failed to authenticate client [mech=DIGEST-MD5])
1: 2018-03-24 22:39:54,595 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: 2018-03-24 22:39:54,596 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: proton_tests.reactor.ContainerTest. \
1: test_authentication_via_container_attributes ........................
fail
1: Error during test: Traceback (most recent call last):
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton-test",
line 365, in run
1: phase()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton_tests/reactor.py",
line 395, in test_authentication_via_container_attributes
1: container.run()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 148, in run
1: while self.process(): pass
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 174, in process
1: self._check_errors()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 170, in _check_errors
1: _compat.raise_(exc, value, tb)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 4081, in dispatch
1: ev.dispatch(self.handler)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3990, in dispatch
1: result = dispatch(handler, type.method, self)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3868, in dispatch
1: return m(*args)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/handlers.py",
line 418, in on_transport_error
1: event.connection.close()
1: AttributeError: 'NoneType' object has no attribute 'close'
1: proton_tests.reactor.ContainerTest.test_authentication_via_kwargs .......
start
1: 2018-03-24 22:39:54,634 ERROR proton:io:sasl_error: SASL(-13): user not
found: no secret in database (Failed to authenticate client [mech=DIGEST-MD5])
1: 2018-03-24 22:39:54,636 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: 2018-03-24 22:39:54,637 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: proton_tests.reactor.ContainerTest.test_authentication_via_kwargs .......
fail
1: Error during test: Traceback (most recent call last):
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton-test",
line 365, in run
1: phase()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton_tests/reactor.py",
line 403, in test_authentication_via_kwargs
1: container.run()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 148, in run
1: while self.process(): pass
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 174, in process
1: self._check_errors()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 170, in _check_errors
1: _compat.raise_(exc, value, tb)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 4081, in dispatch
1: ev.dispatch(self.handler)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3990, in dispatch
1: result = dispatch(handler, type.method, self)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3868, in dispatch
1: return m(*args)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/handlers.py",
line 418, in on_transport_error
1: event.connection.close()
1: AttributeError: 'NoneType' object has no attribute 'close'
1: proton_tests.reactor.ContainerTest.test_authentication_via_url ..........
start
1: 2018-03-24 22:39:54,672 ERROR proton:io:sasl_error: SASL(-13): user not
found: no secret in database (Failed to authenticate client [mech=DIGEST-MD5])
1: 2018-03-24 22:39:54,673 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: 2018-03-24 22:39:54,674 ERROR amqp:unauthorized-access: Authentication
failed [mech=DIGEST-MD5] (connection aborted)
1: proton_tests.reactor.ContainerTest.test_authentication_via_url ..........
fail
1: Error during test: Traceback (most recent call last):
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton-test",
line 365, in run
1: phase()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/tests/python/proton_tests/reactor.py",
line 385, in test_authentication_via_url
1: container.run()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 148, in run
1: while self.process(): pass
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 174, in process
1: self._check_errors()
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/reactor.py",
line 170, in _check_errors
1: _compat.raise_(exc, value, tb)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 4081, in dispatch
1: ev.dispatch(self.handler)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3990, in dispatch
1: result = dispatch(handler, type.method, self)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/__init__.py",
line 3868, in dispatch
1: return m(*args)
1: File
"/Users/rkieley/LocalProjects/apache/qpid-proton/proton-c/bindings/python/proton/handlers.py",
line 418, in on_transport_error
1: event.connection.close()
1: AttributeError: 'NoneType' object has no attribute 'close'
1: proton_tests.reactor.ContainerTest.test_event_has_container_attribute ...
pass
{code}
However, that trace is from a rebuilt 0.18.1 tag from the time of the original
investigation. The above happens when:
{code}
CYRUS_SASL_INCLUDE_DIR /usr/include
CYRUS_SASL_LIBRARY /usr/lib/libsasl2.dylib
{code}
With the MacPorts cyrus-sasl2 installed and configured as per:
{code}
CYRUS_SASL_INCLUDE_DIR /opt/local/include
CYRUS_SASL_LIBRARY /opt/local/lib/libsasl2.dylib
{code}
We instead see:
{code}
1: proton_tests.reactor.ApplicationEventTest.test_application_events .......
pass
1: proton_tests.reactor.ContainerTest. \
1: test_authentication_via_container_attributes ........................
start
1: 2018-03-24 22:46:40,556 ERROR amqp:connection:framing-error: data after
close
1: proton_tests.reactor.ContainerTest. \
1: test_authentication_via_container_attributes ........................
pass
1: proton_tests.reactor.ContainerTest.test_authentication_via_kwargs .......
start
1: 2018-03-24 22:46:40,592 ERROR amqp:connection:framing-error: data after
close
1: proton_tests.reactor.ContainerTest.test_authentication_via_kwargs .......
pass
1: proton_tests.reactor.ContainerTest.test_authentication_via_url ..........
start
1: 2018-03-24 22:46:40,627 ERROR amqp:connection:framing-error: data after
close
1: proton_tests.reactor.ContainerTest.test_authentication_via_url ..........
pass
{code}
Looking more closely via PN_TRACE_FRM=1 we see:
{code}
1: proton_tests.reactor.ContainerTest. \
1: test_authentication_via_container_attributes
........................[0x7fec824b0950]: -> SASL
1: [0x7fec824b3ac0]: <- SASL
1: [0x7fec824b3ac0]: -> SASL
1: [0x7fec824b3ac0]:0 -> @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:"DIGEST-MD5", :"SCRAM-SHA-1", :"CRAM-MD5",
:ANONYMOUS]]
1: [0x7fec824b0950]: <- SASL
1: [0x7fec824b0950]:0 <- @sasl-mechanisms(64)
[sasl-server-mechanisms=@PN_SYMBOL[:"DIGEST-MD5", :"SCRAM-SHA-1", :"CRAM-MD5",
:ANONYMOUS]]
1: [0x7fec824b0950]:0 -> @sasl-init(65) [mechanism=:"DIGEST-MD5"]
1: [0x7fec824b3ac0]:0 <- @sasl-init(65) [mechanism=:"DIGEST-MD5"]
1: [0x7fec824b3ac0]:0 -> @sasl-challenge(66)
[challenge=b"nonce="zJFKA/6cAzSAUmLmVxjlfesOxYgA64EWGcKd0IWTjNE=",realm="earth.local",qop="auth,auth-int,auth-conf",cipher="rc4-40,rc4-56,rc4,des,3des",maxbuf=32768,charset=utf-8,algorithm=md5-sess"]
1: [0x7fec824b0950]:0 <- @sasl-challenge(66)
[challenge=b"nonce="zJFKA/6cAzSAUmLmVxjlfesOxYgA64EWGcKd0IWTjNE=",realm="earth.local",qop="auth,auth-int,auth-conf",cipher="rc4-40,rc4-56,rc4,des,3des",maxbuf=32768,charset=utf-8,algorithm=md5-sess"]
1: [0x7fec824b0950]:0 -> @sasl-response(67)
[response=b"username="user@proton",realm="earth.local",nonce="zJFKA/6cAzSAUmLmVxjlfesOxYgA64EWGcKd0IWTjNE=",cnonce="AObLxjSZbacKLA4LgvRdEZg/fWlsqP0K9oDFhnh0T8k=",nc=00000001,qop=auth-conf,cipher=rc4,maxbuf=32768,digest-uri="amqp/localhost",response=13b5bda163b5632aed95d6f520f7742c"]
1: [0x7fec824b3ac0]:0 <- @sasl-response(67)
[response=b"username="user@proton",realm="earth.local",nonce="zJFKA/6cAzSAUmLmVxjlfesOxYgA64EWGcKd0IWTjNE=",cnonce="AObLxjSZbacKLA4LgvRdEZg/fWlsqP0K9oDFhnh0T8k=",nc=00000001,qop=auth-conf,cipher=rc4,maxbuf=32768,digest-uri="amqp/localhost",response=13b5bda163b5632aed95d6f520f7742c"]
1: [0x7fec824b3ac0]:0 -> @sasl-challenge(66)
[challenge=b"rspauth=5ff7386afa92d493e03f3feb8218027c"]
1: [0x7fec824b0950]:0 <- @sasl-challenge(66)
[challenge=b"rspauth=5ff7386afa92d493e03f3feb8218027c"]
1: [0x7fec824b0950]:0 -> @sasl-response(67) [response=b""]
1: [0x7fec824b3ac0]:0 <- @sasl-response(67) [response=b""]
1: [0x7fec824b3ac0]:0 -> @sasl-outcome(68) [code=0]
1: [0x7fec824b0950]:0 <- @sasl-outcome(68) [code=0]
1: [0x7fec824b0950]: -> AMQP
1: [0x7fec824b0950]:0 -> @open(16)
[container-id="afc7e932-72dc-4d6b-acf5-341ee6bce616", hostname="localhost",
channel-max=32767]
1: [0x7fec824b3ac0]: <- AMQP
1: [0x7fec824b3ac0]:0 <- @open(16)
[container-id="afc7e932-72dc-4d6b-acf5-341ee6bce616", hostname="localhost",
channel-max=32767]
1: [0x7fec824b3ac0]: -> AMQP
1: [0x7fec824b3ac0]:0 -> @open(16) [container-id="", channel-max=32767]
1: [0x7fec824b3ac0]:0 -> @close(24) []
1: [0x7fec824b3ac0]: -> EOS
1: [0x7fec824b0950]: <- AMQP
1: [0x7fec824b0950]:0 <- @open(16) [container-id="", channel-max=32767]
1: [0x7fec824b0950]:0 <- @close(24) []
1: [0x7fec824b0950]: <- EOS
1: [0x7fec824b0950]:0 -> @close(24) []
1: [0x7fec824b0950]: -> EOS
1: [0x7fec824b3ac0]:0 <- @close(24) []
1: [0x7fec824b3ac0]: <- EOS
1: [0x7fec824b3ac0]: <- EOS
1: start
{code}
Where it appears there is one extra EOS at the end causing the
{code}
1: 2018-03-24 22:46:40,556 ERROR amqp:connection:framing-error: data after
close
{code}
As well, addressing the originally asserted PLAIN plugin load related failure
we see in the go-test for 0.18.1 that it passes with the MacPorts cyrus-sasl2
and fails with the system installed libsasl2.dylib in my environment:
{code}
macOS 10.11.6 15G1611
Xcode 7.3.1 7D1014
{code}
as recently suggested by [~astitcher]
> [OSX] Cyrus SASL plugins do not load leading to missing mechanisms
> ------------------------------------------------------------------
>
> Key: PROTON-1695
> URL: https://issues.apache.org/jira/browse/PROTON-1695
> Project: Qpid Proton
> Issue Type: Bug
> Components: proton-c
> Affects Versions: proton-c-0.18.0
> Environment: OS X 10.11.6
> Cyrus SASL 2.1.26
> Reporter: Roddie Kieley
> Priority: Major
>
> Found this issue while working on PROTON-522 as per this
> [comment|https://issues.apache.org/jira/browse/PROTON-522?focusedCommentId=16218540&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-16218540]
> the short version of which is:
> {quote}
> Ran into some trouble with cyrus-sasl after seeing that the go TestAuthPlain
> failed for both "Unix Makefiles" and "Xcode", in this case 7.3.1. Found that
> the plugins do not get loaded on OSX due to sasl_client_init(NULL) but
> rectified with sasl_client_init(pni_user_password_callbacks).
> {quote}
> The issue with the go-test TestAuthPlain was addressed via PROTON-1655,
> however the work for PROTON-522 does not include the above update as testing
> the update was not complete.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]