Build was canceled with docker

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 :wave: this is normal. Additional service containers are cancelled at the end of the job, whether the job passes or fails.

@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.

Closing this. My sleep wasn’t long enough after the command go run main.go &. This command took like 25s to start :pensive::pensive:.

Sorry for the inconvenience.

1 Like

Thanks for posting an update!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.