Skip to content

Github Actions services not reachable #26114

Answered by dakale
juulSme asked this question in Actions
Discussion options

You must be logged in to vote

One possibility is that the postgres service is not fully started by the time your steps try to access it (I’ve seen this issue for mysql, postgres, etc)

You can try adding a healthcheck via options (or in the Dockerfile, if you were building your own service container). The actions runner will respect the health status of the services before finalizing the “Initialize containers” step:

services:
postgress:
  image: postgres:11
   options: >-
    --health-cmd pg_isready
     --health-interval 10s
     --health-timeout 5s
     --health-retries 5

Sorry if the formatting got messed up via pasting here, and hope that helps

Replies: 9 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@FengJi2021
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants