-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Connection in an unexpected error state with Solace Broker #52
Comments
Hi @hbsis-fernandomedeiros - sorry for the delay in getting back to you! Could I possibly see a code snippet? This would only need to show how you are initializing the authentication and the client, what kind of auth/endpoint settings you're using etc (please make sure to remove any sensitive info - but it would still be good to see the formatting of the info, for example for an endpoint URL, something like I suspect the root cause of this issue is the same as that for issue #44 that I still haven't had a chance to dig into. |
Hi there @annatisch how have you been? I should have been clearer in my post, sorry about that. Here are the steps to reproduce: I'm running Docker version 18.09.0 on Windows 10 Pro. 1) On my local Docker, run an instance of the following docker image: https://hub.docker.com/r/solace/solace-pubsub-standard/ - remember to use -p 5672:5672 to bind and expose the AMQP port. More info on running Solace on containers: https://docs.solace.com/Solace-SW-Broker-Set-Up/Docker-Containers/Set-Up-Single-Win-Container.htm 2) I've set up a topic named topic-test-01 3) Run this snippet import os
import logging
logging.basicConfig(level=logging.DEBUG)
try:
from urlparse import urlparse
except ImportError:
from urllib.parse import urlparse
import uamqp
from uamqp import authentication
uri = 'amqp://localhost:5672/topic-test-01'
key_name = 'admin'
access_key = 'admin'
def uamqp_send_simple():
msg_content = b"Hello world"
parsed_uri = urlparse(uri)
plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key)
uamqp.send_message(uri, msg_content, auth=plain_auth, debug=True)
print("Message sent!")
if __name__ == "__main__":
uamqp_send_simple() |
Perfect! Thanks @hbsis-fernandomedeiros so much for these repro steps. I will take a shot at this over the weekend. As for me - super busy as per usual. Thanks for asking! ;) One thing that does occur to me - you could try passing in the port that you're using into the auth config:
|
Just tried that a couple combinations: #plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key, port=parsed_uri.port)
#plain_auth = authentication.SASLPlain('localhost:5672', key_name, access_key, port=parsed_uri.port)
plain_auth = authentication.SASLPlain('localhost:5672', key_name, access_key)
#plain_auth = authentication.SASLPlain(parsed_uri.hostname, key_name, access_key) Same messages for all of them. |
Thanks for the update! Will take a look :) |
Hey @annatisch , how have you been? :) |
@annatisch and @hbsis-fernandomedeiros With this, we are considering that the problem is related to the amqp connection string, that is wrong or missing some information. Our example:
Log:
EDIT: typos |
Hi there,
I've been trying to use uAMQP for Python with a Solace Standard broker running in a local container - Nothing too complex, just the samples provided in this repository. No success so far, although I have a topic and queue set up. I rose the logging level to DEBUG, and it seems to be some issue related to DETACH frame in link protocol - but I'm out of ideas... any idea what could it possibly be? It would be much appreciated :)
Here's the log:
The text was updated successfully, but these errors were encountered: