Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

integration with systemd - systemctl stop produces exit code 143 #485

Closed
mdeguzis opened this issue May 2, 2017 · 3 comments
Closed

integration with systemd - systemctl stop produces exit code 143 #485

mdeguzis opened this issue May 2, 2017 · 3 comments

Comments

@mdeguzis
Copy link

mdeguzis commented May 2, 2017

Issues and Contributing

Docker commands that you execute

# start
/usr/bin/docker run -d --user 1000 --privileged  --volume /home/jenkins:/var/jenkins_home --publish 443:8443 jenkins --httpPort=-1 --httpsPort=8443 --httpsKeyStore=/var/jenkins_home/.keystore/jenkins_keystore.jks  --httpsKeyStorePassword="$KEYSTORE_PASSWORD"

# test start stop
/usr/bin/docker start -a jenkins_server
/usr/bin/docker stop -t 5 jenkins_server 

# Test with systemd
systemctl start jenkins-container && systemctl status jenkins-container 
...
Loaded: loaded (/etc/systemd/system/jenkins-container.service; enabled; vendor preset: disabled)
Active: active (running) since Tue 2017-05-02 13:23:57 EDT; 5min ago

systemctl stop jenkins-container && systemctl status jenkins-container 
...
Loaded: loaded (/etc/systemd/system/jenkins-container.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Tue 2017-05-02 13:31:31 EDT; 2s ago

Actual result

Failed status from bad exit code 143

Expected outcome

Exit code 0 from /usr/bin/docker stop -t 5 jenkins_server

Have you tried a non-dockerized Jenkins and get the expected outcome?

Not applicable in our environment at the moment.

Output of docker version

Docker version 1.12.6, build 3a094bd/1.12.6

Other relevant information

I can avoid this with:

SuccessExitStatus=143

However, that is not optimal.

Docs referenced:

@carlossg
Copy link
Contributor

as it is mentioned in docker-library/tomcat#57 (comment)

docker stop does exactly as the documentation states:

... a SIGTERM is sent to the main proces. ...

maybe tini config can be modified to handle that

@Lewiscowles1986
Copy link

This seems to be that the folder mounted was not created prior to initialising docker or that the user does not have permissions to the volume folder causing docker to crash.

try docker logs {container}

@carlossg
Copy link
Contributor

no answer, closing

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

No branches or pull requests

3 participants