Skip to content

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

Closed

Description

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:

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions