docker-archive / docker-registry

This is **DEPRECATED**! Please go to https://github.com/docker/distribution
Apache License 2.0
2.88k stars 879 forks source link

using s3 storage failed... #928

Closed stream-iori closed 9 years ago

stream-iori commented 9 years ago

Hi all

i try to use registry with s3 storage, follow the example of docker run \ -e SETTINGS_FLAVOR=s3 \ -e AWS_BUCKET=/mybucket \ -e STORAGE_PATH=/registry \ -e AWS_KEY=\ \ -e AWS_SECRET=* \ -e SEARCH_BACKEND=sqlalchemy \ -p 5000:5000 \ registry

i have make sure that could connect to the s3 with aws s3 cli, but always get error below.

[2015-02-10 03:45:16 +0000] [1] [INFO] Starting gunicorn 19.1.1 [2015-02-10 03:45:16 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1) [2015-02-10 03:45:16 +0000] [1] [INFO] Using worker: gevent [2015-02-10 03:45:16 +0000] [13] [INFO] Booting worker with pid: 13 [2015-02-10 03:45:16 +0000] [14] [INFO] Booting worker with pid: 14 [2015-02-10 03:45:16 +0000] [15] [INFO] Booting worker with pid: 15 [2015-02-10 03:45:16 +0000] [16] [INFO] Booting worker with pid: 16 10/Feb/2015:03:45:17 +0000 WARNING: Cache storage disabled! 10/Feb/2015:03:45:17 +0000 WARNING: LRU cache disabled! 10/Feb/2015:03:45:17 +0000 WARNING: Cache storage disabled! 10/Feb/2015:03:45:17 +0000 WARNING: LRU cache disabled! 10/Feb/2015:03:45:17 +0000 WARNING: Cache storage disabled! 10/Feb/2015:03:45:17 +0000 WARNING: LRU cache disabled! 10/Feb/2015:03:45:17 +0000 WARNING: Cache storage disabled! 10/Feb/2015:03:45:17 +0000 WARNING: LRU cache disabled! [2015-02-10 03:45:52 +0000] [14] [ERROR] Exception in worker process: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process super(GeventWorker, self).init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app import(module) File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 20, in from .tags import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 22, in store = storage.load() File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/init.py", line 38, in load config=cfg) File "/usr/local/lib/python2.7/dist-packages/docker_registry/drivers/s3.py", line 72, in init super(Storage, self).init(path, config) File "/usr/local/lib/python2.7/dist-packages/docker_registry/core/boto.py", line 134, in init self._config.boto_bucket) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 521, in head_bucket response = self.make_request('HEAD', bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 664, in make_request retry_handler=retry_handler File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1068, in make_request retry_handler=retry_handler) File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 942, in _mexe request.body, request.headers) File "/usr/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 791, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1172, in connect self.timeout, self.source_address) File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 570, in create_connection for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM): File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 621, in getaddrinfo return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags) File "/usr/local/lib/python2.7/dist-packages/gevent/resolver_thread.py", line 34, in getaddrinfo return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs) File "/usr/local/lib/python2.7/dist-packages/gevent/threadpool.py", line 225, in apply_e raise result gaierror: [Errno -2] Name or service not known Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process super(GeventWorker, self).init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app import(module) File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 20, in from .tags import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 22, in store = storage.load() File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/init.py", line 38, in load config=cfg) File "/usr/local/lib/python2.7/dist-packages/docker_registry/drivers/s3.py", line 72, in init super(Storage, self).init(path, config) File "/usr/local/lib/python2.7/dist-packages/docker_registry/core/boto.py", line 134, in init self._config.boto_bucket) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 521, in head_bucket response = self.make_request('HEAD', bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 664, in make_request retry_handler=retry_handler File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1068, in make_request retry_handler=retry_handler) File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 942, in _mexe request.body, request.headers) File "/usr/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 791, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1172, in connect self.timeout, self.source_address) File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 570, in create_connection for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM): File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 621, in getaddrinfo return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags) File "/usr/local/lib/python2.7/dist-packages/gevent/resolver_thread.py", line 34, in getaddrinfo return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs) File "/usr/local/lib/python2.7/dist-packages/gevent/threadpool.py", line 225, in apply_e raise result gaierror: [Errno -2] Name or service not known [2015-02-10 03:45:52 +0000] [14] [INFO] Worker exiting (pid: 14) [2015-02-10 03:46:18 +0000] [15] [ERROR] Exception in worker process: Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process super(GeventWorker, self).init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app import(module) File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 20, in from .tags import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 22, in store = storage.load() File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/init.py", line 38, in load config=cfg) File "/usr/local/lib/python2.7/dist-packages/docker_registry/drivers/s3.py", line 72, in init super(Storage, self).init(path, config) File "/usr/local/lib/python2.7/dist-packages/docker_registry/core/boto.py", line 134, in init self._config.boto_bucket) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 521, in head_bucket response = self.make_request('HEAD', bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 664, in make_request retry_handler=retry_handler File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1068, in make_request retry_handler=retry_handler) File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 942, in _mexe request.body, request.headers) File "/usr/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 791, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1172, in connect self.timeout, self.source_address) File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 570, in create_connection for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM): File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 621, in getaddrinfo return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags) File "/usr/local/lib/python2.7/dist-packages/gevent/resolver_thread.py", line 34, in getaddrinfo return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs) File "/usr/local/lib/python2.7/dist-packages/gevent/threadpool.py", line 225, in apply_e raise result gaierror: [Errno -2] Name or service not known Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 507, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 193, in init_process super(GeventWorker, self).init_process() File "/usr/local/lib/python2.7/dist-packages/gunicorn/workers/base.py", line 114, in init_process self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 66, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/dist-packages/gunicorn/util.py", line 356, in import_app import(module) File "/usr/local/lib/python2.7/dist-packages/docker_registry/wsgi.py", line 20, in from .tags import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/tags.py", line 22, in store = storage.load() File "/usr/local/lib/python2.7/dist-packages/docker_registry/storage/init.py", line 38, in load config=cfg) File "/usr/local/lib/python2.7/dist-packages/docker_registry/drivers/s3.py", line 72, in init super(Storage, self).init(path, config) File "/usr/local/lib/python2.7/dist-packages/docker_registry/core/boto.py", line 134, in init self._config.boto_bucket) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 502, in get_bucket return self.head_bucket(bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 521, in head_bucket response = self.make_request('HEAD', bucket_name, headers=headers) File "/usr/local/lib/python2.7/dist-packages/boto/s3/connection.py", line 664, in make_request retry_handler=retry_handler File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 1068, in make_request retry_handler=retry_handler) File "/usr/local/lib/python2.7/dist-packages/boto/connection.py", line 942, in _mexe request.body, request.headers) File "/usr/lib/python2.7/httplib.py", line 973, in request self._send_request(method, url, body, headers) File "/usr/lib/python2.7/httplib.py", line 1007, in _send_request self.endheaders(body) File "/usr/lib/python2.7/httplib.py", line 969, in endheaders self._send_output(message_body) File "/usr/lib/python2.7/httplib.py", line 829, in _send_output self.send(msg) File "/usr/lib/python2.7/httplib.py", line 791, in send self.connect() File "/usr/lib/python2.7/httplib.py", line 1172, in connect self.timeout, self.source_address) File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 570, in create_connection for res in getaddrinfo(host, port, 0 if has_ipv6 else AF_INET, SOCK_STREAM): File "/usr/local/lib/python2.7/dist-packages/gevent/socket.py", line 621, in getaddrinfo return get_hub().resolver.getaddrinfo(host, port, family, socktype, proto, flags) File "/usr/local/lib/python2.7/dist-packages/gevent/resolver_thread.py", line 34, in getaddrinfo return self.pool.apply_e(self.expected_errors, _socket.getaddrinfo, args, kwargs) File "/usr/local/lib/python2.7/dist-packages/gevent/threadpool.py", line 225, in apply_e raise result gaierror: [Errno -2] Name or service not known [2015-02-10 03:46:18 +0000] [15] [INFO] Worker exiting (pid: 15) Traceback (most recent call last): File "/usr/local/bin/gunicorn", line 11, in sys.exit(run()) File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/wsgiapp.py", line 74, in run WSGIApplication("%(prog)s [OPTIONS] [APP_MODULE]").run() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 185, in run super(Application, self).run() File "/usr/local/lib/python2.7/dist-packages/gunicorn/app/base.py", line 71, in run Arbiter(self).run() File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 196, in run self.halt(reason=inst.reason, exit_status=inst.exit_status) File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 292, in halt self.stop() File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 343, in stop time.sleep(0.1) File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 209, in handle_chld self.reap_workers() File "/usr/local/lib/python2.7/dist-packages/gunicorn/arbiter.py", line 459, in reap_workers raise HaltServer(reason, self.WORKER_BOOT_ERROR) gunicorn.errors.HaltServer: <HaltServer 'Worker failed to boot.' 3>

stream-iori commented 9 years ago

i have found problem that bucket name can not include slash mybucket instead of /mybucket