Closed esivalenka closed 7 years ago
tried docker-compose route. nothing happens after docker-compose up -d command is run.
Can you help?
try running this right after docker run.
docker exec -it chabot-node-1 python /app-container/setup.py
it'll do some initial setup like creating default intents and log folder ( which is the issue in your case). Or you can manually create the "logs" folder in the cloned directory
docker-compose up -d
this will run containers in the background.
try docker-compose ps
after this. Navigate to http://localhost:8001
docker run --name=chabot-node-1 -e="APPLICATION_ENV=Production" -v ./:/app-container -p 8001:8080 -it ai-chat-bot gunicorn --bind 0.0.0.0:8080 run:app
[2017-08-01 16:39:05 +0000] [1] [INFO] Starting gunicorn 19.7.1 [2017-08-01 16:39:05 +0000] [1] [INFO] Listening at: http://0.0.0.0:8080 (1) [2017-08-01 16:39:05 +0000] [1] [INFO] Using worker: sync [2017-08-01 16:39:05 +0000] [8] [INFO] Booting worker with pid: 8 [2017-08-01 16:39:13 +0000] [8] [ERROR] Exception in worker process Traceback (most recent call last): File "/usr/local/lib/python2.7/site-packages/gunicorn/arbiter.py", line 578, in spawn_worker worker.init_process() File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 126, in init_process self.load_wsgi() File "/usr/local/lib/python2.7/site-packages/gunicorn/workers/base.py", line 135, in load_wsgi self.wsgi = self.app.wsgi() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/base.py", line 67, in wsgi self.callable = self.load() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 65, in load return self.load_wsgiapp() File "/usr/local/lib/python2.7/site-packages/gunicorn/app/wsgiapp.py", line 52, in load_wsgiapp return util.import_app(self.app_uri) File "/usr/local/lib/python2.7/site-packages/gunicorn/util.py", line 352, in import_app import(module) File "/usr/src/app/run.py", line 3, in
from app import app
File "/usr/src/app/app/init.py", line 24, in
from app.endpoint.controllers import endpoint as endpoint
File "/usr/src/app/app/endpoint/controllers.py", line 12, in
from app.commons.logger import logger
File "/usr/src/app/app/commons/logger.py", line 13, in
file_handler = logging.handlers.TimedRotatingFileHandler(filename = logFilePath, when = 'midnight', backupCount = 30)
File "/usr/local/lib/python2.7/logging/handlers.py", line 171, in init
BaseRotatingHandler.init(self, filename, 'a', encoding, delay)
File "/usr/local/lib/python2.7/logging/handlers.py", line 64, in init
logging.FileHandler.init(self, filename, mode, encoding, delay)
File "/usr/local/lib/python2.7/logging/init.py", line 913, in init
StreamHandler.init(self, self._open())
File "/usr/local/lib/python2.7/logging/init.py", line 943, in _open
stream = open(self.baseFilename, self.mode)
IOError: [Errno 2] No such file or directory: '/usr/src/app/logs/query-log.json'
[2017-08-01 16:39:13 +0000] [8] [INFO] Worker exiting (pid: 8)
[2017-08-01 16:39:14 +0000] [1] [INFO] Shutting down: Master
[2017-08-01 16:39:14 +0000] [1] [INFO] Reason: Worker failed to boot.