[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409804#comment-16409804 ] ASF subversion and git services commented on PROTON-1517: - Commit 0c2cbaf8bf3871fdc285da6095074f879cf34aeb in qpid-proton's branch refs/heads/master from [~gemmellr] [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=0c2cbaf ] PROTON-1517: cleanup stale PR for previously-applied change. This closes #110 > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross >Priority: Major > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker'
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16409805#comment-16409805 ] ASF GitHub Bot commented on PROTON-1517: Github user asfgit closed the pull request at: https://github.com/apache/qpid-proton/pull/110 > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross >Priority: Major > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts': ulong(1500315523092865467), '_delete_ts': ulong(0), > '_object_id': {'_agent_epoch': ulong(3), '_object_name': > b'org.apache.qpid.bro
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16285116#comment-16285116 ] ASF GitHub Bot commented on PROTON-1517: Github user dmitrytokarev commented on the issue: https://github.com/apache/qpid-proton/pull/110 @jdanekrh well it doesn't really matter how it's done as long as community contributions are authored and recognized. Some people may show case their github accounts on their resumes, so if they don't get credit for their work, they have nothing to showcase. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, bod
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284679#comment-16284679 ] ASF GitHub Bot commented on PROTON-1517: Github user jdanekrh commented on the issue: https://github.com/apache/qpid-proton/pull/110 whoa, codecov.io has gone crazy... this report above includes about 10 recent commits to master, not just this one... @dmitrytokarev Is committing as myself, but setting `git commit --author "Other person "` acceptable GitHub practice? Or doing a final `commit --amend` with the `--author` set? This is what I intended to do (in my personal project...) > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Mes
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284448#comment-16284448 ] ASF GitHub Bot commented on PROTON-1517: Github user ssorj commented on the issue: https://github.com/apache/qpid-proton/pull/110 @dmitrytokarev , I was failing at making it merge the way I wanted. I will try to figure out the right sequence of commands so I get it right next time. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts': ulong(1
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284399#comment-16284399 ] ASF GitHub Bot commented on PROTON-1517: Github user dmitrytokarev commented on the issue: https://github.com/apache/qpid-proton/pull/110 @ssorj why didn't you just merge this PR? Now @aikchar doesn't get credit for his work. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts': ulong(1500315523092865467), '_delete_ts': ulong(0), > '_object
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284342#comment-16284342 ] ASF GitHub Bot commented on PROTON-1517: Github user codecov-io commented on the issue: https://github.com/apache/qpid-proton/pull/110 # [Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=h1) Report > Merging [#110](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=desc) into [master](https://codecov.io/gh/apache/qpid-proton/commit/1ff005f661e070d72397cdc3a431854693626b97?src=pr&el=desc) will **decrease** coverage by `0.35%`. > The diff coverage is `68.19%`. [![Impacted file tree graph](https://codecov.io/gh/apache/qpid-proton/pull/110/graphs/tree.svg?height=150&src=pr&token=UKKzV9XnFF&width=650)](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=tree) ```diff @@Coverage Diff @@ ## master #110 +/- ## == - Coverage 78.67% 78.31% -0.36% == Files 231 232 +1 Lines 3054630687 +141 Branches 2903 2927 +24 == + Hits2403324034 +1 - Misses 4872 4912 +40 - Partials 1641 1741 +100 ``` | [Impacted Files](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=tree) | Coverage Δ | | |---|---|---| | [proton-c/bindings/cpp/src/scalar\_test.hpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy9zY2FsYXJfdGVzdC5ocHA=) | `100% <ø> (ø)` | | | [examples/c/send-ssl.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLXNzbC5j) | `76.28% <ø> (ø)` | :arrow_up: | | [examples/c/send.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLmM=) | `75.82% <ø> (ø)` | :arrow_up: | | [proton-c/bindings/cpp/src/connection\_driver.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy9jb25uZWN0aW9uX2RyaXZlci5jcHA=) | `77.77% <ø> (ø)` | | | [examples/cpp/multithreaded\_client.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvY3BwL211bHRpdGhyZWFkZWRfY2xpZW50LmNwcA==) | `81.81% <ø> (ø)` | :arrow_up: | | [examples/c/send-abort.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9zZW5kLWFib3J0LmM=) | `76.34% <ø> (ø)` | :arrow_up: | | [examples/c/direct.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvYy9kaXJlY3QuYw==) | `83.63% <ø> (ø)` | :arrow_up: | | [proton-c/bindings/cpp/src/types\_internal.hpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvYmluZGluZ3MvY3BwL3NyYy90eXBlc19pbnRlcm5hbC5ocHA=) | `94.73% <ø> (ø)` | | | [proton-c/src/core/message.c](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-cHJvdG9uLWMvc3JjL2NvcmUvbWVzc2FnZS5j) | `59.53% <ø> (-0.78%)` | :arrow_down: | | [examples/cpp/ssl\_client\_cert.cpp](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree#diff-ZXhhbXBsZXMvY3BwL3NzbF9jbGllbnRfY2VydC5jcHA=) | `81.08% <ø> (ø)` | :arrow_up: | | ... and [71 more](https://codecov.io/gh/apache/qpid-proton/pull/110/diff?src=pr&el=tree-more) | | -- [Continue to review full report at Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=continue). > **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta) > `Δ = absolute (impact)`, `ø = not affected`, `? = missing data` > Powered by [Codecov](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=footer). Last update [1ff005f...a4dafa2](https://codecov.io/gh/apache/qpid-proton/pull/110?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments). > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284247#comment-16284247 ] ASF GitHub Bot commented on PROTON-1517: Github user ssorj commented on the issue: https://github.com/apache/qpid-proton/pull/110 @aikchar , I applied this patch. Please close when you get a chance. https://github.com/apache/qpid-proton/commit/2b033949c54549591113e61ea33e625f9b898cbb > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16284221#comment-16284221 ] ASF subversion and git services commented on PROTON-1517: - Commit 2b033949c54549591113e61ea33e625f9b898cbb in qpid-proton's branch refs/heads/master from [~jr...@redhat.com] [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=2b03394 ] PROTON-1517: For broader compatibility, use a string correlation ID > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: proton-c-0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16201340#comment-16201340 ] ASF subversion and git services commented on PROTON-1517: - Commit 1d2d791921bea582b27778bf0b5ebb1853c7e95a in qpid-proton's branch refs/heads/master from [~aconway] [ https://git-wip-us.apache.org/repos/asf?p=qpid-proton.git;h=1d2d791 ] PROTON-1517: C++ consistent linkage for listen_handler Make it all non-inline, consistent with message_handler. Fixes ASAN runtime warnings caused by duplicate vtables. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: 0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address,
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16121938#comment-16121938 ] Justin Ross commented on PROTON-1517: - I bumped this to 0.19.0, at which point we can consider taking this patch as an accommodation or come up with some other approach. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: 0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.19.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts': ulong(1500315523092865467), '_delete_ts': ulong(0), > '_object_id': {'_agent_epoch': ulong(3), '_object_name': > b'org.apache.qpid.broker:queue:42
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16121683#comment-16121683 ] Ted Ross commented on PROTON-1517: -- This is correct. The message implementation within qpidd treats the correlationId as a string. The QMF agent in the broker uses this implementation. > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: 0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.18.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > >>> r.body > [{'_create_ts': ulong(1500315523092865467), '_delete_ts': ulong(0), > '_object_id': {'_agent_epoch': ulong(3), '_object_name': > b'org.apache.qpid
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16120798#comment-16120798 ] Justin Ross commented on PROTON-1517: - I can reproduce this problem, but near as I can tell, it's not a bug in the python binding really. With print debugging, I see a numeric correlation ID (intentionally) sent in the request to the qpidd agent, and I see a string correlation ID returned. Everything works with the patch because it makes the correlation ID a string in every instance. My theory is that the qpidd qmf code assumes and requires string correlation IDs, and implicitly converts to a string internally, but it's hard for me to tell from the C++ code. [~tr...@redhat.com], is that a reasonable theory? > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: 0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar >Assignee: Justin Ross > Labels: easyfix, patch > Fix For: proton-c-0.18.0 > > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id':
[jira] [Commented] (PROTON-1517) SyncRequestResponse(BlockingConnection).call() fails with timeout
[ https://issues.apache.org/jira/browse/PROTON-1517?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16090833#comment-16090833 ] ASF GitHub Bot commented on PROTON-1517: GitHub user aikchar opened a pull request: https://github.com/apache/qpid-proton/pull/110 Fix for PROTON-1517 Fixes the bug reported in [PROTON-1517](https://issues.apache.org/jira/browse/PROTON-1517). You can merge this pull request into a Git repository by running: $ git pull https://github.com/aikchar/qpid-proton fix-PROTON-1517 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/qpid-proton/pull/110.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #110 commit a4dafa2cfaccf1812c0d3a5a25aeddb26dbb Author: Hamza Sheikh Date: 2017-07-18T00:04:02Z Fix for PROTON-1517 > SyncRequestResponse(BlockingConnection).call() fails with timeout > - > > Key: PROTON-1517 > URL: https://issues.apache.org/jira/browse/PROTON-1517 > Project: Qpid Proton > Issue Type: Bug > Components: python-binding >Affects Versions: 0.17.0 > Environment: macOS Sierra 10.12.5 > Python 3.6.1 >Reporter: aikchar > Labels: easyfix, patch > > Send a QMFv2 message using SyncRequestResponse.call(). The response times out. > h2. Repro > This repro uses the example from > https://qpid.apache.org/releases/qpid-proton-0.17.0/proton/python/examples/sync_client.py.html. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>> content = {'_what': 'OBJECT', '_schema_id': {'_class_name': 'queue'}} > >>> properties = {'x-amqp-0-10.app-id': 'qmf2', 'qmf.opcode': > >>> '_query_request', 'method': 'request'} > >>> > >>> from proton import Message > >>> m = Message(reply_to=client.receiver.remote_source.address, > >>> address=address, body=content, properties=properties, subject='broker') > >>> r = client.call(m) > Traceback (most recent call last): > File "", line 1, in > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 400, in call > self.connection.wait(wakeup, msg="Waiting for response") > File > "/Users/hamza.sheikh/virtualenvs/flight-test-py36/lib/python3.6/site-packages/proton/utils.py", > line 288, in wait > raise Timeout(txt) > proton.Timeout: Connection > amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct > timed out: Waiting for response > >>> > {noformat} > h2. Patch > Patch is to make sure correlation_id is a string. > {noformat} > $ git diff > diff --git a/proton-c/bindings/python/proton/utils.py > b/proton-c/bindings/python/proton/utils.py > index 05ef80df..528ce338 100644 > --- a/proton-c/bindings/python/proton/utils.py > +++ b/proton-c/bindings/python/proton/utils.py > @@ -349,7 +349,7 @@ class SyncRequestResponse(IncomingMessageHandler): > if not self.address and not request.address: > raise ValueError("Request message has no address: %s" % request) > request.reply_to = self.reply_to > -request.correlation_id = correlation_id = self.correlation_id.next() > +request.correlation_id = correlation_id = > str(self.correlation_id.next()) > self.sender.send(request) > def wakeup(): > return self.response and (self.response.correlation_id == > correlation_id) > {noformat} > After applying the patch, the response does not time out. > {noformat} > $ python > Python 3.6.1 (default, Apr 24 2017, 09:59:45) > [GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin > Type "help", "copyright", "credits" or "license" for more information. > >>> address = > >>> 'amqps://REDACTED_USERNAME:REDACTED_PASSWORD@REDACTED_IP_ADDR:5672/qmf.default.direct' > >>> from proton import Url > >>> url = Url(address) > >>> > >>> from proton.utils import SyncRequestResponse, BlockingConnection > >>> client = SyncRequestResponse(BlockingConnection(url, timeout=15, > >>> target='qmf.default.direct', sasl_enabled=True, allowed_mechs='PLAIN'), > >>> 'qmf.default.direct') > >>> > >>