You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/04/27 18:25:18 UTC

[GitHub] [qpid-proton] mprahl opened a new pull request #243: Support multiple connection URLs in the BlockingConnection class

mprahl opened a new pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] mprahl commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
mprahl commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-692228002


   @astitcher could you please review this change?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] astitcher commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
astitcher commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839202890


   > Thanks for your work @astitcher . I am just wondering if for example you provided 2 connection urls in `BlockingConnection` and the first one happens to be down but the second one is not, is it expected to error? In my test it errors, I was hoping that it would use the second url instead. Am I missing something?
   @emanlodovice As this PR is now closed you'd be better of opening a new issue or preferably JIRA for any more problems...
   
   But - how did you provide the 2 connection urls? Honestly if you want help you do actually need to tell me more precisely what you did - I can't see your code unless you show it to me!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] mprahl commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
mprahl commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839819788


   I'm having a similar error trying this version of the patch:
   ```
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_utils.py", line 374, in __init__
   iib-api_1         |     msg="Opening connection")
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_utils.py", line 501, in wait
   iib-api_1         |     self.container.process()
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_reactor.py", line 242, in process
   iib-api_1         |     event.dispatch(self._global_handler)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_events.py", line 162, in dispatch
   iib-api_1         |     _dispatch(handler, type.method, self)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_events.py", line 125, in _dispatch
   iib-api_1         |     handler.on_unhandled(method, *args)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_reactor.py", line 873, in on_unhandled
   iib-api_1         |     event.dispatch(self.base)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_events.py", line 162, in dispatch
   iib-api_1         |     _dispatch(handler, type.method, self)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_events.py", line 123, in _dispatch
   iib-api_1         |     m(*args)
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_handlers.py", line 1221, in on_reactor_quiesced
   iib-api_1         |     s.writable()
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_handlers.py", line 1429, in writable
   iib-api_1         |     sock = IO.connect(self._addrs[0])
   iib-api_1         |   File "/usr/local/lib64/python3.6/site-packages/proton/_io.py", line 63, in connect
   iib-api_1         |     s.connect(addr[4])
   iib-api_1         | OSError: [Errno 99] Cannot assign requested address
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] emanlodovice edited a comment on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
emanlodovice edited a comment on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839388807


   Thanks for responding @astitcher . I will try to open an issue if this is indeed a problem. It might just be a config issue as I am new to this. Here is my code
   
   ```
   urls = ['activemq1`, `activemq2`]
   conn = BlockingConnection(
       urls=urls, user="admin", password="$pass", sasl_enabled=True, allow_insecure_mechs=True, allowed_mechs="ANONYMOUS", reconnect=Backoff(max_tries=5)
   )
   
   sender = conn.create_sender("test1")
   creation_time = datetime.utcnow().timestamp()
   message = Message(
       body="hello workd",
       creation_time=creation_time,
       expiry_time=creation_time + 200,
       durable=True,
   )
   sender.send(message)
   ```
   
   I am running this code with docker-compose that has 2 activemq services (activemq1 and activemq2). It works fine if the activemq1 service is running. But when I kill activemq1 service to test fail over this code errors with this message:
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 373, in __init__
       self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_UNINIT),
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 501, in wait
       self.container.process()
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 242, in process
       event.dispatch(self._global_handler)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 125, in _dispatch
       handler.on_unhandled(method, *args)
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 873, in on_unhandled
       event.dispatch(self.base)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 123, in _dispatch
       m(*args)
     File "/usr/local/lib/python3.8/site-packages/proton/_handlers.py", line 1337, in on_connection_bound
       addrs = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
     File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
   
   Exception Value: [Errno -3] Temporary failure in name resolution
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] asfgit closed pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
asfgit closed pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243


   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] emanlodovice commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
emanlodovice commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-838389198


   Thanks for your work @astitcher . I am just wondering if for example you provided 2 connection urls in `BlockingConnection` and the first one happens to be down but the second one is not, is it expected to error? In my test it errors, I was hoping that it would use the second url instead. Am I missing something?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] emanlodovice commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
emanlodovice commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839388807


   That's for responding @astitcher . I will try to open an issue if this is indeed a problem. It might just be a config issue as I am new to this. Here is my code
   
   ```
   urls = ['activemq1`, `activemq2`]
   conn = BlockingConnection(
       urls=urls, user="admin", password="admin", sasl_enabled=True, allow_insecure_mechs=True, allowed_mechs="ANONYMOUS", reconnect=Backoff(max_tries=5)
   )
   
   sender = conn.create_sender("test1")
   creation_time = datetime.utcnow().timestamp()
   message = Message(
       body="hello workd",
       creation_time=creation_time,
       expiry_time=creation_time + 200,
       durable=True,
   )
   sender.send(message)
   ```
   
   I am running this code with docker-compose that has 2 activemq services (activemq1 and activemq2). It works fine if the activemq1 service is running. But when I kill activemq1 service to test fail over this code errors with this message:
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 373, in __init__
       self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_UNINIT),
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 501, in wait
       self.container.process()
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 242, in process
       event.dispatch(self._global_handler)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 125, in _dispatch
       handler.on_unhandled(method, *args)
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 873, in on_unhandled
       event.dispatch(self.base)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 123, in _dispatch
       m(*args)
     File "/usr/local/lib/python3.8/site-packages/proton/_handlers.py", line 1337, in on_connection_bound
       addrs = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
     File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
   
   Exception Value: [Errno -3] Temporary failure in name resolution
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] NicolasPinard commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
NicolasPinard commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-703812706


   Any update on this? This is a simple change that would make my life and my team's life much easier


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] astitcher edited a comment on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
astitcher edited a comment on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839202890


   > Thanks for your work @astitcher . I am just wondering if for example you provided 2 connection urls in `BlockingConnection` and the first one happens to be down but the second one is not, is it expected to error? In my test it errors, I was hoping that it would use the second url instead. Am I missing something?
   
   @emanlodovice As this PR is now closed you'd be better off opening a new issue or preferably JIRA for any more problems...
   
   But - how did you provide the 2 connection urls? Honestly if you want help you do actually need to tell me more precisely what you did - I can't see your code unless you show it to me!
   [edited for typo]


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] mprahl commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
mprahl commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-649063321


   @astitcher could you please review this?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] astitcher commented on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
astitcher commented on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-759931748


   @mprahl I've merged (something very like) this change ontop of a rewrite to the python reconnect logic. You should check it works for your case. Also it'd be really nice if you could write a test or 2 for this change.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] emanlodovice edited a comment on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
emanlodovice edited a comment on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839388807


   That's for responding @astitcher . I will try to open an issue if this is indeed a problem. It might just be a config issue as I am new to this. Here is my code
   
   ```
   urls = ['activemq1`, `activemq2`]
   conn = BlockingConnection(
       urls=urls, user="admin", password="$pass", sasl_enabled=True, allow_insecure_mechs=True, allowed_mechs="ANONYMOUS", reconnect=Backoff(max_tries=5)
   )
   
   sender = conn.create_sender("test1")
   creation_time = datetime.utcnow().timestamp()
   message = Message(
       body="hello workd",
       creation_time=creation_time,
       expiry_time=creation_time + 200,
       durable=True,
   )
   sender.send(message)
   ```
   
   I am running this code with docker-compose that has 2 activemq services (activemq1 and activemq2). It works fine if the activemq1 service is running. But when I kill activemq1 service to test fail over this code errors with this message:
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 373, in __init__
       self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_UNINIT),
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 501, in wait
       self.container.process()
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 242, in process
       event.dispatch(self._global_handler)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 125, in _dispatch
       handler.on_unhandled(method, *args)
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 873, in on_unhandled
       event.dispatch(self.base)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 123, in _dispatch
       m(*args)
     File "/usr/local/lib/python3.8/site-packages/proton/_handlers.py", line 1337, in on_connection_bound
       addrs = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
     File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
   
   Exception Value: [Errno -3] Temporary failure in name resolution
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [qpid-proton] emanlodovice edited a comment on pull request #243: Support multiple connection URLs in the BlockingConnection class

Posted by GitBox <gi...@apache.org>.
emanlodovice edited a comment on pull request #243:
URL: https://github.com/apache/qpid-proton/pull/243#issuecomment-839388807


   Thanks for responding @astitcher . I will try to open an issue if this is indeed a problem. It might just be a config issue as I am new to this. Here is my code
   
   ```
   urls = ['activemq1`, `activemq2`]
   conn = BlockingConnection(
       urls=urls, user="admin", password="$pass", sasl_enabled=True, allow_insecure_mechs=True, allowed_mechs="ANONYMOUS", reconnect=Backoff(max_tries=5)
   )
   
   sender = conn.create_sender("test1")
   creation_time = datetime.utcnow().timestamp()
   message = Message(
       body="hello workd",
       creation_time=creation_time,
       expiry_time=creation_time + 200,
       durable=True,
   )
   sender.send(message)
   ```
   
   I am running this code with docker-compose that has 2 activemq services (activemq1 and activemq2). It works fine if the activemq1 service is running. But when I kill activemq1 service to test fail over to activemq2 this code errors with this message:
   
   ```
   Traceback (most recent call last):
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 373, in __init__
       self.wait(lambda: not (self.conn.state & Endpoint.REMOTE_UNINIT),
     File "/usr/local/lib/python3.8/site-packages/proton/_utils.py", line 501, in wait
       self.container.process()
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 242, in process
       event.dispatch(self._global_handler)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 125, in _dispatch
       handler.on_unhandled(method, *args)
     File "/usr/local/lib/python3.8/site-packages/proton/_reactor.py", line 873, in on_unhandled
       event.dispatch(self.base)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 162, in dispatch
       _dispatch(handler, type.method, self)
     File "/usr/local/lib/python3.8/site-packages/proton/_events.py", line 123, in _dispatch
       m(*args)
     File "/usr/local/lib/python3.8/site-packages/proton/_handlers.py", line 1337, in on_connection_bound
       addrs = socket.getaddrinfo(host, port, socket.AF_UNSPEC, socket.SOCK_STREAM)
     File "/usr/local/lib/python3.8/socket.py", line 918, in getaddrinfo
       for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
   
   Exception Value: [Errno -3] Temporary failure in name resolution
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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