I'm following the instructions here, using 'docker run'.
I came up with the following. The container starts, and then stops. What am I missing? For that matter, systemctl status shows me the tail of a log; where is the rest of that log?
[Unit]
Description=Jenkins
Requires=docker.service
After=docker.service
[Service]
Restart=always
ExecStart=/usr/bin/docker run -d -p 49001:8080 -v /var/jenkins_home:/var/jenkins_home -t jenkins
ExecStop=/usr/bin/docker stop -t 2 jenkins
#ExecStopPost=/usr/bin/docker rm -rf jenkins
[Install]
WantedBy=default.target
I managed to get more useful data from status. But I'm puzzled: I can copy and paste the ExecStart command line and it works, but systemctl reports that exit status.
docker-jenkins.service - Jenkins
Loaded: loaded (/etc/systemd/system/docker-jenkins.service; disabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Wed 2016-10-26 08:45:58 EDT; 4s ago
Process: 23529 ExecStopPost=/usr/bin/docker rm -f jenkins_server (code=exited, status=1/FAILURE)
Process: 23521 ExecStop=/usr/bin/docker stop -t 2 jenkins_server (code=exited, status=1/FAILURE)
Process: 23516 ExecStart=/usr/bin/docker run -d -p 49001:8080 -v /var/jenkins_home:/var/jenkins_home --env JAVA_OPTS="-Djavax.net.ssl.trustStore=/var/jenkins_home/.keystore/cacerts -Djavax.net.ssl.trustStorePassword=changeit" --name jenkins_server jenkins (code=exited, status=125)
Main PID: 23516 (code=exited, status=125)
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Unit docker-jenkins.service entered failed state.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service failed.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service holdoff time over, scheduling restart.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: start request repeated too quickly for docker-jenkins.service
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Failed to start Jenkins.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: Unit docker-jenkins.service entered failed state.
Oct 26 08:45:58 cnode10.basistech.net systemd[1]: docker-jenkins.service failed.
0 Answers