[PyWPS-dev] pywps in docker: unable to open database file
Martin Landa
landa.martin at gmail.com
Tue Oct 8 01:24:44 PDT 2019
Hi,
I am running pywps in self-made docker. Logs are stored outside of docker:
"""
volumes:
- /opt/subdayprecip-design/wps/logs:/var/log/pywps
"""
Relevant part of configuration:
"""
[logging]
file=/var/log/pywps/pywps.log
database=sqlite:///var/log/pywps/pywps.db
level=INFO
"""
Unfortunately an execute request fails with
"""
2019-10-08 08:19:54,119] [ERROR]
file=/usr/local/lib/python2.7/dist-packages/pywps/exceptions.py
line=45 module=exceptions function=__init__ Exception: code: 400,
locator: Service error: (OperationalError) unable to open database
file None None, description:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pywps/app/Service.py",
line 371, in _parse_and_execute
wps_response = process.execute(wps_request, uuid)
File "/usr/local/lib/python2.7/dist-packages/pywps/app/Process.py",
line 147, in execute
wps_response = self._execute_process(self.async, wps_request, wps_response)
File "/usr/local/lib/python2.7/dist-packages/pywps/app/Process.py",
line 173, in _execute_process
running = dblog.get_running().count()
File "/usr/local/lib/python2.7/dist-packages/pywps/dblog.py", line
84, in get_running
session = get_session()
File "/usr/local/lib/python2.7/dist-packages/pywps/dblog.py", line
177, in get_session
ProcessInstance.metadata.create_all(engine)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/sql/schema.py",
line 3404, in create_all
tables=tables)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1615, in _run_visitor
with self._optional_conn_ctx_manager(connection) as conn:
File "/usr/lib/python2.7/contextlib.py", line 17, in __enter__
return self.gen.next()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1608, in _optional_conn_ctx_manager
with self.contextual_connect() as conn:
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/base.py",
line 1798, in contextual_connect
self.pool.connect(),
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
338, in connect
return _ConnectionFairy._checkout(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
644, in _checkout
fairy = _ConnectionRecord.checkout(pool)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
440, in checkout
rec = pool._do_get()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
1057, in _do_get
return self._create_connection()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
285, in _create_connection
return _ConnectionRecord(self)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
411, in __init__
self.connection = self.__connect()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/pool.py", line
538, in __connect
connection = self.__pool._creator()
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py",
line 96, in connect
connection_invalidated=invalidated
File "/usr/lib/python2.7/dist-packages/sqlalchemy/util/compat.py",
line 199, in raise_from_cause
reraise(type(exception), exception, tb=exc_tb)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/strategies.py",
line 90, in connect
return dialect.connect(*cargs, **cparams)
File "/usr/lib/python2.7/dist-packages/sqlalchemy/engine/default.py",
line 377, in connect
return self.dbapi.connect(*cargs, **cparams)
OperationalError: (OperationalError) unable to open database file None None
"""
But strangely logging db is created and request stored successfully:
680667e2-e9a4-11e9-a3ce-0242ac130004|19|execute|1.0.0|2019-10-08
08:19:54.067625|2019-10-08 08:19:54.131476|d-rain-shp||100.0|0
Any idea what is wrong? Thanks in advance, Martin
--
Martin Landa
http://geo.fsv.cvut.cz/gwiki/Landa
http://gismentors.cz/mentors/landa
More information about the pywps-dev
mailing list