Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not running from a recent docker build #272

Open
michaelschefczyk opened this issue Apr 5, 2021 · 9 comments
Open

Not running from a recent docker build #272

michaelschefczyk opened this issue Apr 5, 2021 · 9 comments

Comments

@michaelschefczyk
Copy link

Dear All,

I did run this for many months based on internal docker builds - thanks!! The last running build was a week old. A new build does no longer seem to run, probably based on python 2.7 issues. The log shows:

File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 639, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", line 453, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: http://sqlalche.me/e/e3q8)

That does not seem to have anything to do with my mysql setup because this container https://github.com/crazy-max/docker-firefox-syncserver does run when putting the same sqlalchemy string in its environment variable.

Regards,

Michael Schefczyk

@pwlgrzs
Copy link

pwlgrzs commented Jul 11, 2021

Hi, I am seeing same error:
**[2021-07-11 09:06:36 +0000] [8] [INFO] Starting gunicorn 19.10.0
[2021-07-11 09:06:36 +0000] [8] [INFO] Listening at: http://0.0.0.0:5000 (8)
[2021-07-11 09:06:36 +0000] [8] [INFO] Using worker: sync
[2021-07-11 09:06:36 +0000] [16] [INFO] Booting worker with pid: 16
[2021-07-11 09:06:37 +0000] [16] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 586, i n spawn_worker
worker.init_process()
File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 1 35, in init_process
self.load_wsgi()
File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 1 44, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, i n wsgi
self.callable = self.load()
File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52 , in load
return self.load_wsgiapp()
File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 41 , in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python2.7/site-packages/gunicorn/util.py", line 350, in i mport_app
import(module)
File "/app/syncserver/wsgi_app.py", line 2, in
application = syncserver.main()
File "/app/syncserver/init.py", line 281, in main
config = get_configurator(global_config, **settings)
File "/app/syncserver/init.py", line 273, in get_configurator
config.include(includeme)
File "/usr/local/lib/python2.7/site-packages/pyramid/config/init.py", line 676, in include
c(configurator)
File "/app/syncserver/init.py", line 158, in includeme
config.include("syncstorage", route_prefix="/storage")
File "/usr/local/lib/python2.7/site-packages/pyramid/config/init.py", line 676, in include
c(configurator)
File "/usr/local/lib/python2.7/site-packages/syncstorage/init.py", line 18 , in includeme
config.include("syncstorage.storage")
File "/usr/local/lib/python2.7/site-packages/pyramid/config/init.py", line 676, in include
c(configurator)
File "/usr/local/lib/python2.7/site-packages/syncstorage/storage/init.py", line 576, in includeme
storage = load_storage_from_settings("storage", settings)
File "/usr/local/lib/python2.7/site-packages/syncstorage/storage/init.py", line 600, in load_storage_from_settings
return klass(**section_settings)
File "/usr/local/lib/python2.7/site-packages/syncstorage/storage/sql/init. py", line 137, in init
self.dbconnector = DBConnector(sqluri, **dbkwds)
File "/usr/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect .py", line 385, in init
collections.create(self.engine, checkfirst=True)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/sql/schema.py", line 8 60, in create
bind._run_visitor(ddl.SchemaGenerator, self, checkfirst=checkfirst)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2032, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/local/lib/python2.7/contextlib.py", line 17, in enter
return self.gen.next()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2024, in _optional_conn_ctx_manager
with self._contextual_connect() as conn:
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2226, in _contextual_connect
self._wrap_pool_connect(self.pool.connect, None),
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2266, in _wrap_pool_connect
e, dialect, self
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 1536, in _handle_dbapi_exception_noconnection
util.raise_from_cause(sqlalchemy_exception, exc_info)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb, cause=cause)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/base.py", line 2262, in _wrap_pool_connect
return fn()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 36 3, in connect
return _ConnectionFairy._checkout(self)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 76 0, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 49 2, in checkout
rec = pool._do_get()
File "/usr/local/lib/python2.7/site-packages/mozsvc/metrics.py", line 183, in timed_func
return func(*args, **kwds)
File "/usr/local/lib/python2.7/site-packages/syncstorage/storage/sql/dbconnect .py", line 305, in _do_get
return QueuePool._do_get(self)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/impl.py", line 13 9, in _do_get
self._dec_overflow()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in exit
compat.reraise(exc_type, exc_value, exc_tb)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/impl.py", line 13 6, in _do_get
return self._create_connection()
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 30 8, in _create_connection
return _ConnectionRecord(self)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 43 7, in init
self.__connect(first_connect_check=True)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/pool/base.py", line 63 9, in __connect
connection = pool._invoke_creator(self)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/strategies.py", line 114, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/local/lib/python2.7/site-packages/sqlalchemy/engine/default.py", li ne 453, in connect
return self.dbapi.connect(*cargs, cparams)
OperationalError: (sqlite3.OperationalError) unable to open database file
(Background on this error at: http://sqlalche.me/e/e3q8)
[2021-07-11 09:06:37 +0000] [16] [INFO] Worker exiting (pid: 16)
[2021-07-11 09:06:38 +0000] [8] [INFO] Shutting down: Master
[2021-07-11 09:06:38 +0000] [8] [INFO] Reason: Worker failed to boot.

@BartekWolv
Copy link

Did you fix guys this issue?
I had working container before but yesterday I did clean install of system and now I can't manage it to work while I'm using clean docker image :/

@JXGA
Copy link

JXGA commented Sep 4, 2021

I had this issue - re-read the docs and realised the issue...

There is experimental support for running the server inside a Docker container. The docker image runs with UID/GID 1001/1001.

A quick id 1001 and chown fixed the issue.

@BartekWolv
Copy link

I had this issue - re-read the docs and realised the issue...

There is experimental support for running the server inside a Docker container. The docker image runs with UID/GID 1001/1001.

A quick id 1001 and chown fixed the issue.

within container? or where?

@JXGA
Copy link

JXGA commented Sep 5, 2021

I had this issue - re-read the docs and realised the issue...

There is experimental support for running the server inside a Docker container. The docker image runs with UID/GID 1001/1001.

A quick id 1001 and chown fixed the issue.

within container? or where?

On the host file system, or use a different database address (MySQL might work fine with SQLAlchemy)

@gmolveau
Copy link

gmolveau commented Oct 4, 2021

any updates on this issue ? I'm still getting the error unable to open database file when using a volume with docker-compose

@BartekWolv
Copy link

I give up with this official Docker, I use instead Docker created by Docker employee:
https://registry.hub.docker.com/r/crazymax/firefox-syncserver/
https://github.com/crazy-max/docker-firefox-syncserver
Works fine since then (except somehow not works on phone, not sure why).

@gmolveau
Copy link

gmolveau commented Oct 6, 2021

Thank's for your answer. I gave it a try and managed to make it work with MariaDB instead of sqlite.

https://github.com/gmolveau/mozilla_syncserver

@jcleng
Copy link

jcleng commented Jul 26, 2023

the mozilla/syncserver:latest same

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants