Docker container stops on a Jenkins restart?

402 views
Skip to first unread message

zil...@gmail.com

unread,
Jan 1, 2023, 1:21:23 PM1/1/23
to Jenkins Users

I used to not have this issue with the older Jenkins version that this installation replaced.

I updated to Jenkins v2.346.3 and I start it as a Docker container like this

$ docker run --rm -d -p 8080:8080 -v /mnt/jenkins_master/jenkins_home:/var/jenkins_home --name jenkins_master --memory=24g 1234567890.dkr.ecr.eu-north-1.amazonaws.com/jenkins_master:2.346.3

Now when I got to my browser to restart Jenkins

myJenkins.domain.com/restart

the container dies? Why, and how do I prevent this? I don't see any logs indicating why.

TIA, Chris

Christoph Schulz

unread,
Jan 1, 2023, 1:30:18 PM1/1/23
to jenkins...@googlegroups.com

On Sun, 2023-01-01 at 10:21 -0800, zil...@gmail.com wrote:
> I used to not have this issue with the older Jenkins version that
> this installation replaced.

Do you know the old version? That would make investigation easier. :)

> I updated to Jenkins v2.346.3 and I start it as a Docker container
> like this
> $ docker run --rm -d -p 8080:8080 -v
> /mnt/jenkins_master/jenkins_home:/var/jenkins_home --name
> jenkins_master --memory=24g 1234567890.dkr.ecr.eu-north-
> 1.amazonaws.com/jenkins_master:2.346.3
> Now when I got to my browser to restart Jenkins
> myJenkins.domain.com/restart
> the container dies? Why, and how do I prevent this? I don't see any
> logs indicating why.
> TIA, Chris
> --
> You received this message because you are subscribed to the Google
> Groups "Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to jenkinsci-use...@googlegroups.com.
> To view this discussion on the web visit
>  https://groups.google.com/d/msgid/jenkinsci-users/33260ab5-f104-
> 4d58-9171-e4a11a93de89n%40googlegroups.com
> .




Mark Waite

unread,
Jan 1, 2023, 2:23:32 PM1/1/23
to Jenkins Users
https://www.jenkins.io/blog/2022/05/27/docker-image-new-lifecycle/ says that beginning with Jenkins 2.332.3 the docker container lifecycle has changed.

add the flag --restart=on-failure to the docker run <…​> jenkins/jenkins command

zil...@gmail.com

unread,
Jan 1, 2023, 10:43:52 PM1/1/23
to Jenkins Users
Thanks Mark!

Chris

Reply all
Reply to author
Forward
0 new messages