docker-registry icon indicating copy to clipboard operation
docker-registry copied to clipboard

Registry fails on startup : `OSError: [Errno 2] No such file or directory: './registry._setup_database.lock'`

Open ankushagarwal opened this issue 10 years ago • 39 comments

I have seen similar issues related to registry here, but this one seems different. I ran a docker run -d --name registry -p 80:5000 registry on my Mac in boot2docker.

$ docker version                                                                                                                                                                                                          
Client version: 1.4.1
Client API version: 1.16
Go version (client): go1.3.3
Git commit (client): 5bc2ff8
OS/Arch (client): darwin/amd64
Server version: 1.4.1
Server API version: 1.16
Go version (server): go1.3.3
Git commit (server): 5bc2ff8
$ docker logs registry                                                                                                             
[2015-01-09 21:22:06 +0000] [1] [INFO] Starting gunicorn 19.1.1
[2015-01-09 21:22:06 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1)
[2015-01-09 21:22:06 +0000] [1] [INFO] Using worker: gevent
[2015-01-09 21:22:06 +0000] [14] [INFO] Booting worker with pid: 14
[2015-01-09 21:22:06 +0000] [15] [INFO] Booting worker with pid: 15
[2015-01-09 21:22:06 +0000] [16] [INFO] Booting worker with pid: 16
[2015-01-09 21:22:06 +0000] [21] [INFO] Booting worker with pid: 21
09/Jan/2015:21:22:06 +0000 WARNING: Cache storage disabled!
09/Jan/2015:21:22:06 +0000 WARNING: Cache storage disabled!
09/Jan/2015:21:22:06 +0000 WARNING: Cache storage disabled!
09/Jan/2015:21:22:06 +0000 WARNING: LRU cache disabled!
09/Jan/2015:21:22:06 +0000 WARNING: LRU cache disabled!
09/Jan/2015:21:22:06 +0000 WARNING: LRU cache disabled!
09/Jan/2015:21:22:06 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
09/Jan/2015:21:22:06 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
09/Jan/2015:21:22:06 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
09/Jan/2015:21:22:06 +0000 WARNING: Cache storage disabled!
09/Jan/2015:21:22:06 +0000 WARNING: LRU cache disabled!
09/Jan/2015:21:22:06 +0000 DEBUG: Will return docker-registry.drivers.file.Storage
09/Jan/2015:21:22:06 +0000 WARNING: Another process is creating the search database
09/Jan/2015:21:22:06 +0000 WARNING: DB is disconnected. Reconnect to it.
09/Jan/2015:21:22:06 +0000 WARNING: DB is disconnected. Reconnect to it.
[2015-01-09 21:22:06 +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 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-01-09 21:22:06 +0000] [21] [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-01-09 21:22:06 +0000] [14] [INFO] Worker exiting (pid: 14)
[2015-01-09 21:22:06 +0000] [21] [INFO] Worker exiting (pid: 21)
[2015-01-09 21:22:07 +0000] [16] [INFO] Worker exiting (pid: 16)
[2015-01-09 21:22:07 +0000] [15] [INFO] Worker exiting (pid: 15)
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>

ankushagarwal avatar Jan 09 '15 21:01 ankushagarwal

I have seen similar issues(#696, #829, #796, etc.) related to registry startup in Issues, but I was not sure if this was exactly the same as none of them throw the error [Errno 2] No such file or directory: './registry._setup_database.lock'

ankushagarwal avatar Jan 09 '15 21:01 ankushagarwal

This is different. I'll look into it.

dmp42 avatar Jan 09 '15 22:01 dmp42

@ankushagarwal Does this happen consistently?

dmp42 avatar Jan 09 '15 22:01 dmp42

Tried reproducing it without any success.

ankushagarwal avatar Jan 10 '15 00:01 ankushagarwal

It happens sometimes. I can't reproduce it deterministically.

ankushagarwal avatar Jan 10 '15 00:01 ankushagarwal

I can reproduce it deterministically.

Whenever I restart boot2docker and do a docker start registry. It happens and the registry container crashes. I then do a docker start registry for the second time and it works fine.

This is my registry config. The only change I have made from the default is on line 214

This is my b2d version :

$ boot2docker version
Boot2Docker-cli version: v1.4.1
Git commit: 43241cb

ankushagarwal avatar Jan 10 '15 07:01 ankushagarwal

Thanks. Weird that it would crash there then. I'll have another look.

dmp42 avatar Jan 12 '15 19:01 dmp42

Got the same thing 2 times in a row then it worked the 3rd time. @dmp42 do you want me to provide anymore information about our environment or have you got enough to go on here?

dbason avatar Jan 12 '15 23:01 dbason

The code just looks racy from the get go...

dmp42 avatar Jan 12 '15 23:01 dmp42

does not work for me either newest or 0.8.1 to 0.9.1

Client version: 1.3.3 Client API version: 1.15 Go version (client): go1.3.2 Git commit (client): 54d900a OS/Arch (client): linux/amd64 Server version: 1.3.3 Server API version: 1.15 Go version (server): go1.3.2 Git commit (server): 54d900a

pavelz avatar Jan 14 '15 13:01 pavelz

@pavelz can you elaborate on what doesn't work? This specific code path is not in 0.8.1 - so, you are likely having a different issue here.

dmp42 avatar Jan 14 '15 19:01 dmp42

+1 for boot2docker/Windows for this error, and it disappear in 2nd time. registry:0.9.1 boot2docker 1.4.1

larrycai avatar Jan 15 '15 05:01 larrycai

Happens to somewhat randomly to me on docker:1.4.1.
btrfs on fedora 21.

Should note that adding

-e GUNICORN_OPTS=[--preload]

from issue #796 comments worked fine

rseymour avatar Jan 16 '15 02:01 rseymour

I am experiencing this problem running the registry on CoreOS. The first time I run the registry and it has to pull from the registry image from the docker public repository, it always seems to fail. After the images have been pulled, then it seems to start just fine.

jasonmartens avatar Jan 30 '15 20:01 jasonmartens

I reproduced this issue fairly consistently (~1 out of 4) on both boot2docker and a ubuntu 14.04 host. Both run docker 1.4.1 and registry 0.9.1. The same problem happened in earlier versions of docker and registry as well.

I used the default configurations of both docker and registry.

The script that triggered this issue creates a registry container:

$ docker create -P --name registry-container registry

And then repeats these steps over and over again:

  1. docker start registry-container
  2. on localhost, push ~30 containers to registry
  3. on a remote host, pull all those containers from registry
  4. docker stop registry-container
  5. go to step 1

Let me know if there's more info I can provide.

weihanwang avatar Feb 01 '15 06:02 weihanwang

I had this issue on Amazon Linux. It started for me after i upgraded docker.

I resolved the issue by running 'docker pull registry' , which updated the copy of the registry image

cinterloper avatar Feb 03 '15 01:02 cinterloper

I can confirm @cinterloper findings for Ubuntu x64 14.04.1

jcockhren avatar Feb 06 '15 05:02 jcockhren

Confirm. EC2, CoreOS.

akaspin avatar Feb 12 '15 01:02 akaspin

People: if you have that issue, please don't add more comments unless the information does add value.

Adding -e GUNICORN_OPTS=["--preload"] to your docker run command will workaround the issue as a short-term remediation.

Thanks.

dmp42 avatar Feb 12 '15 02:02 dmp42

Hi all, This bug is due to line 330 in /usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py, in which there is a "os.remove(lock_path)" and this lock file doesn't exists using the SETTINGS_FLAVOR=dev and a local storage path, as stated by user guide. I try to fix it by removing file after testing for its existance:

        finally:
            #check for file existance
            if os.path.exists(lock_path):
                #the original 330 line of /usr/local/lib/python2.7/dist-packages/docker_registry/toolkit.py
                os.remove(lock_path)
        return result

And then docker-registry will start without the GUNICORN_OPTS

bunop avatar Mar 09 '15 15:03 bunop

@bunop this has nothing to do with local storage. The lock file always exist no matter the storage, as long as you enable the search index.

dmp42 avatar Mar 09 '15 19:03 dmp42

I 'm still getting this error and unable to start the registry container. Going through the comments in this thread I couldn't derive a conclusion.

[root@localhost files]# docker run -p 5000:5000 registry [info] POST /v1.15/containers/create [8f91c94d] +job create() [8f91c94d] +job log(create, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) [8f91c94d] -job log(create, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) = OK (0) [8f91c94d] -job create() = OK (0) [info] POST /v1.15/containers/2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd/attach?stderr=1&stdout=1&stream=1 [8f91c94d] +job container_inspect(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] -job container_inspect(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [8f91c94d] +job attach(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [info] POST /v1.15/containers/2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd/start [8f91c94d] +job start(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] +job allocate_interface(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] -job allocate_interface(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [8f91c94d] +job allocate_port(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] -job allocate_port(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [8f91c94d] +job log(start, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) [8f91c94d] -job log(start, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) = OK (0) [8f91c94d] -job start(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [2015-03-30 07:06:34 +0000] [1] [INFO] Starting gunicorn 19.1.1 [2015-03-30 07:06:34 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1) [2015-03-30 07:06:34 +0000] [1] [INFO] Using worker: gevent [2015-03-30 07:06:34 +0000] [12] [INFO] Booting worker with pid: 12 [2015-03-30 07:06:34 +0000] [13] [INFO] Booting worker with pid: 13 [2015-03-30 07:06:34 +0000] [14] [INFO] Booting worker with pid: 14 [2015-03-30 07:06:34 +0000] [15] [INFO] Booting worker with pid: 15 30/Mar/2015:07:06:35 +0000 WARNING: Cache storage disabled! 30/Mar/2015:07:06:35 +0000 WARNING: Cache storage disabled! 30/Mar/2015:07:06:35 +0000 WARNING: LRU cache disabled! 30/Mar/2015:07:06:35 +0000 WARNING: LRU cache disabled! 30/Mar/2015:07:06:35 +0000 WARNING: Cache storage disabled! 30/Mar/2015:07:06:35 +0000 WARNING: Cache storage disabled! 30/Mar/2015:07:06:35 +0000 WARNING: LRU cache disabled! 30/Mar/2015:07:06:35 +0000 WARNING: LRU cache disabled! 30/Mar/2015:07:06:35 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 30/Mar/2015:07:06:35 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 30/Mar/2015:07:06:35 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 30/Mar/2015:07:06:35 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 30/Mar/2015:07:06:36 +0000 WARNING: Another process is creating the search database 30/Mar/2015:07:06:36 +0000 WARNING: Another process is creating the search database 30/Mar/2015:07:06:36 +0000 WARNING: DB is disconnected. Reconnect to it. [2015-03-30 07:06:36 +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 27, in from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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 from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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-03-30 07:06:36 +0000] [14] [INFO] Worker exiting (pid: 14) [2015-03-30 07:06:37 +0000] [15] [INFO] Worker exiting (pid: 15) [2015-03-30 07:06:37 +0000] [13] [INFO] Worker exiting (pid: 13) [2015-03-30 07:06:37 +0000] [12] [INFO] Worker exiting (pid: 12) [2015-03-30 07:06:37 +0000] [1] [INFO] Shutting down: Master [2015-03-30 07:06:37 +0000] [1] [INFO] Reason: Worker failed to boot. [8f91c94d] +job log(die, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) [8f91c94d] -job log(die, 2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd, registry:latest) = OK (0) [8f91c94d] +job release_interface(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] -job attach(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [info] POST /v1.15/containers/2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd/wait [8f91c94d] +job wait(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) [8f91c94d] -job release_interface(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0) [8f91c94d] -job wait(2f6d143842dd4a86c7f9bfdd3eb92b0754291abfde5d9ddc8ee0d31a1475b5bd) = OK (0)

Please someone help.

ashish235 avatar Mar 30 '15 07:03 ashish235

I'm having the same crash here...

kulbida avatar Apr 13 '15 02:04 kulbida

2015-04-13 02:39:15 +0000] [1] [INFO] Starting gunicorn 19.1.1 [2015-04-13 02:39:15 +0000] [1] [INFO] Listening at: http://0.0.0.0:5000 (1) [2015-04-13 02:39:15 +0000] [1] [INFO] Using worker: gevent [2015-04-13 02:39:15 +0000] [12] [INFO] Booting worker with pid: 12 [2015-04-13 02:39:15 +0000] [13] [INFO] Booting worker with pid: 13 [2015-04-13 02:39:15 +0000] [14] [INFO] Booting worker with pid: 14 [2015-04-13 02:39:15 +0000] [15] [INFO] Booting worker with pid: 15 13/Apr/2015:02:39:15 +0000 WARNING: Cache storage disabled! 13/Apr/2015:02:39:15 +0000 WARNING: Cache storage disabled! 13/Apr/2015:02:39:15 +0000 WARNING: LRU cache disabled! 13/Apr/2015:02:39:15 +0000 WARNING: LRU cache disabled! 13/Apr/2015:02:39:15 +0000 WARNING: Cache storage disabled! 13/Apr/2015:02:39:15 +0000 WARNING: LRU cache disabled! 13/Apr/2015:02:39:15 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 13/Apr/2015:02:39:15 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 13/Apr/2015:02:39:15 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 13/Apr/2015:02:39:15 +0000 WARNING: Cache storage disabled! 13/Apr/2015:02:39:15 +0000 WARNING: LRU cache disabled! 13/Apr/2015:02:39:15 +0000 DEBUG: Will return docker-registry.drivers.file.Storage 13/Apr/2015:02:39:15 +0000 WARNING: Another process is creating the search database 13/Apr/2015:02:39:16 +0000 WARNING: DB is disconnected. Reconnect to it. [2015-04-13 02:39:16 +0000] [13] [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 from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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 from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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-04-13 02:39:16 +0000] [13] [INFO] Worker exiting (pid: 13) 13/Apr/2015:02:39:16 +0000 WARNING: DB is disconnected. Reconnect to it. [2015-04-13 02:39:16 +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 from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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 from .search import * # noqa File "/usr/local/lib/python2.7/dist-packages/docker_registry/search.py", line 14, in 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-04-13 02:39:16 +0000] [15] [INFO] Worker exiting (pid: 15) [2015-04-13 02:39:16 +0000] [12] [INFO] Worker exiting (pid: 12) [2015-04-13 02:39:17 +0000] [14] [INFO] Worker exiting (pid: 14) [2015-04-13 02:39:17 +0000] [1] [INFO] Shutting down: Master [2015-04-13 02:39:17 +0000] [1] [INFO] Reason: Worker failed to boot.

kulbida avatar Apr 13 '15 02:04 kulbida

Used -e GUNICORN_OPTS=["--preload"] as a temp workaround...

kulbida avatar Apr 13 '15 02:04 kulbida

-e GUNICORN_OPTS=["--preload"] works for me

wptad avatar May 06 '15 10:05 wptad

-e GUNICORN_OPTS=["--preload"] works for me, too

charlielin avatar May 07 '15 09:05 charlielin

-e GUNICORN_OPTS=["--preload"] works for me, too

joda70 avatar May 08 '15 10:05 joda70

Works for me every time. I use -e GUNICORN_OPTS=["--preload"] by default now to start registry.

ashish235 avatar May 08 '15 11:05 ashish235

Same here. -e GUNICORN_OPTS=["--preload"] made the trick

patjlm avatar May 13 '15 15:05 patjlm