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 2021/05/12 02:38:57 UTC

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

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