Skip to content
This repository has been archived by the owner on Dec 22, 2023. It is now read-only.

Docker-compose up fails on first time #145

Closed
2 tasks
rickmak opened this issue Sep 27, 2016 · 2 comments
Closed
2 tasks

Docker-compose up fails on first time #145

rickmak opened this issue Sep 27, 2016 · 2 comments
Assignees

Comments

@rickmak
Copy link
Member

rickmak commented Sep 27, 2016

(user) got a problem when I run docker-compose -f docker-compose.yml up of skygear-server first time

p_1    | time="2016-09-26T04:17:23Z" level=error msg="Unable to begin transaction for schema migration: dial tcp 172.18.0.3:5432: getsockopt: connection refused" logger=skydb
app_1    | time="2016-09-26T04:17:23Z" level=error msg="Failed to start skygear: failed to open connection: skydb/pq: unable to connect to database because of a network error = dial tcp 172.18.0.3:5432: getsockopt: connection refused"
  • Skygear Server Date/Version: 0.17.1
  • Application Platform:
  • Is this a regression?
  • Attached logs, screenshots

Expected Results

First run will work.

Actual Results

Second run will work.

Steps to reproduce

  1. Checkout skygear-server
  2. docker-compose -f docker-compose.yml up
@cheungpat
Copy link
Contributor

This is not a regression.

@cheungpat
Copy link
Contributor

There are a couple of solutions to this problem:

  • change the docker image so that skygear-server will restart on fails
  • introduce a delay before skygear-server is run
  • skygear-server wait for longer before giving up

pick one

rickmak added a commit to rickmak/skygear-server that referenced this issue Sep 27, 2016
It will solve the first time init fails. The skygear-server will restart until
it works and user will see it up and running after the DB is finished init.

connect SkygearIO#145
@rickmak rickmak self-assigned this Sep 27, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants