Lord-Y
January 3, 2022, 5:40pm
1
Hello guys,
In my build https://app.circleci.com/pipelines/github/Lord-Y/versions/14/workflows/23da7eba-adeb-4d80-b897-370884f4da1b/jobs/21 I’m having my postgresql and redis containers step cancelled for no obvious reasons.
I google and tried circleci image or postgre image but nothing works.
Do you guys have any clue on what’s going on?
Thx.
Hi this is normal. Additional service containers are cancelled at the end of the job, whether the job passes or fails.
Lord-Y
January 4, 2022, 10:47am
3
@bytesguy thx for your reply but I don’t think that’s something normal. Look at my full job: https://app.circleci.com/pipelines/github/Lord-Y/versions/17/workflows/3e179759-9954-45a7-bea0-954fdb6a1d13/jobs/27
The init DB step is failing because it cannot connect to the postgresql DB.
I tried to add sleep(10s or 2min or more) in the init DB step but the postgres step is cancelled no matter what.
The command in your step is failing, which ends the job and then the secondary containers get cancelled.
pgrep
will not work as Postgres is running in a separate container, not as a process in the main container.
Lord-Y
January 4, 2022, 7:06pm
5
Closing this. My sleep wasn’t long enough after the command go run main.go &
. This command took like 25s to start .
Sorry for the inconvenience.
1 Like
Thanks for posting an update!
system
Closed
January 14, 2022, 7:08pm
7
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.