Oracle Linux上运行docker registry报错


在oracle linux上安装docker后,尝试自建registry,运行如下命令报错,请教一下这样的问题一般解决的思路是什么?先行谢过!

[oracle@powerstation ~]$ sudo docker run -p 5000:5000 registry
[sudo] password for oracle:
[2015-06-27 06:32:18 +0000] [1] [INFO] Starting gunicorn 19.1.1
[2015-06-27 06:32:18 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
[2015-06-27 06:32:18 +0000] [1] [INFO] Using worker: gevent
[2015-06-27 06:32:18 +0000] [12] [INFO] Booting worker with pid: 12
[2015-06-27 06:32:18 +0000] [13] [INFO] Booting worker with pid: 13
[2015-06-27 06:32:18 +0000] [14] [INFO] Booting worker with pid: 14
[2015-06-27 06:32:18 +0000] [15] [INFO] Booting worker with pid: 15
27/Jun/2015:06:32:18 +0000 WARNING: Cache storage disabled!
27/Jun/2015:06:32:18 +0000 WARNING: Cache storage disabled!
27/Jun/2015:06:32:18 +0000 WARNING: Cache storage disabled!
27/Jun/2015:06:32:18 +0000 WARNING: Cache storage disabled!
27/Jun/2015:06:32:18 +0000 WARNING: LRU cache disabled!
27/Jun/2015:06:32:18 +0000 WARNING: LRU cache disabled!
27/Jun/2015:06:32:18 +0000 WARNING: LRU cache disabled!
27/Jun/2015:06:32:18 +0000 WARNING: LRU cache disabled!
27/Jun/2015:06:32:18 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
27/Jun/2015:06:32:18 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
27/Jun/2015:06:32:18 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
27/Jun/2015:06:32:18 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
27/Jun/2015:06:32:19 +0000 WARNING: DB is disconnected. Reconnect to it.
[2015-06-27 06:32:19 +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 27, in <module>
from .search import * # noqa
File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
INDEX = index.load(cfg.search_backend.lower())
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
return db.SQLAlchemyIndex()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
self._setup_database()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
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 27, in <module>
from .search import * # noqa
File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
INDEX = index.load(cfg.search_backend.lower())
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
return db.SQLAlchemyIndex()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
self._setup_database()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
[2015-06-27 06:32:19 +0000] [15] [INFO] Worker exiting (pid: 15)
27/Jun/2015:06:32:19 +0000 WARNING: DB is disconnected. Reconnect to it.
[2015-06-27 06:32:19 +0000] [12] [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 27, in <module>
from .search import * # noqa
File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
INDEX = index.load(cfg.search_backend.lower())
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
return db.SQLAlchemyIndex()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
self._setup_database()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
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 27, in <module>
from .search import * # noqa
File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in <module>
INDEX = index.load(cfg.search_backend.lower())
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/__init__.py", line 82, in load
return db.SQLAlchemyIndex()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/lib/index/db.py", line 86, in __init__
self._setup_database()
File "/usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py", line 330, in wrapper
os.remove(lock_path)
OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'
[2015-06-27 06:32:19 +0000] [12] [INFO] Worker exiting (pid: 12)
Traceback (most recent call last):
File "/usr/local/bin/gunicorn", line 11, in <module>
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>
[oracle@powerstation ~]$
已邀请:

docker_lyh - 70后IT男

赞同来自: lindong


我的linux上确实有sqlite3,这有什么关系吗?

其实这个问题我已经解决了,但是解决方式是祭起google的大旗,光靠google也不是个长久之计啊。所以还想问问具体的思路。

徐磊 - BlackOps@Qunar

赞同来自:


OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'

这个异常的root cause,不确定具体原因,顺便问一句,你的linux上有sqlite3么?

lindong

赞同来自:


请问是怎么解决的啊

要回复问题请先登录注册