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

postgres service never starts up #363

Open
dcaban-dgdeanwork opened this issue Mar 17, 2020 · 1 comment
Open

postgres service never starts up #363

dcaban-dgdeanwork opened this issue Mar 17, 2020 · 1 comment

Comments

@dcaban-dgdeanwork
Copy link

I followed the instructions in the README and running make up results in the following error:

docker-compose -f docker-compose.dev.yml -p dev build web
Building web
Step 1/7 : FROM crystalnix/omaha-server-base:alpine
 ---> e4988a4d885b
Step 2/7 : RUN pipenv install --system --dev
 ---> Using cache
 ---> f7a58cec9ff0
Step 3/7 : ADD . $omaha
 ---> Using cache
 ---> d89837968971
Step 4/7 : RUN   mkdir /etc/nginx/sites-enabled/ &&   rm /etc/filebeat/filebeat.yml &&   rm /etc/nginx/conf.d/default.conf &&   rm /etc/nginx/nginx.conf &&   rm /etc/supervisord.conf &&   ln -s /srv/omaha/conf/nginx.conf /etc/nginx/ &&   ln -s /srv/omaha/conf/nginx-app.conf /etc/nginx/sites-enabled/ &&   ln -s /srv/omaha/conf/inflate_request.lua /var/lib/nginx &&   ln -s /srv/omaha/conf/supervisord.conf /etc/ &&   ln -s /srv/omaha/conf/filebeat.yml /etc/filebeat/ &&   chmod go-w /etc/filebeat/filebeat.yml
 ---> Using cache
 ---> 1021e15c370d
Step 5/7 : EXPOSE 80
 ---> Using cache
 ---> a40ac7fc5dc5
Step 6/7 : EXPOSE 8080
 ---> Using cache
 ---> c6d4c39ebd3c
Step 7/7 : CMD ["paver", "docker_run"]
 ---> Using cache
 ---> 7acdd58922c4
Successfully built 7acdd58922c4
Successfully tagged dev_web:latest
pipenv run paver up_local_dev_server
---> pavement.up_local_dev_server
docker-compose -f docker-compose.dev.yml -p dev up -d db
Starting dev_db_1 ... done
docker-compose -f docker-compose.dev.yml -p dev up -d web
Removing dev_web_1
Starting dev_db_1 ... 
Starting dev_db_1 ... done
Recreating 3026da679392_dev_web_1 ... error

ERROR: for 3026da679392_dev_web_1  Cannot start service web: Cannot link to a non running container: /dev_db_1 AS /dev_web_1/db

ERROR: for web  Cannot start service web: Cannot link to a non running container: /dev_db_1 AS /dev_web_1/db
ERROR: Encountered errors while bringing up the project.


Captured Task Output:
---------------------

---> pavement.up_local_dev_server
docker-compose -f docker-compose.dev.yml -p dev up -d db
docker-compose -f docker-compose.dev.yml -p dev up -d web

Build failed running pavement.up_local_dev_server: Subprocess return code: 1
Makefile:46: recipe for target 'up' failed
make: *** [up] Error 1

I also tried running make ps to see what was going on and it appears the db service closes as soon as it begins. I'm just trying to setup a local dev server to test this out.

Any ideas?

@transilience
Copy link

@dcaban-dgdeanwork we also faced the same issue while trying to setup our server.

it turned out that the postgress fails if password is not set
This is the new docker-compose.common.yml

db:
  image: postgres:9.4
  environment:
    POSTGRES_HOST_AUTH_METHOD: trust

redis:
  image: redis:3

web:
  image: crystalnix/omaha-server:dev
  privileged: true
  ports:
    - "9090:80"
  environment:
    DB_HOST: db
    DB_PORT: 5432
    DB_USER: postgres
    DB_NAME: postgres
    DB_PASSWORD: ''
    HOST_NAME: '*'
    SECRET_KEY: 'SECRET_KEY'
    DJANGO_SETTINGS_MODULE: 'omaha_server.settings'
    AWS_ACCESS_KEY_ID: 'AWS_ACCESS_KEY_ID'
    AWS_SECRET_ACCESS_KEY: 'AWS_SECRET_ACCESS_KEY'
    AWS_STORAGE_BUCKET_NAME: 'AWS_STORAGE_BUCKET_NAME'
    REDIS_HOST: redis
    REDIS_PORT: 6379
    OMAHA_SERVER_PRIVATE: 'True'
    AWS_ROLE: 'omaha-private'
    DB_PUBLIC_USER: 'omaha_public'
    DB_PUBLIC_PASSWORD: 'omaha_public_password'
    UWSGI_PROCESSES: 10
    UWSGI_THREADS: 8
    FILEBEAT_HOST: 'localhost'
    FILEBEAT_PORT: '9021'
    ELK_HOST: ''
    ELK_PORT: ''
    FILEBEAT_DESTINATION: ''

then

sudo docker-compose up

starts the server

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

2 participants