deis / postgres

A PostgreSQL database used by Deis Workflow.
https://deis.com
MIT License
36 stars 22 forks source link

socket.gaierror: [Errno -2] Name or service not known #160

Closed bacongobbler closed 7 years ago

bacongobbler commented 7 years ago

This issue cropped up after merging #137. It seems boto is attempting to connect to s3-us-east-1.$DEIS_MINIO_SERVICE_HOST:$DEIS_MINIO_SERVICE_PORT which is causing headaches for wal-e.

wal_e.worker.upload INFO     MSG: begin archiving a file
        DETAIL: Uploading "pg_xlog/000000010000000000000001" to "s3://dbwal/wal_005/000000010000000000000001.lzo".
        STRUCTURED: time=2016-10-31T22:30:58.380292-00 pid=264 action=push-wal key=s3://dbwal/wal_005/000000010000000000000001.lzo prefix= seg=000000010000000000000001 state=begin
wal_e.main   CRITICAL MSG: An unprocessed exception has avoided all error handling
        DETAIL: Traceback (most recent call last):
          File "/usr/local/lib/python3.5/dist-packages/wal_e/cmd.py", line 578, in main
            backup_cxt.backup_list(query=args.QUERY, detail=args.detail)
          File "/usr/local/lib/python3.5/dist-packages/wal_e/operator/backup.py", line 66, in backup_list
            for bi in bl_iter:
          File "/usr/local/lib/python3.5/dist-packages/wal_e/worker/base.py", line 153, in __iter__
            for key in self._backup_list(self.layout.basebackups()):
          File "/usr/local/lib/python3.5/dist-packages/boto/s3/bucketlistresultset.py", line 34, in bucket_lister
            encoding_type=encoding_type)
          File "/usr/local/lib/python3.5/dist-packages/boto/s3/bucket.py", line 473, in get_all_keys
            '', headers, **params)
          File "/usr/local/lib/python3.5/dist-packages/boto/s3/bucket.py", line 399, in _get_all
            query_args=query_args)
          File "/usr/local/lib/python3.5/dist-packages/boto/s3/connection.py", line 672, in make_request
            retry_handler=retry_handler
          File "/usr/local/lib/python3.5/dist-packages/boto/connection.py", line 1071, in make_request
            retry_handler=retry_handler)
          File "/usr/local/lib/python3.5/dist-packages/boto/connection.py", line 1030, in _mexe
            raise ex
          File "/usr/local/lib/python3.5/dist-packages/boto/connection.py", line 943, in _mexe
            request.body, request.headers)
          File "/usr/lib/python3.5/http/client.py", line 1106, in request
            self._send_request(method, url, body, headers)
          File "/usr/lib/python3.5/http/client.py", line 1151, in _send_request
            self.endheaders(body)
          File "/usr/lib/python3.5/http/client.py", line 1102, in endheaders
            self._send_output(message_body)
          File "/usr/lib/python3.5/http/client.py", line 934, in _send_output
            self.send(msg)
          File "/usr/lib/python3.5/http/client.py", line 877, in send
            self.connect()
          File "/usr/lib/python3.5/http/client.py", line 849, in connect
            (self.host,self.port), self.timeout, self.source_address)
          File "/usr/local/lib/python3.5/dist-packages/gevent/socket.py", line 64, in create_connection
            for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM):
          File "/usr/local/lib/python3.5/dist-packages/gevent/_socketcommon.py", line 268, in getaddrinfo
            return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags)
          File "/usr/local/lib/python3.5/dist-packages/gevent/resolver_thread.py", line 64, in getaddrinfo
            return self.pool.apply(_socket.getaddrinfo, args, kwargs)
          File "/usr/local/lib/python3.5/dist-packages/gevent/pool.py", line 300, in apply
            return self.spawn(func, *args, **kwds).get()
          File "/usr/local/lib/python3.5/dist-packages/gevent/event.py", line 373, in get
            return self.get(block=False)
          File "/usr/local/lib/python3.5/dist-packages/gevent/event.py", line 363, in get
            return self._raise_exception()
          File "/usr/local/lib/python3.5/dist-packages/gevent/event.py", line 343, in _raise_exception
            reraise(*self.exc_info)
          File "/usr/local/lib/python3.5/dist-packages/gevent/hub.py", line 38, in reraise
            raise value.with_traceback(tb)
          File "/usr/local/lib/python3.5/dist-packages/gevent/threadpool.py", line 207, in _worker
            value = func(*args, **kwargs)
        socket.gaierror: [Errno -2] Name or service not known
bacongobbler commented 7 years ago

reverting via #162 for now which resolves this issue. I'll continue working on this in #161.