[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-24 Thread ASF subversion and git services (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16338390#comment-16338390
 ] 

ASF subversion and git services commented on QPID-8075:
---

Commit e37969a8c19da7aa1c6400af2facecfec6b5f702 in qpid-cpp's branch 
refs/heads/master from [~kpvdr]
[ https://git-wip-us.apache.org/repos/asf?p=qpid-cpp.git;h=e37969a ]

QPID-8075: Fixed issue by changing the correlation-id sent to QMF from a 8-byte 
binary to a 4-byte string. Now works in Python 2 and Python 3.


> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334573#comment-16334573
 ] 

Kim van der Riet commented on QPID-8075:


Given that we accept 1. above and accept the limitations of QMF using only 
string correlation-ids, the following patch would solve this problem:
{noformat}
diff --git a/management/python/lib/qmf/client.py 
b/management/python/lib/qmf/client.py
index 3ba8e4b50..89beaca85 100644
--- a/management/python/lib/qmf/client.py
+++ b/management/python/lib/qmf/client.py
@@ -104,7 +104,7 @@ class SyncRequestResponse(IncomingMessageHandler):
 self.lock.acquire()
 try:
 self._cid += 1;
-return struct.pack("L", self._cid)
+return struct.pack("I", self._cid).decode('ascii')
 finally:
 self.lock.release()
{noformat}
for both Python 2 and Python 3.  It would send the correlation ids as 4-byte 
strings.

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334559#comment-16334559
 ] 

Kim van der Riet commented on QPID-8075:


It appears that QMF requires the correlation-id to be a string.

This can be handled one of two ways:
1. Change the client to send only string correlation-ids, accepting this 
limitation for the QMF case, or
2. Change QMF to handle all valid correlation-id types (ulong, string, binary, 
uuid).

QMF handles correlation-ids as follows:
1. On receipt, it creates a correlator from the incoming message as follows:
{noformat}
const string& cid(msg.getCorrelationId());
uint32_t correlator;
...
try { correlator = boost::lexical_cast(cid); }
catch(const boost::bad_lexical_cast&) { correlator = 0; }
{noformat}

and on sending the reply:
{noformat}
Message msg;
Variant::Map map;
Variant::Map& headers(msg.getProperties());
...
msg.setCorrelationId(boost::lexical_cast(correlator));
{noformat}

which will always be a string. In addition, it appears that only 4 bytes of the 
incoming correlation-id are significant.

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334544#comment-16334544
 ] 

Kim van der Riet commented on QPID-8075:


The Qpid-interop-test JMS headers/properties test does not see any issue with 
messages containing binary correlation-ids, and the received message is of the 
same type.

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334529#comment-16334529
 ] 

Kim van der Riet commented on QPID-8075:


The following patch "fixes" the issue for both Python 2 and 3:
{noformat}
diff --git a/management/python/lib/qmf/client.py 
b/management/python/lib/qmf/client.py
index 3ba8e4b50..400fab9bc 100644
--- a/management/python/lib/qmf/client.py
+++ b/management/python/lib/qmf/client.py
@@ -128,7 +128,7 @@ class SyncRequestResponse(IncomingMessageHandler):
 request.reply_to = self.reply_to
 request.correlation_id = self._next()
 self.sender.send(request)
-return request.correlation_id
+return request.correlation_id.decode('ascii')
 
 def wait(self, correlation_id):
 """Wait for and return a single response to a request previously sent 
with send()"""
{noformat}
which converts the correlation id to a string before comparing.

The broker should be returning the same type for correlation id, and this 
problem went unnoticed in the Python 2 case because binary and string types are 
essentially the same.

This would appear to be a broker bug. Investigating test coverage, why have we 
not seen this before?

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334507#comment-16334507
 ] 

Kim van der Riet commented on QPID-8075:


In both Python versions, correlation id of outbound message is a binary 8-byte 
value, and inbound an 8-byte string containing the same value.

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-22 Thread Kim van der Riet (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16334413#comment-16334413
 ] 

Kim van der Riet commented on QPID-8075:


Using the test program above, wire analysis shows:
 # The outbound request message to the broker is being sent with an application 
property map and a value map.
 ** In the case of Python 2.x, all keys and values are binary
 ** In the case of Python 3.x, all keys and values are utf-8 strings
 # The broker seems to handle these differences and returns the identical 
message in response containing the queue information, with its string 
information encoded as binary. However, in the Python 3.x case, the client 
times out and the request fails. This would seem to indicate that the issue is 
on the client side, and is indeed a Python 2 / 3 issue, probably related to the 
handling of binary vs. strings.

> 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



[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-15 Thread Justin Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-12 Thread Justin Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16324730#comment-16324730
 ] 

Justin Ross commented on QPID-8075:
---

Note to myself.

{noformat}
[jross@localhost qpid-cpp-ssorj (master)]$ python test.py
('REQUEST', '\x01\x00\x00\x00\x00\x00\x00\x00')
('type', )
('WAIT', '\x01\x00\x00\x00\x00\x00\x00\x00')
('TEST', u'\x01\x00\x00\x00\x00\x00\x00\x00', '==', 
'\x01\x00\x00\x00\x00\x00\x00\x00')
('types', , '==', )
[Queue({u'_schema_id': {u'_package_name': 'org.apache.qpid.broker', 
u'_class_name': 'queue', u'_type': '_data', u'_hash': 
UUID('84ce326e-2cbd-6899-80d7-6267d3327e0f')}, u'_create_ts': 
ulong(1515794503270032316L), u'_delete_ts': ulong(0L), u'_object_id': 
{u'_object_name': 
'org.apache.qpid.broker:queue:59210997-d906-4157-a0f0-15f9ff625231_59210997-d906-4157-a0f0-15f9ff625231-93851ac0-1332-403f-a3bb-e22eae2c53c0',
 u'_agent_epoch': ulong(35L)}, u'_values': {u'unackedMessages': uint(0L), 
u'consumerCountLow': uint(0L), u'byteFtdDequeues': ulong(0L), 
u'discardsOverflow': ulong(0L), u'byteFtdDepth': ulong(0L), u'consumerCount': 
uint(1L), u'byteFtdEnqueues': ulong(0L), u'bytePersistEnqueues': ulong(0L), 
u'discardsPurge': ulong(0L), u'msgFtdEnqueues': ulong(0L), u'msgFtdDequeues': 
ulong(0L), u'discardsRing': ulong(0L), u'flowStoppedCount': uint(0L), 
u'acquires': ulong(0L), u'unackedMessagesHigh': uint(0L), u'autoDelete': True, 
u'redirectPeer': '', u'durable': False, u'creator': 'anonymous', 
u'msgTxnEnqueues': ulong(0L), u'redirectSource': False, u'arguments': {}, 
u'messageLatencyMax': ulong(0L), u'reroutes': ulong(0L), u'exclusive': False, 
u'msgTotalEnqueues': ulong(0L), u'releases': ulong(0L), u'bytePersistDequeues': 
ulong(0L), u'msgTotalDequeues': ulong(0L), u'flowStopped': False, 
u'bindingCountLow': uint(0L), u'vhostRef': {u'_object_name': 
'org.apache.qpid.broker:vhost:org.apache.qpid.broker:broker:amqp-broker,/'}, 
u'bindingCount': uint(1L), u'byteTxnEnqueues': ulong(0L), u'byteDepth': 
ulong(0L), u'msgTxnDequeues': ulong(0L), u'unackedMessagesLow': uint(0L), 
u'messageLatencyMin': int32(0), u'name': 
'59210997-d906-4157-a0f0-15f9ff625231_59210997-d906-4157-a0f0-15f9ff625231-93851ac0-1332-403f-a3bb-e22eae2c53c0',
 u'discardsLvq': ulong(0L), u'consumerCountHigh': uint(1L), 
u'discardsSubscriber': ulong(0L), u'messageLatencyCount': ulong(0L), 
u'msgPersistDequeues': ulong(0L), u'bindingCountHigh': uint(1L), 
u'byteTotalDequeues': ulong(0L), u'msgFtdDepth': ulong(0L), 
u'msgPersistEnqueues': ulong(0L), u'discardsTtl': ulong(0L), 
u'messageLatencyAvg': int32(0), u'byteTotalEnqueues': ulong(0L), u'msgDepth': 
ulong(0L), u'byteTxnDequeues': ulong(0L)}, u'_update_ts': 
ulong(1515794503270866086L)})]
[jross@localhost qpid-cpp-ssorj (master)]$ python3 test.py
REQUEST b'\x01\x00\x00\x00\x00\x00\x00\x00'
type 
WAIT b'\x01\x00\x00\x00\x00\x00\x00\x00'
TEST  == b'\x01\x00\x00\x00\x00\x00\x00\x00'
types  == 
TEST  == b'\x01\x00\x00\x00\x00\x00\x00\x00'
types  == 
Traceback (most recent call last):
  File "test.py", line 4, in 
print(ba.getAllQueues())
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 296, in getAllQueues
def getAllQueues(self): return self._getAll(Queue)
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 275, in _getAll
return [cls(self, x) for x in self._classQuery(cls.__name__.lower())]
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 260, in _classQuery
return self._retry(f)
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 221, in _retry
return f(*args, **kwargs)
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 256, in f
response = self._request('_query_request', query)
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 230, in _request
return self._client.call(Message(body=content, properties=props, 
subject="broker"))
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 118, in call
return self.wait(self.send(request))
  File "/home/jross/code/qpid-cpp-ssorj/management/python/lib/qmf/client.py", 
line 143, in wait
self.connection.wait(wakeup, msg="Waiting for response")
  File "/usr/lib64/python3.6/site-packages/proton/utils.py", line 271, in wait
raise Timeout(txt)
proton.Timeout: Connection amqp://localhost:56721 timed out: Waiting for 
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
> 

[jira] [Commented] (QPID-8075) BrokerAgent not working for me

2018-01-12 Thread Justin Ross (JIRA)

[ 
https://issues.apache.org/jira/browse/QPID-8075?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16324548#comment-16324548
 ] 

Justin Ross commented on QPID-8075:
---

I have a suspicion that this is because the request and response correlation 
IDs aren't matching on Python 3.  Trying it out.

> 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-python-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
>Priority: Blocker
>
> 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
(v6.4.14#64029)

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