Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- src/public/test/test_rabbit_helper.py:3 (test_hunt_rabbit)
- self = <amqp.transport.TCPTransport object at 0x11260c400>, host = 'rabbitmq'
- port = 5672, timeout = 5
- def _connect(self, host, port, timeout):
- e = None
- # Below we are trying to avoid additional DNS requests for AAAA if A
- # succeeds. This helps a lot in case when a hostname has an IPv4 entry
- # in /etc/hosts but not IPv6. Without the (arguably somewhat twisted)
- # logic below, getaddrinfo would attempt to resolve the hostname for
- # both IP versions, which would make the resolver talk to configured
- # DNS servers. If those servers are for some reason not available
- # during resolution attempt (either because of system misconfiguration,
- # or network connectivity problem), resolution process locks the
- # _connect call for extended time.
- addr_types = (socket.AF_INET, socket.AF_INET6)
- addr_types_num = len(addr_types)
- for n, family in enumerate(addr_types):
- # first, resolve the address for a single address family
- try:
- entries = socket.getaddrinfo(
- > host, port, family, socket.SOCK_STREAM, SOL_TCP)
- ../../../../venv/lib/python3.6/site-packages/amqp/transport.py:137:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- host = 'rabbitmq', port = 5672, family = <AddressFamily.AF_INET6: 30>
- socktype = <SocketKind.SOCK_STREAM: 1>, proto = 6, flags = 0
- def getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0):
- """Replacement for Python's socket.getaddrinfo
- This does the A and AAAA lookups asynchronously after which it
- calls the OS' getaddrinfo(3) using the AI_NUMERICHOST flag. This
- flag ensures getaddrinfo(3) does not use the network itself and
- allows us to respect all the other arguments like the native OS.
- """
- if isinstance(host, six.string_types):
- host = host.encode('idna').decode('ascii')
- if host is not None and not is_ip_addr(host):
- qname, addrs = _getaddrinfo_lookup(host, family, flags)
- else:
- qname = host
- addrs = [host]
- aiflags = (flags | socket.AI_NUMERICHOST) & (0xffff ^ socket.AI_CANONNAME)
- res = []
- err = None
- for addr in addrs:
- try:
- ai = socket.getaddrinfo(addr, port, family,
- socktype, proto, aiflags)
- except socket.error as e:
- if flags & socket.AI_ADDRCONFIG:
- err = e
- continue
- raise
- res.extend(ai)
- if not res:
- if err:
- raise err
- > raise socket.gaierror(socket.EAI_NONAME, 'No address found')
- E socket.gaierror: [Errno 8] No address found
- ../../../../venv/lib/python3.6/site-packages/eventlet/support/greendns.py:537: gaierror
- During handling of the above exception, another exception occurred:
- def test_hunt_rabbit():
- service = "user_service"
- method = "check_token"
- params = {"token": "blbej_token"}
- > result = hunt_rabbit(service=service, method=method, params=params)
- test_rabbit_helper.py:8:
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- ../rabbit_helper.py:35: in hunt_rabbit
- with ClusterRpcProxy(config) as cluster_rpc:
- ../../../../venv/lib/python3.6/site-packages/nameko/standalone/rpc.py:222: in __enter__
- return self.start()
- ../../../../venv/lib/python3.6/site-packages/nameko/standalone/rpc.py:228: in start
- self._reply_listener.setup()
- ../../../../venv/lib/python3.6/site-packages/nameko/rpc.py:260: in setup
- self.queue_consumer.register_provider(self)
- ../../../../venv/lib/python3.6/site-packages/nameko/standalone/rpc.py:123: in register_provider
- self._setup_consumer()
- ../../../../venv/lib/python3.6/site-packages/nameko/standalone/rpc.py:102: in _setup_consumer
- channel = self.connection.channel()
- ../../../../venv/lib/python3.6/site-packages/kombu/connection.py:288: in channel
- chan = self.transport.create_channel(self.connection)
- ../../../../venv/lib/python3.6/site-packages/kombu/connection.py:837: in connection
- self._connection = self._establish_connection()
- ../../../../venv/lib/python3.6/site-packages/kombu/connection.py:792: in _establish_connection
- conn = self.transport.establish_connection()
- ../../../../venv/lib/python3.6/site-packages/kombu/transport/pyamqp.py:130: in establish_connection
- conn.connect()
- ../../../../venv/lib/python3.6/site-packages/amqp/connection.py:311: in connect
- self.transport.connect()
- ../../../../venv/lib/python3.6/site-packages/amqp/transport.py:77: in connect
- self._connect(self.host, self.port, self.connect_timeout)
- _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
- self = <amqp.transport.TCPTransport object at 0x11260c400>, host = 'rabbitmq'
- port = 5672, timeout = 5
- def _connect(self, host, port, timeout):
- e = None
- # Below we are trying to avoid additional DNS requests for AAAA if A
- # succeeds. This helps a lot in case when a hostname has an IPv4 entry
- # in /etc/hosts but not IPv6. Without the (arguably somewhat twisted)
- # logic below, getaddrinfo would attempt to resolve the hostname for
- # both IP versions, which would make the resolver talk to configured
- # DNS servers. If those servers are for some reason not available
- # during resolution attempt (either because of system misconfiguration,
- # or network connectivity problem), resolution process locks the
- # _connect call for extended time.
- addr_types = (socket.AF_INET, socket.AF_INET6)
- addr_types_num = len(addr_types)
- for n, family in enumerate(addr_types):
- # first, resolve the address for a single address family
- try:
- entries = socket.getaddrinfo(
- host, port, family, socket.SOCK_STREAM, SOL_TCP)
- entries_num = len(entries)
- except socket.gaierror:
- # we may have depleted all our options
- if n + 1 >= addr_types_num:
- # if getaddrinfo succeeded before for another address
- # family, reraise the previous socket.error since it's more
- # relevant to users
- raise (e
- if e is not None
- else socket.error(
- > "failed to resolve broker hostname"))
- E OSError: failed to resolve broker hostname
- ../../../../venv/lib/python3.6/site-packages/amqp/transport.py:148: OSError
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement