Microservices-Based-Algorithmic-Trading-System
Microservices-Based-Algorithmic-Trading-System copied to clipboard
PgAdmin - The container does not start
Docker Desktop Expose daemon on tcp: // .... - enabled WSL integration - Ubuntu 20.04
PyCharm with Docker, docker Compose
Logs from the container
`[2021-02-12 09:15:16 +0000] [1] [INFO] Starting gunicorn 19.9.0
[2021-02-12 09:15:16 +0000] [1] [INFO] Listening at: http://[::]:80 (1)
[2021-02-12 09:15:16 +0000] [1] [INFO] Using worker: threads
/usr/local/lib/python3.9/os.py:1023: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
return io.open(fd, *args, **kwargs)
[2021-02-12 09:15:16 +0000] [89] [INFO] Booting worker with pid: 89
WARNING: Failed to set ACL on the directory containing the configuration database:
[Errno 1] Operation not permitted: '/var/lib/pgadmin'
HINT : You may need to manually set the permissions on
/var/lib/pgadmin to allow pgadmin to write to it.
[2021-02-12 09:15:17 +0000] [89] [ERROR] Exception in worker process
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
worker.init_process()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/gthread.py", line 104, in init_process
super(ThreadWorker, self).init_process()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 129, in init_process
self.load_wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/workers/base.py", line 138, in load_wsgi
self.wsgi = self.app.wsgi()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/base.py", line 67, in wsgi
self.callable = self.load()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 52, in load
return self.load_wsgiapp()
File "/usr/local/lib/python3.9/site-packages/gunicorn/app/wsgiapp.py", line 41, in load_wsgiapp
return util.import_app(self.app_uri)
File "/usr/local/lib/python3.9/site-packages/gunicorn/util.py", line 350, in import_app
import(module)
File "/pgadmin4/run_pgadmin.py", line 4, in
from pgAdmin4 import app
File "/pgadmin4/pgAdmin4.py", line 94, in
app = create_app()
File "/pgadmin4/pgadmin/init.py", line 256, in create_app
create_app_data_directory(config)
File "/pgadmin4/pgadmin/setup/data_directory.py", line 90, in create_app_data_directory
os.chmod(config.SESSION_DB_PATH, 0o700)
PermissionError: [Errno 1] Operation not permitted: '/var/lib/pgadmin/sessions'
[2021-02-12 09:15:17 +0000] [89] [INFO] Worker exiting (pid: 89)
[2021-02-12 09:15:17 +0000] [1] [INFO] Shutting down: Master
[2021-02-12 09:15:17 +0000] [1] [INFO] Reason: Worker failed to boot.`
you need to adjust the permission the volume that is being mounted into the container. The error message is indicating that its a permission issue and it cant read/modify the configuration database. i wouldnt recommend for production, but for testing you can see if this is the issue by chmod 777 on the /Storage/pgadmin directory
if I change the permissions, the container starts but can't log in.
I will try PyCharm Pro now, with WSL and clone the entire script to Ubuntu / Home / users and from there I will try to install everything on Ubuntu.
Can someone send me the docker_compose.yml file without these volumen mounts. files can be modified in Ubuntu WSL / Home / users / wsl
Same issue here!
After execute $ chmod 777 -R /path/to/Storage/pgadmin
, the container of pgadmin
still starts failed.
the log is int the following
pgadmin | [2021-03-12 08:32:10 +0000] [82] [ERROR] Exception in worker process
pgadmin | Traceback (most recent call last):
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker
pgadmin | worker.init_process()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 92, in init_proces
s
pgadmin | super().init_process()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/arbiter.py", line 583, in spawn_worker pgadmin | worker.init_process()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/workers/gthread.py", line 92, in init_proces
s
pgadmin | super().init_process()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 119, in init_process
pgadmin | self.load_wsgi()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/workers/base.py", line 144, in load_wsgi pgadmin | self.wsgi = self.app.wsgi()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/app/base.py", line 67, in wsgi
pgadmin | self.callable = self.load()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 49, in load
pgadmin | return self.load_wsgiapp()
pgadmin | File "/venv/lib/python3.8/site-packages/gunicorn/app/wsgiapp.py", line 39, in load_wsgiapp
pgadmin | return util.import_app(sel
Please see this article https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#mapped-files-and-directories .
You will need this command to sudo chown -R 5050:5050 <host_directory>
or below in our case. sudo chown -R 5050:5050 ${WP}/pgadmin/
How to do in windows ?
Please see this article https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html#mapped-files-and-directories .
You will need this command to sudo chown -R 5050:5050 <host_directory>
or below in our case. sudo chown -R 5050:5050 ${WP}/pgadmin/
Works for me !