Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-68384

Jenkins not starting on clean Ubuntu 22.04 and 20.04 installs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • core
    • None
    • Ubuntu Server 20.04 and Ubuntu Server 22.04

      I installed a clean Ubuntu Server 22.04 and followed the instructions to install Jenkins, and I see the following:

       

      ```

      hackeron@tetherjenkins:~$ curl -fsSL https://pkg.jenkins.io/debian-stable/jenkins.io.key | sudo tee \
      >   /usr/share/keyrings/jenkins-keyring.asc > /dev/null
      [sudo] password for hackeron:
      hackeron@tetherjenkins:~$ echo deb [signed-by=/usr/share/keyrings/jenkins-keyring.asc] \
      >   https://pkg.jenkins.io/debian-stable binary/ | sudo tee \
      >   /etc/apt/sources.list.d/jenkins.list > /dev/null
      hackeron@tetherjenkins:~$ sudo apt-get update
      Hit:1 http://gb.archive.ubuntu.com/ubuntu focal InRelease
      Get:2 http://gb.archive.ubuntu.com/ubuntu focal-updates InRelease [114 kB]
      Ign:3 https://pkg.jenkins.io/debian-stable binary/ InRelease
      Get:4 https://pkg.jenkins.io/debian-stable binary/ Release [2,044 B]
      Get:5 https://pkg.jenkins.io/debian-stable binary/ Release.gpg [833 B]
      Get:6 http://gb.archive.ubuntu.com/ubuntu focal-backports InRelease [108 kB]
      Get:7 http://gb.archive.ubuntu.com/ubuntu focal-security InRelease [114 kB]
      Get:8 http://gb.archive.ubuntu.com/ubuntu focal/main Translation-en_GB [485 kB]
      Get:9 http://gb.archive.ubuntu.com/ubuntu focal/restricted Translation-en_GB [3,860 B]
      Get:10 http://gb.archive.ubuntu.com/ubuntu focal/universe Translation-en_GB [319 kB]
      Get:11 http://gb.archive.ubuntu.com/ubuntu focal/multiverse Translation-en_GB [105 kB]
      0% [8 Translation-en_GB store 0 B]
      Get:12 http://gb.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages [1,750 kB]
      Get:13 http://gb.archive.ubuntu.com/ubuntu focal-updates/universe amd64 Packages [920 kB]
      Get:14 https://pkg.jenkins.io/debian-stable binary/ Packages [21.8 kB]
      Get:15 http://gb.archive.ubuntu.com/ubuntu focal-security/main amd64 Packages [1,422 kB]
      Get:16 http://gb.archive.ubuntu.com/ubuntu focal-security/universe amd64 Packages [700 kB]
      Fetched 6,065 kB in 1s (5,299 kB/s)
      Reading package lists... Done
      hackeron@tetherjenkins:~$
      hackeron@tetherjenkins:~$ sudo apt-get install jenkins
      Reading package lists... Done
      Building dependency tree
      Reading state information... Done

      The following additional packages will be installed:
        net-tools
      The following NEW packages will be installed:
        jenkins net-tools
      0 upgraded, 2 newly installed, 0 to remove and 28 not upgraded.
      Need to get 91.5 MB of archives.
      After this operation, 95.9 MB of additional disk space will be used.
      Get:1 http://gb.archive.ubuntu.com/ubuntu focal/main amd64 net-tools amd64 1.60+git20180626.aebd88e-1ubuntu1 [196 kB]
      Get:2 https://pkg.jenkins.io/debian-stable binary/ jenkins 2.332.2 [91.4 MB]
      Fetched 91.5 MB in 5s (20.2 MB/s)
      Selecting previously unselected package net-tools.
      (Reading database ... 71807 files and directories currently installed.)
      Preparing to unpack .../net-tools_1.60+git20180626.aebd88e-1ubuntu1_amd64.deb ...
      Unpacking net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
      Selecting previously unselected package jenkins.
      Preparing to unpack .../jenkins_2.332.2_all.deb ...
      Unpacking jenkins (2.332.2) ...
      Setting up net-tools (1.60+git20180626.aebd88e-1ubuntu1) ...
      Setting up jenkins (2.332.2) ...
      Created symlink /etc/systemd/system/multi-user.target.wants/jenkins.service → /lib/systemd/system/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.
      invoke-rc.d: initscript jenkins, action "start" failed.
      ● jenkins.service - Jenkins Continuous Integration Server
           Loaded: loaded (/lib/systemd/system/jenkins.service; enabled; vendor preset: enabled)
           Active: activating (auto-restart) (Result: exit-code) since Mon 2022-05-02 18:46:47 UTC; 4ms ago
          Process: 2398 ExecStart=/usr/bin/jenkins (code=exited, status=1/FAILURE)
         Main PID: 2398 (code=exited, status=1/FAILURE)

      May 02 18:46:47 tetherjenkins systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE
      May 02 18:46:47 tetherjenkins systemd[1]: jenkins.service: Failed with result 'exit-code'.
      May 02 18:46:47 tetherjenkins systemd[1]: Failed to start Jenkins Continuous Integration Server.
      dpkg: error processing package jenkins (--configure):
       installed jenkins package post-installation script subprocess returned error exit status 1
      Processing triggers for man-db (2.9.1-1) ...
      Processing triggers for systemd (245.4-4ubuntu3.15) ...
      Errors were encountered while processing:
       jenkins
      E: Sub-process /usr/bin/dpkg returned an error code (1)

      ```

       

      I tried also installing 20.04 and got the same results.

       

      There are no useful logs in journalctl or in /var/log/jenkins:

       

      ```

      hackeron@tetherjenkins:~$ journalctl -u jenkins -f
      – Logs begin at Mon 2022-05-02 18:45:52 UTC. –
      May 02 18:46:49 tetherjenkins systemd[1]: Starting Jenkins Continuous Integration Server...
      May 02 18:46:49 tetherjenkins jenkins[2822]: jenkins: failed to find a valid Java installation
      May 02 18:46:49 tetherjenkins systemd[1]: jenkins.service: Main process exited, code=exited, status=1/FAILURE
      May 02 18:46:49 tetherjenkins systemd[1]: jenkins.service: Failed with result 'exit-code'.
      May 02 18:46:49 tetherjenkins systemd[1]: Failed to start Jenkins Continuous Integration Server.
      May 02 18:46:49 tetherjenkins systemd[1]: jenkins.service: Scheduled restart job, restart counter is at 8.
      May 02 18:46:49 tetherjenkins systemd[1]: Stopped Jenkins Continuous Integration Server.
      May 02 18:46:49 tetherjenkins systemd[1]: jenkins.service: Start request repeated too quickly.
      May 02 18:46:49 tetherjenkins systemd[1]: jenkins.service: Failed with result 'exit-code'.
      May 02 18:46:49 tetherjenkins systemd[1]: Failed to start Jenkins Continuous Integration Server.

      hackeron@tetherjenkins:~$ ls /var/log/jenkins/
      hackeron@tetherjenkins:~$

      ```

      Expected result would be for Jenkins to start on a clean Ubuntu Server install or to at least get some log information for next steps.

            Unassigned Unassigned
            hackeron Roman Gaufman
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: