Problem running Jenkins as a system service on Ubuntu

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem running Jenkins as a system service on Ubuntu

gianpaolo
Hello
I've installed and run Jenkins successfully, but at the first reboot I coudnt get it up again.
I have the journal log:

 systemd[1]: Starting Jenkins - open source automation server...
jenkins[3540]: Correct java version found
jenkins[3540]:  * Starting Jenkins Automation Server jenkins
jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!
ci systemd[1]: jenkins.service: Main process exited, code=exited,   status=7/NOTRUNNING
systemd[1]: jenkins.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Jenkins - open source automation server.

I posted the question also on superuser



Can you help me?

Thanks
Gianpaolo

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Jenkins as a system service on Ubuntu

ravi krishna
Hello Gianaolo,

Hope you logged in with root user or Jenkins user must have sudo permissions. 

On Fri, Nov 8, 2019 at 5:55 PM gianpaolo <[hidden email]> wrote:
Hello
I've installed and run Jenkins successfully, but at the first reboot I coudnt get it up again.
I have the journal log:

 systemd[1]: Starting Jenkins - open source automation server...
jenkins[3540]: Correct java version found
jenkins[3540]:  * Starting Jenkins Automation Server jenkins
jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!
ci systemd[1]: jenkins.service: Main process exited, code=exited,   status=7/NOTRUNNING
systemd[1]: jenkins.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Jenkins - open source automation server.

I posted the question also on superuser



Can you help me?

Thanks
Gianpaolo

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com.


--

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/CAKS7Qv0yTRHQU2Mb4f3%3DqH8p_qxtLeCVKLdB3TQHzvyLcUfw-w%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Jenkins as a system service on Ubuntu

gianpaolo
Hi
it's a nightmare. I've tried all the possible solutions and reinstalled everything.

Is there a complete ubuntu instruction?
i have followed this:
https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu

Still, after the first reboot, I'm again not able to get it running.

On Friday, November 8, 2019 at 1:47:39 PM UTC+1, ravi krishna wrote:
Hello Gianaolo,

Hope you logged in with root user or Jenkins user must have sudo permissions. 

On Fri, Nov 8, 2019 at 5:55 PM gianpaolo <<a href="javascript:" target="_blank" gdf-obfuscated-mailto="cOqctumvAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">gianp...@...> wrote:
Hello
I've installed and run Jenkins successfully, but at the first reboot I coudnt get it up again.
I have the journal log:

 systemd[1]: Starting Jenkins - open source automation server...
jenkins[3540]: Correct java version found
jenkins[3540]:  * Starting Jenkins Automation Server jenkins
jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!
ci systemd[1]: jenkins.service: Main process exited, code=exited,   status=7/NOTRUNNING
systemd[1]: jenkins.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Jenkins - open source automation server.

I posted the question also on <a href="https://superuser.com/questions/1500215/error-running-jenkins-as-a-unix-service-on-ubuntu" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F1500215%2Ferror-running-jenkins-as-a-unix-service-on-ubuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEexb6_mxLQCncsvFELKdywZe42Lw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F1500215%2Ferror-running-jenkins-as-a-unix-service-on-ubuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEexb6_mxLQCncsvFELKdywZe42Lw&#39;;return true;">superuser



Can you help me?

Thanks
Gianpaolo

--
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 <a href="javascript:" target="_blank" gdf-obfuscated-mailto="cOqctumvAAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">jenkins...@googlegroups.com.
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com.


--
Ravi Krishna D 
<a href="http://sahaaya4needy.org" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya4needy.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1nQS4K4G75TE-DTfR50FV9UUzLA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya4needy.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1nQS4K4G75TE-DTfR50FV9UUzLA&#39;;return true;">http://sahaaya4needy.org
<a href="http://sahaaya.onsugar.com" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya.onsugar.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTsR_o2MhR1ZClCVUbtduE6c3k0w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya.onsugar.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTsR_o2MhR1ZClCVUbtduE6c3k0w&#39;;return true;">http://sahaaya.onsugar.com

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/87accf4f-3ba5-4811-9565-fcc23f5e9b4e%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Jenkins as a system service on Ubuntu

gianpaolo
ok
the only thing that I miss now is why at every reboot I have to run

sudo service jenkins start

the service is enabled, why does it need to be manually run every time?

On Friday, November 8, 2019 at 2:34:50 PM UTC+1, gianpaolo wrote:
Hi
it's a nightmare. I've tried all the possible solutions and reinstalled everything.

Is there a complete ubuntu instruction?
i have followed this:
<a href="https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FInstalling%2BJenkins%2Bon%2BUbuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEbgVZ7S1DXGILvLv-7ycAAJYtM_w&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fwiki.jenkins.io%2Fdisplay%2FJENKINS%2FInstalling%2BJenkins%2Bon%2BUbuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEbgVZ7S1DXGILvLv-7ycAAJYtM_w&#39;;return true;">https://wiki.jenkins.io/display/JENKINS/Installing+Jenkins+on+Ubuntu

Still, after the first reboot, I'm again not able to get it running.

On Friday, November 8, 2019 at 1:47:39 PM UTC+1, ravi krishna wrote:
Hello Gianaolo,

Hope you logged in with root user or Jenkins user must have sudo permissions. 

On Fri, Nov 8, 2019 at 5:55 PM gianpaolo <[hidden email]> wrote:
Hello
I've installed and run Jenkins successfully, but at the first reboot I coudnt get it up again.
I have the journal log:

 systemd[1]: Starting Jenkins - open source automation server...
jenkins[3540]: Correct java version found
jenkins[3540]:  * Starting Jenkins Automation Server jenkins
jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!
ci systemd[1]: jenkins.service: Main process exited, code=exited,   status=7/NOTRUNNING
systemd[1]: jenkins.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Jenkins - open source automation server.

I posted the question also on <a href="https://superuser.com/questions/1500215/error-running-jenkins-as-a-unix-service-on-ubuntu" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F1500215%2Ferror-running-jenkins-as-a-unix-service-on-ubuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEexb6_mxLQCncsvFELKdywZe42Lw&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fsuperuser.com%2Fquestions%2F1500215%2Ferror-running-jenkins-as-a-unix-service-on-ubuntu\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNEexb6_mxLQCncsvFELKdywZe42Lw&#39;;return true;">superuser



Can you help me?

Thanks
Gianpaolo

--
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 [hidden email].
To view this discussion on the web visit <a href="https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium=email&amp;utm_source=footer" rel="nofollow" target="_blank" onmousedown="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;" onclick="this.href=&#39;https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com?utm_medium\x3demail\x26utm_source\x3dfooter&#39;;return true;">https://groups.google.com/d/msgid/jenkinsci-users/5f886501-5849-45d5-873e-650c5102ce9b%40googlegroups.com.


--
Ravi Krishna D 
<a href="http://sahaaya4needy.org" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya4needy.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1nQS4K4G75TE-DTfR50FV9UUzLA&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya4needy.org\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNF1nQS4K4G75TE-DTfR50FV9UUzLA&#39;;return true;">http://sahaaya4needy.org
<a href="http://sahaaya.onsugar.com" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya.onsugar.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTsR_o2MhR1ZClCVUbtduE6c3k0w&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fsahaaya.onsugar.com\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGTsR_o2MhR1ZClCVUbtduE6c3k0w&#39;;return true;">http://sahaaya.onsugar.com

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/e4d09846-92ab-4904-a899-c478cc863ae8%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Jenkins as a system service on Ubuntu

Dirk Heinrichs-3
In reply to this post by gianpaolo
Am Freitag, den 08.11.2019, 01:46 -0800 schrieb gianpaolo:

jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!

Looks like a problem with your PAM setup. Can you login as root and then "su - jenkins" from the shell?

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/11791bfc0af9d94ee16c86ef74b3e7ad0f6c21c1.camel%40opentext.com.
Reply | Threaded
Open this post in threaded view
|

Re: Problem running Jenkins as a system service on Ubuntu

gianpaolo
Hi Dirk
I re-installed everything. It seems a little bit better. Service comes up and comes down immediately.
Related to pam session as you suggested?

ov 08 15:32:35 ci systemd[1]: Started Jenkins - open source automation server.
Nov 08 15:32:36 ci jenkins[2637]: Correct java version found
Nov 08 15:32:36 ci jenkins[2637]:  * Starting Jenkins Automation Server jenkins
Nov 08 15:32:36 ci su[2678]: Successful su for jenkins by root
Nov 08 15:32:36 ci su[2678]: + ??? root:jenkins
Nov 08 15:32:36 ci su[2678]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Nov 08 15:32:36 ci su[2678]: pam_unix(su:session): session closed for user jenkins
Nov 08 15:32:37 ci jenkins[2637]:    ...done.
Nov 08 15:32:37 ci jenkins[2711]: Correct java version found
Nov 08 15:32:37 ci jenkins[2711]:  * Stopping Jenkins Automation Server jenkins
Nov 08 15:32:38 ci jenkins[2711]:    ...done.
root@ci:~# su - jenkins
jenkins@ci:~$ 


On Friday, November 8, 2019 at 3:25:36 PM UTC+1, Dirk Heinrichs wrote:
Am Freitag, den 08.11.2019, 01:46 -0800 schrieb gianpaolo:

jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!

Looks like a problem with your PAM setup. Can you login as root and then "su - jenkins" from the shell?

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Email: <a href="javascript:" target="_blank" gdf-obfuscated-mailto="qK5qIUK1AAAJ" rel="nofollow" onmousedown="this.href=&#39;javascript:&#39;;return true;" onclick="this.href=&#39;javascript:&#39;;return true;">dhei...@...
Website: <a href="http://www.recommind.de" target="_blank" rel="nofollow" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.recommind.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAI0xqX2_aTOJli63C7-WL52SKuQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.recommind.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAI0xqX2_aTOJli63C7-WL52SKuQ&#39;;return true;">www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/b27a98ee-2f6f-4330-bfcd-73be780b6689%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

(SOLVED) Re: Problem running Jenkins as a system service on Ubuntu

gianpaolo
YES!

In case someone runs into the same issue, here the jenkins.service that solved my problem

[Unit]
Description=Jenkins - open source automation server

[Service]
ExecStart=/etc/init.d/jenkins start
ExecStop=/etc/init.d/jenkins stop
GuessMainPID=no
IgnoreSIGPIPE=no
KillMode=process
LimitNOFILE=64000
LimitNPROC=64000
ProtectHome=true
ProtectSystem=full
RemainAfterExit=yes
TimeoutSec=5min
Type=oneshot

[Install]
WantedBy=multi-user.target

KillExcludeUsers=root jenkins



based on this post


The issue seems to be that systemd kills the user processes when starting jenkins with systemctl.
I wrote a jenkins .service file and added the Jenkins user to KillExcludeUsers in /etc/systemd/logind.conf; https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35


What a nightmare. Never had so much issue installing something on unix.
I'm just a developer but fortunately I love unix enough to not give up ^__^

Ciao!

On Friday, November 8, 2019 at 3:37:35 PM UTC+1, gianpaolo wrote:
Hi Dirk
I re-installed everything. It seems a little bit better. Service comes up and comes down immediately.
Related to pam session as you suggested?

ov 08 15:32:35 ci systemd[1]: Started Jenkins - open source automation server.
Nov 08 15:32:36 ci jenkins[2637]: Correct java version found
Nov 08 15:32:36 ci jenkins[2637]:  * Starting Jenkins Automation Server jenkins
Nov 08 15:32:36 ci su[2678]: Successful su for jenkins by root
Nov 08 15:32:36 ci su[2678]: + ??? root:jenkins
Nov 08 15:32:36 ci su[2678]: pam_unix(su:session): session opened for user jenkins by (uid=0)
Nov 08 15:32:36 ci su[2678]: pam_unix(su:session): session closed for user jenkins
Nov 08 15:32:37 ci jenkins[2637]:    ...done.
Nov 08 15:32:37 ci jenkins[2711]: Correct java version found
Nov 08 15:32:37 ci jenkins[2711]:  * Stopping Jenkins Automation Server jenkins
Nov 08 15:32:38 ci jenkins[2711]:    ...done.
root@ci:~# su - jenkins
jenkins@ci:~$ 


On Friday, November 8, 2019 at 3:25:36 PM UTC+1, Dirk Heinrichs wrote:
Am Freitag, den 08.11.2019, 01:46 -0800 schrieb gianpaolo:

jenkins[3540]: chown: changing ownership of '/var/run/jenkins':    Operation not permitted
su[3580]: PAM audit_log_acct_message() failed: Operation not permitted
su[3580]: pam_authenticate: System error
jenkins[3540]: su: System error
su[3580]: FAILED su for jenkins by root
su[3580]: - ??? root:jenkins
jenkins[3540]:    ...fail!

Looks like a problem with your PAM setup. Can you login as root and then "su - jenkins" from the shell?

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Website: <a href="http://www.recommind.de" rel="nofollow" target="_blank" onmousedown="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.recommind.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAI0xqX2_aTOJli63C7-WL52SKuQ&#39;;return true;" onclick="this.href=&#39;http://www.google.com/url?q\x3dhttp%3A%2F%2Fwww.recommind.de\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGAI0xqX2_aTOJli63C7-WL52SKuQ&#39;;return true;">www.recommind.de
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/be415354-c3df-4e6b-b77a-4727b37d91e2%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: (SOLVED) Re: Problem running Jenkins as a system service on Ubuntu

Dirk Heinrichs-3
Am Freitag, den 08.11.2019, 06:53 -0800 schrieb gianpaolo:

The issue seems to be that systemd kills the user processes when starting jenkins with systemctl.
I wrote a jenkins .service file and added the Jenkins user to KillExcludeUsers in /etc/systemd/logind.conf; https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35

Strange. I am running Jenkins on several Debian and Ubuntu machines and have never seen such behaviour.

BTW: You should not modify the service file provided by the package. It's better to create an overlay file (/etc/systemd/system/jenkins.service.d/local.conf) which contains your modifications to avoid having them removed when the package is updated.

Bye...

Dirk
-- 
Dirk Heinrichs
Senior Systems Engineer, Delivery Pipeline
OpenText ™ Discovery | Recommind
Phone: +49 2226 15966 18
Recommind GmbH, Von-Liebig-Straße 1, 53359 Rheinbach
Vertretungsberechtigte Geschäftsführer Gordon Davies, Madhu Ranganathan, Christian Waida, Registergericht Amtsgericht Bonn, Registernummer HRB 10646
This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden
Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und vernichten Sie diese Mail. Das unerlaubte Kopieren sowie die unbefugte Weitergabe dieser Mail sind nicht gestattet.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/f9268a75c46bf68615dc69f7cf734ce895986a49.camel%40opentext.com.
Reply | Threaded
Open this post in threaded view
|

Re: (SOLVED) Re: Problem running Jenkins as a system service on Ubuntu

gianpaolo


On Friday, November 8, 2019 at 4:01:28 PM UTC+1, Dirk Heinrichs wrote:
Am Freitag, den 08.11.2019, 06:53 -0800 schrieb gianpaolo:

The issue seems to be that systemd kills the user processes when starting jenkins with systemctl.
I wrote a jenkins .service file and added the Jenkins user to KillExcludeUsers in /etc/systemd/logind.conf; <a rel="nofollow" href="https://urldefense.proofpoint.com/v2/url?u=https-3A__gist.github.com_konstruktoid_1bc96c4f5030f37bd5f5142cc2718b35&amp;d=DwMFaQ&amp;c=ZgVRmm3mf2P1-XDAyDsu4A&amp;r=TsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI&amp;m=1_8P0BZtOaS0LjGyPOVPmqqvL3_FZ9lTmgb0m6A30mA&amp;s=spaOkHykoZJ1JKRn8vFyAlEwb0AjJHchUSBeCpCURWY&amp;e=" target="_blank" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__gist.github.com_konstruktoid_1bc96c4f5030f37bd5f5142cc2718b35%26d%3DDwMFaQ%26c%3DZgVRmm3mf2P1-XDAyDsu4A%26r%3DTsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI%26m%3D1_8P0BZtOaS0LjGyPOVPmqqvL3_FZ9lTmgb0m6A30mA%26s%3DspaOkHykoZJ1JKRn8vFyAlEwb0AjJHchUSBeCpCURWY%26e%3D\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGX6oaAiE-6Q1Q8rXZ9_9AgmI3WWg&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Furldefense.proofpoint.com%2Fv2%2Furl%3Fu%3Dhttps-3A__gist.github.com_konstruktoid_1bc96c4f5030f37bd5f5142cc2718b35%26d%3DDwMFaQ%26c%3DZgVRmm3mf2P1-XDAyDsu4A%26r%3DTsKycyisPP_6FVCeETRooIdY_8hdAsXoxwbvHso_TaI%26m%3D1_8P0BZtOaS0LjGyPOVPmqqvL3_FZ9lTmgb0m6A30mA%26s%3DspaOkHykoZJ1JKRn8vFyAlEwb0AjJHchUSBeCpCURWY%26e%3D\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGX6oaAiE-6Q1Q8rXZ9_9AgmI3WWg&#39;;return true;"> <a href="https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35" target="_blank" rel="nofollow" onmousedown="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fkonstruktoid%2F1bc96c4f5030f37bd5f5142cc2718b35\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKK6bdpJx_MhncuuaUR6eTIPjzyA&#39;;return true;" onclick="this.href=&#39;https://www.google.com/url?q\x3dhttps%3A%2F%2Fgist.github.com%2Fkonstruktoid%2F1bc96c4f5030f37bd5f5142cc2718b35\x26sa\x3dD\x26sntz\x3d1\x26usg\x3dAFQjCNGKK6bdpJx_MhncuuaUR6eTIPjzyA&#39;;return true;">https://gist.github.com/konstruktoid/1bc96c4f5030f37bd5f5142cc2718b35

Strange. I am running Jenkins on several Debian and Ubuntu machines and have never seen such behaviour.

BTW: You should not modify the service file provided by the package. It's better to create an overlay file (/etc/systemd/system/jenkins.service.d/local.conf) which contains your modifications to avoid having them removed when the package is updated.

Bye...

 
Thank you very much! I didn't know about the overlay file.

--
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 [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/08cf9397-b76f-4696-87e2-02b251e17171%40googlegroups.com.