Open mindaugasva opened 1 month ago
I found solution.
I changed port (from 5433 to 5432) in line 272 (in docker-compose.yml):
command: bash -c "./wait-for-it.sh postgres:5432 ...
and now "api" log show another error:
2024-09-12 08:37:40 wait-for-it.sh: waiting 2 seconds for postgres:5432
2024-09-12 08:37:40 wait-for-it.sh: postgres:5432 is available after 0 seconds
2024-09-12 08:37:41 [2024-09-12 05:37:41 +0000] [1] [DEBUG] Current configuration:
2024-09-12 08:37:41 config: ./gunicorn.conf.py
....
....
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [1] [INFO] Starting gunicorn 23.0.0
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [1] [DEBUG] Arbiter booted
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [1] [INFO] Listening at: http://0.0.0.0:5005 (1)
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [1] [INFO] Using worker: geventwebsocket.gunicorn.workers.GeventWebSocketWorker
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [21] [INFO] Booting worker with pid: 21
2024-09-12 08:38:06 [2024-09-12 05:38:06 +0000] [1] [DEBUG] 1 workers
2024-09-12 08:38:07 [2024-09-12 05:38:07 +0000] [21] [ERROR] Exception in worker process
2024-09-12 08:38:07 Traceback (most recent call last):
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/arbiter.py", line 608, in spawn_worker
2024-09-12 08:38:07 worker.init_process()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/ggevent.py", line 146, in init_process
2024-09-12 08:38:07 super().init_process()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 135, in init_process
2024-09-12 08:38:07 self.load_wsgi()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/workers/base.py", line 147, in load_wsgi
2024-09-12 08:38:07 self.wsgi = self.app.wsgi()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/app/base.py", line 66, in wsgi
2024-09-12 08:38:07 self.callable = self.load()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 57, in load
2024-09-12 08:38:07 return self.load_wsgiapp()
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/app/wsgiapp.py", line 47, in load_wsgiapp
2024-09-12 08:38:07 return util.import_app(self.app_uri)
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/gunicorn/util.py", line 370, in import_app
2024-09-12 08:38:07 mod = importlib.import_module(module)
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/importlib/__init__.py", line 127, in import_module
2024-09-12 08:38:07 return _bootstrap._gcd_import(name[level:], package, level)
2024-09-12 08:38:07 File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
2024-09-12 08:38:07 File "<frozen importlib._bootstrap>", line 983, in _find_and_load
2024-09-12 08:38:07 File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
2024-09-12 08:38:07 File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
2024-09-12 08:38:07 File "<frozen importlib._bootstrap_external>", line 728, in exec_module
2024-09-12 08:38:07 File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
2024-09-12 08:38:07 File "/home/api/wsgi.py", line 11, in <module>
2024-09-12 08:38:07 from app import (
2024-09-12 08:38:07 File "/home/api/app/__init__.py", line 13, in <module>
2024-09-12 08:38:07 from app.logs.service import LogService
2024-09-12 08:38:07 File "/home/api/app/logs/service.py", line 7, in <module>
2024-09-12 08:38:07 from app.config import basedir
2024-09-12 08:38:07 File "/home/api/app/config.py", line 87, in <module>
2024-09-12 08:38:07 class Development(Config):
2024-09-12 08:38:07 File "/home/api/app/config.py", line 102, in Development
2024-09-12 08:38:07 SESSION_REDIS = redis.from_url(os.environ.get('SESSION_REDIS_URL'))
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/redis/utils.py", line 19, in from_url
2024-09-12 08:38:07 return Redis.from_url(url, db, **kwargs)
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/redis/client.py", line 696, in from_url
2024-09-12 08:38:07 connection_pool = ConnectionPool.from_url(url, db=db, **kwargs)
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/site-packages/redis/connection.py", line 1034, in from_url
2024-09-12 08:38:07 'port': int(url.port or 6379),
2024-09-12 08:38:07 File "/usr/local/lib/python3.7/urllib/parse.py", line 180, in port
2024-09-12 08:38:07 port = int(port, 10)
2024-09-12 08:38:07 ValueError: invalid literal for int() with base 10: '<PORT>'
2024-09-12 08:38:07 [2024-09-12 05:38:07 +0000] [21] [INFO] Worker exiting (pid: 21)
2024-09-12 08:38:07 [2024-09-12 05:38:07 +0000] [1] [ERROR] Worker (pid:21) exited with code 3
2024-09-12 08:38:07 [2024-09-12 05:38:07 +0000] [1] [ERROR] Shutting down: Master
2024-09-12 08:38:07 [2024-09-12 05:38:07 +0000] [1] [ERROR] Reason: Worker failed to boot.
do you have any ideas?
2024-09-12 08:24:32 1:C 12 Sep 2024 05:24:32.335 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
2024-09-12 08:24:32 1:C 12 Sep 2024 05:24:32.336 # Redis version=6.0.6, bits=64, commit=00000000, modified=0, pid=1, just started
2024-09-12 08:24:32 1:C 12 Sep 2024 05:24:32.336 # Configuration loaded
2024-09-12 08:24:32 _._
2024-09-12 08:24:32 _.-``__ ''-._
2024-09-12 08:24:32 _.-`` `. `_. ''-._ Redis 6.0.6 (00000000/0) 64 bit
2024-09-12 08:24:32 .-`` .-```. ```\/ _.,_ ''-._
2024-09-12 08:24:32 ( ' , .-` | `, ) Running in standalone mode
2024-09-12 08:24:32 |`-._`-...-` __...-.``-._|'` _.-'| Port: 6379
2024-09-12 08:24:32 | `-._ `._ / _.-' | PID: 1
2024-09-12 08:24:32 `-._ `-._ `-./ _.-' _.-'
2024-09-12 08:24:32 |`-._`-._ `-.__.-' _.-'_.-'|
2024-09-12 08:24:32 | `-._`-._ _.-'_.-' | http://redis.io
2024-09-12 08:24:32 `-._ `-._`-.__.-'_.-' _.-'
2024-09-12 08:24:32 |`-._`-._ `-.__.-' _.-'_.-'|
2024-09-12 08:24:32 | `-._`-._ _.-'_.-' |
2024-09-12 08:24:32 `-._ `-._`-.__.-'_.-' _.-'
2024-09-12 08:24:32 `-._ `-.__.-' _.-'
2024-09-12 08:24:32 `-._ _.-'
2024-09-12 08:24:32 `-.__.-'
2024-09-12 08:24:32
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.338 # Server initialized
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.338 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.339 * Loading RDB produced by version 6.0.6
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.339 * RDB age 37 seconds
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.339 * RDB memory usage when created 0.77 Mb
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.339 * DB loaded from disk: 0.000 seconds
2024-09-12 08:24:32 1:M 12 Sep 2024 05:24:32.339 * Ready to accept connections
Hi, when I start a container, api is not start and give me a error:
postgres log:
.env:
.dev.env
I try to set POSTGRES_HOST=0.0.0.0 and leave blank. I get same error
I used Windows Docker Desktop.
Could you help me?