# Not able to start Jenkins in linux

**URL:** <https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543>\
**Category:** Ask a question\
**Tags:** question\
**Created:** [January 31, 2023, 7:32pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543 "2023-01-31T19:32:51Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [January 31, 2023, 7:32pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/1 "2023-01-31T19:32:51Z")

</div>

HI Team

Getting below error when we start the Jenkins.service

Jenkins.service is updated to auto start when server reboots, so after server reboot, not able to start the service, keep getting error msg.

```auto
udo systemctl start jenkins.service 

Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
[user@server opt]$ sudo journalctl -xe
Jan 31 08:46:56 server jenkins[13231]: at winstone.Launcher.main(Launcher.java:405)
Jan 31 08:46:56 server jenkins[13231]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jan 31 08:46:56 server jenkins[13231]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:6
Jan 31 08:46:56 server jenkins[13231]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
Jan 31 08:46:56 server jenkins[13231]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Jan 31 08:46:56 server jenkins[13231]: at executable.Main._main(Main.java:334)
Jan 31 08:46:56 server jenkins[13231]: at executable.Main.main(Main.java:116)
Jan 31 08:46:58 server systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Jan 31 08:46:58 server systemd[1]: Failed to start LSB: Jenkins Automation Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has failed.

```

journalctl -xe logs

```auto
Jan 30 19:12:54 server jenkins[30877]: 2023-01-31 01:12:54.340+0000 [id=1] SEVERE winstone.Logger#logInternal: Container startup failed
Jan 30 19:12:54 server jenkins[30877]: winstone.WinstoneException: Please set --httpsKeyStore
Jan 30 19:12:54 server jenkins[30877]: at winstone.AbstractSecuredConnectorFactory.configureSsl(AbstractSecuredConnectorFactory.java:88)
Jan 30 19:12:54 server jenkins[30877]: at winstone.HttpsConnectorFactory.start(HttpsConnectorFactory.java:54)
Jan 30 19:12:54 server jenkins[30877]: at winstone.Launcher.spawnListener(Launcher.java:255)
Jan 30 19:12:54 server jenkins[30877]: Caused: java.io.IOException: Failed to start a listener: winstone.HttpsConnectorFactory
Jan 30 19:12:54 server jenkins[30877]: at winstone.Launcher.spawnListener(Launcher.java:261)
Jan 30 19:12:54 server jenkins[30877]: at winstone.Launcher.<init>(Launcher.java:190)
Jan 30 19:12:54 server jenkins[30877]: at winstone.Launcher.main(Launcher.java:405)
Jan 30 19:12:54 server jenkins[30877]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Jan 30 19:12:54 server jenkins[30877]: at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
Jan 30 19:12:54 server jenkins[30877]: at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jan 30 19:12:54 server jenkins[30877]: at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Jan 30 19:12:54 server jenkins[30877]: at executable.Main._main(Main.java:334)
Jan 30 19:12:54 server jenkins[30877]: at executable.Main.main(Main.java:116)
Jan 30 19:12:55 server sudo[30606]: pam_unix(sudo:session): session closed for user root
Jan 30 19:12:56 server systemd[1]: jenkins.service: main process exited, code=exited, status=1/FAILURE
Jan 30 19:12:56 server systemd[1]: Failed to start LSB: Jenkins Automation Server.
-- Subject: Unit jenkins.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit jenkins.service has failed.
-- 
-- The result is failed.
Jan 30 19:12:56 server systemd[1]: Unit jenkins.service entered failed state.
Jan 30 19:12:56 server systemd[1]: jenkins.service failed.
Jan 30 19:12:56 server systemd[1]: jenkins.service holdoff time over, scheduling restart.

```

Thanks and appreciate any help on this.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [January 31, 2023, 7:41pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/2 "2023-01-31T19:41:37Z")

</div>

> [@devops1](#):
>
> `winstone.WinstoneException: Please set --httpsKeyStore`

That likely means that you are either passing arguments that are no longer supported or you are not passing the correct arguments. That output likely hints that you’re trying to use Jenkins to provide https end point termination but haven’t provided the correct arguments to do it.

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [January 31, 2023, 7:49pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/3 "2023-01-31T19:49:37Z")

</div>

Here is the Jenkins.service file

```auto
cat jenkins.service
# Automatically generated by systemd-sysv-generator

[Unit]
Documentation=man:systemd-sysv-generator(8)
SourcePath=/etc/rc.d/init.d/jenkins
Description=LSB: Jenkins Automation Server
Requires=network.target
After=network.target
After=multi-user.target

[Service]
Type=notify
NotifyAccess=main
#ExecStart=/usr/bin/jenkins --webroot=/var/cache/jenkins/war --httpsPort=8443
Restart=on-failure
SuccessExitStatus=143

#Restart=no
#TimeoutSec=15min
#IgnoreSIGPIPE=no
#KillMode=process
#GuessMainPID=no
#RemainAfterExit=yes
#ExecStart=/etc/rc.d/init.d/jenkins start
ExecStart=/usr/bin/java -jar /usr/lib/jenkins/jenkins.war --webroot=/var/cache/jenkins/war --httpPort=8081 --ajp13Port=-1
ExecStop=/etc/rc.d/init.d/jenkins stop
ExecReload=/etc/rc.d/init.d/jenkins reload
PIDFILE=/var/run/jenkins.pid
#Environment="JENKINS_HOME=/var/lib/jenkins"
Environment="JAVA_OPTS=-Djava.awt.headless=true"
#Environment="JAVA_HOME=/etc/alternatives/java"

#User=jenkins

[Install]
WantedBy=multi-user.target

```

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [January 31, 2023, 7:51pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/4 "2023-01-31T19:51:28Z")

</div>

Thank you Mark  
yes, we have setup httpskeystore file location in config file, sorry that error was before that.  
we don’t see that error now.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [January 31, 2023, 8:02pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/5 "2023-01-31T20:02:02Z")

</div>

> [@devops1](#):
>
> `SourcePath=/etc/rc.d/init.d/jenkins`

The configuration is incorrect. You’re using a configuration that uses System V init to control the Jenkins service, when Jenkins has switched to use systemd to control the Jenkins service. Be sure that when you upgrade Jenkins, you use the same package manager to perform the upgrade as you used to perform the original installation.

Jenkins 2.332.1 switched Jenkins from using System V init to use systemd with its Linux package installers for Debian, Ubuntu, Red Hat, Alma, openSUSE, Rocky, and more. The [LTS Upgrade Guide](https://www.jenkins.io/doc/upgrade-guide/2.332/#upgrading-to-jenkins-lts-2-332-1) describes that transition and how to adapt your environment to the transition.

> **[Upgrading to Jenkins LTS 2.332.x](https://www.jenkins.io/doc/upgrade-guide/2.332/#upgrading-to-jenkins-lts-2-332-1)**
>
> Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

There is a [blog post](https://www.jenkins.io/blog/2022/03/25/systemd-migration/) about it as well at

> **[Linux installation packages migrated from System V init to systemd](https://www.jenkins.io/blog/2022/03/25/systemd-migration/)**
>
> Starting with Jenkins 2.335, the Jenkins project is migrating from System V init to systemd.

There is also a [video introduction](https://www.youtube.com/watch?v=MkokjTQ2ngc) for RPM based distributions like Red Hat Enterprise Linux, Alma Linux, Rocky Linux, Oracle Linux, and Amazon Linux.

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/5/5d731f86134683079a41351908d8832c01e0a6f4.jpeg "🔴 Managing the Jenkins systemd Service on CentOS 7.9") ](https://www.youtube.com/watch?v=MkokjTQ2ngc)

There is also a [video introduction](https://www.youtube.com/watch?v=pwR9TPW2oG4) for deb based distributions like Debian and Ubuntu

[![](https://europe1.discourse-cdn.com/flex013/uploads/jenkins/original/2X/0/04a2972bcb9f7e4756fdc406b9992a75a8f47ed2.jpeg "🔴 Managing the Jenkins systemd Service on Ubuntu 20.04") ](https://www.youtube.com/watch?v=pwR9TPW2oG4)

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [January 31, 2023, 8:33pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/6 "2023-01-31T20:33:30Z")

</div>

Hi Mark  
Thank you so much for quick updates.  
We had old pkg jenkins-2.164.3-1.1.noarch working on this, after linux patches, Jenkins service is not coming up.  
then we removed old pkg and installed new pkg “jenkins-2.361-1.1.noarch” using rpm -i jenkins-2.361-1.1.noarch  
we can’t do yum install, since not connected to outside.  
Does 2.361 uses systemd?

Thank you.

---

<div class="post-metadata">

**Author:** ![MarkEWaite](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/markewaite/32/20_2.png) [@MarkEWaite](https://community.jenkins.io/u/MarkEWaite)\
**Post date:** [January 31, 2023, 8:48pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/7 "2023-01-31T20:48:12Z")

</div>

> [@devops1](#):
>
> Does 2.361 uses systemd?

Yes, 2.361.4 uses systemd.

I’m confident that since you installed with `yum` you need to upgrade with `yum`. If you did not install with `yum` or need to somehow create your own systemd service, without the help of the Jenkins rpm package, then you will need to spend the effort to learn how to define and configure a systemd service.

Find a way that will allow you to upgrade with `yum`.

---

<div class="post-metadata">

**Author:** ![halkeye](https://dub1.discourse-cdn.com/flex013/user_avatar/community.jenkins.io/halkeye/32/8_2.png) [@halkeye](https://community.jenkins.io/u/halkeye)\
**Post date:** [February 1, 2023, 12:14am UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/8 "2023-02-01T00:14:48Z")

</div>

Can you not just download the rpm manually and transfer it over?

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [February 1, 2023, 12:21am UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/9 "2023-02-01T00:21:59Z")

</div>

Yes, that is what we are doing it, but not sure if this is over writing Jenkins service as systemd instead of rc.d/init.d.

---

<div class="post-metadata">

**Author:** ![devops1](https://avatars.discourse-cdn.com/v4/letter/d/0ea827/32.png) [@devops1](https://community.jenkins.io/u/devops1)\
**Post date:** [February 1, 2023, 8:43pm UTC](https://community.jenkins.io/t/not-able-to-start-jenkins-in-linux/5543/10 "2023-02-01T20:43:13Z")

</div>

We are still not able to start this, does anybody provide support on this?  
Thanks
