[ https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16326251#comment-16326251 ]
Justin Ross commented on QPID-8075: ----------------------------------- Test program: {noformat} from qmf.client import BrokerAgent conn_opts = {'url': 'amqp://localhost:5672'} ba = BrokerAgent.connect(**conn_opts) print(ba.getAllQueues()) {noformat} Debug patch: {noformat} diff --git a/management/python/lib/qmf/client.py b/management/python/lib/qmf/client.py index 3ba8e4b50..c3cc81779 100644 --- a/management/python/lib/qmf/client.py +++ b/management/python/lib/qmf/client.py @@ -127,12 +127,18 @@ class SyncRequestResponse(IncomingMessageHandler): raise ValueError("Request message has no address: %s" % request) request.reply_to = self.reply_to request.correlation_id = self._next() + print("REQUEST", request.correlation_id) + print("type", type(request.correlation_id)) self.sender.send(request) return request.correlation_id def wait(self, correlation_id): + print("WAIT", correlation_id) """Wait for and return a single response to a request previously sent with send()""" def wakeup(): + if self.response: + print("TEST", self.response.correlation_id, "==", correlation_id) + print("types", type(self.response.correlation_id), "==", type(correlation_id)) return self.response and (self.response.correlation_id == correlation_id) self.connection.wait(wakeup, msg="Waiting for response") response = self.response{noformat} > BrokerAgent not working for me > ------------------------------ > > Key: QPID-8075 > URL: https://issues.apache.org/jira/browse/QPID-8075 > Project: Qpid > Issue Type: Bug > Components: QMF > Affects Versions: qpid-cpp-1.37.0 > Environment: Fedora 25, fully up to date > via dnf I installed: > qpid-proton-c-0.17.0-5.fc25.x86_64 > qpid-cpp-server-1.36.0-1.fc25.x86_64 > pip freeze in my virtual environment is: > python-qpid-proton==0.19.0 > qpid-tools==1.37.0 > Note this is with Python 3.5.4 > Note that qpid-tools is a checkout that includes this commit > 0ffa89e177346e68bdeb5a24b9f25190c983bd34 because I need it, and the version > on PyPI does not include it. > Reporter: Brian Bouterse > Assignee: Kim van der Riet > Priority: Blocker > Fix For: qpid-cpp-1.38.0 > > > 1. Start qpidd and verify that it starts > 2. Verify it's listening on 5762 using `sudo netstat -planet | grep 5672` > 3. Telnet connect to it with `telnet localhost 5672` observe that it connects > Try to connect it to with qmf.BrokerAgent > from qmf.client import BrokerAgent, ReconnectDelays > conn_opts = {'url': 'amqp://localhost:5672'} > ba = BrokerAgent.connect(**conn_opts) > ba.getAllQueues() > I get this exception after 10 seconds: > File "/home/vagrant/devel/kombu/kombu/transport/qpid.py", line 586, in > exchange_declare > self._broker.addExchange(type, exchange, options) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 344, in addExchange > self._method('create', args) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 233, in _method > response = self._retry(self._request, '_method_request', content) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 215, in _retry > return f(*args, **kwargs) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 224, in _request > return self._client.call(Message(body=content, properties=props, > subject="broker")) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 118, in call > return self.wait(self.send(request)) > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/qmf/client.py", > line 137, in wait > self.connection.wait(wakeup, msg="Waiting for response") > File > "/home/vagrant/.virtualenvs/pulp/lib64/python3.5/site-packages/proton/utils.py", > line 292, in wait > raise Timeout(txt) > proton.Timeout: Connection amqp://localhost:5672 timed out: Waiting for > response > What is interesting is that on the same system with simply_send.py (the > standard example) it connects and sends with the exact same url. I do that > with this: > (pulp) [vagrant@pulp3 devel]$ python simple_send.py --address > 'amqp://localhost:5672' -m 1 > all messages confirmed > The 'all messages confirmed' suggests that everything went fine and the > reactor called on_accepted(). > So I conclude that BrokerAgent is somehow fundamentally not working or my > environment is screwed up somehow. > This same commit checkout was working with Python 2.7. I don't have that > environment handy currently, but I suspect this is somehow broken with Python > 3. -- This message was sent by Atlassian JIRA (v7.6.3#76005) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org For additional commands, e-mail: dev-h...@qpid.apache.org