Jenkins没有起床,仍然处于失败状态

myss37ts  于 2023-08-03  发布在  Jenkins
关注(0)|答案(1)|浏览(128)

我几乎做了所有可用的东西在互联网上,甚至在Jenkins社区提供的解决方案,这是百胜升级,因为我使用centos 7.6,但没有什么工作,我的错误仍然是一样的。我使用的jenkins版本是2.346.2。
在Jenkins中,JENKINS_JAVA_CMD="”,并且变量正在由名为

/etc/rc.d/init.d/jenkins,位于systemd下

candidates="
/etc/alternatives/java
/usr/lib/jvm/java-1.8.0/bin/java
/usr/lib/jvm/jre-1.8.0/bin/java
/usr/lib/jvm/java-11.0/bin/java
/usr/lib/jvm/jre-11.0/bin/java
/usr/lib/jvm/java-11-openjdk-amd64
/usr/bin/java
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64/jre/bin/java
"
for candidate in $candidates
do
  [ -x "$JENKINS_JAVA_CMD" ] && break
  JENKINS_JAVA_CMD="$candidate"
done

字符串
java版本是 /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.352.b08-2.el7_9.x86_64 这是正确的,因为我已经尝试将其更改为java 11,然后它开始弹出新的错误。我只是使用了 * 巴克 * 文件并将状态恢复到以前的状态。现在,jenkins服务仍然处于失败状态,但我现在能够访问jenkins的UI,这是以前搞砸了。
我尝试重新启动服务时出现的错误是:

[root@localhost log]# systemctl status jenkins
● jenkins.service - LSB: Jenkins Automation Server
   Loaded: loaded (/etc/rc.d/init.d/jenkins; bad; vendor preset: disabled)
   Active: failed (Result: exit-code) since Mon 2023-07-17 23:34:43 IST; 2s ago
     Docs: man:systemd-sysv-generator(8)
  Process: 28719 ExecStart=/etc/rc.d/init.d/jenkins start (code=exited, status=1/FAILURE)
    Tasks: 72
   Memory: 1.8G
   CGroup: /system.slice/jenkins.service
           ├─26370 /bin/sh -xe /tmp/jenkins3788405557627827271.sh
           ├─26373 python3 main_exec_file.py
           ├─26762 /bin/python /bin/ansible-playbook ./play_books/build_image.yml
           ├─26876 /bin/python /bin/ansible-playbook ./play_books/build_image.yml
           ├─26890 /bin/sh -c /usr/bin/python /root/.ansible/tmp/ansible-tmp-1689616762.75-75003044585972/AnsiballZ_command.py && sleep 0
           ├─26891 /usr/bin/python /root/.ansible/tmp/ansible-tmp-1689616762.75-75003044585972/AnsiballZ_command.py
           ├─28722 runuser -s /bin/bash root -c ulimit -S -c 0 >/dev/null 2>&1 ; /etc/alternatives/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /u...
           ├─28723 bash -c ulimit -S -c 0 >/dev/null 2>&1 ; /etc/alternatives/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkin...
           └─28724 /etc/alternatives/java -Djava.awt.headless=true -DJENKINS_HOME=/var/lib/jenkins -jar /usr/lib/jenkins/jenkins.war --logfile=/var/log/jenkins/jenkins....

Jul 17 23:34:43 localhost.localdomain jenkins[28719]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
Jul 17 23:34:43 localhost.localdomain jenkins[28719]: at java.lang.reflect.Method.invoke(Method.java:498)
Jul 17 23:34:43 localhost.localdomain jenkins[28719]: at Main._main(Main.java:342)
Jul 17 23:34:43 localhost.localdomain jenkins[28719]: at Main.main(Main.java:117)
Jul 17 23:34:43 localhost.localdomain runuser[28746]: pam_unix(runuser:session): session closed for user root
Jul 17 23:34:43 localhost.localdomain jenkins[28719]: [FAILED]
Jul 17 23:34:43 localhost.localdomain systemd[1]: jenkins.service: control process exited, code=exited status=1
Jul 17 23:34:43 localhost.localdomain systemd[1]: Failed to start LSB: Jenkins Automation Server.
Jul 17 23:34:43 localhost.localdomain systemd[1]: Unit jenkins.service entered failed state.
Jul 17 23:34:43 localhost.localdomain systemd[1]: jenkins.service failed.


我检查空间也对我的机器它是罚款只有

[root@localhost ~]# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root  118G   68G   50G  58% /
devtmpfs                 3.8G     0  3.8G   0% /dev
tmpfs                    3.8G  132K  3.8G   1% /dev/shm
tmpfs                    3.8G   98M  3.7G   3% /run
tmpfs                    3.8G     0  3.8G   0% /sys/fs/cgroup
/dev/sda1               1014M  180M  835M  18% /boot
/dev/loop0               4.8M  4.8M     0 100% /var/lib/snapd/snap/yq/1787
/dev/loop1               182M  182M     0 100% /var/lib/snapd/snap/postman/179
/dev/loop3                56M   56M     0 100% /var/lib/snapd/snap/core18/2284
/dev/loop4               4.8M  4.8M     0 100% /var/lib/snapd/snap/yq/1792
/dev/loop2               182M  182M     0 100% /var/lib/snapd/snap/postman/178
/dev/loop6                56M   56M     0 100% /var/lib/snapd/snap/core18/2409
/dev/loop5                47M   47M     0 100% /var/lib/snapd/snap/snapd/16010
/dev/loop7                47M   47M     0 100% /var/lib/snapd/snap/snapd/16292
/dev/mapper/centos-home   19G   18G  809M  96% /home
tmpfs                    766M  4.0K  766M   1% /run/user/42
tmpfs                    766M   52K  766M   1% /run/user/0
overlay                  118G   68G   50G  58% /var/lib/docker/overlay2/07b6cb0d553b90b44b2a2bccb24a20e81637bd76d1cb149acf57eb3671dd6541/merged


当我尝试访问jenkins.log时,它为我提供了以下信息

Running from: /usr/lib/jenkins/jenkins.war
Exception in thread "Jenkins initialization thread" java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:261)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
    at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:538)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 1 more
java.io.IOException: Failed to start Jetty
    at winstone.Launcher.<init>(Launcher.java:206)
    at winstone.Launcher.main(Launcher.java:405)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at Main._main(Main.java:342)
    at Main.main(Main.java:117)
Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8089
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at org.eclipse.jetty.server.Server.doStart(Server.java:401)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at winstone.Launcher.<init>(Launcher.java:202)
    ... 7 more
Caused by: java.net.BindException: Address already in use
    at sun.nio.ch.Net.bind0(Native Method)
    at sun.nio.ch.Net.bind(Net.java:461)
    at sun.nio.ch.Net.bind(Net.java:453)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:222)
    at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:85)
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
    ... 14 more
Running from: /usr/lib/jenkins/jenkins.war
Exception in thread "Jenkins initialization thread" java.lang.NoClassDefFoundError: hudson/util/HudsonFailedToLoad
    at hudson.WebAppMain$3.run(WebAppMain.java:261)
Caused by: java.lang.ClassNotFoundException: hudson.util.HudsonFailedToLoad
    at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:538)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
    ... 1 more
java.io.IOException: Failed to start Jetty
    at winstone.Launcher.<init>(Launcher.java:206)
    at winstone.Launcher.main(Launcher.java:405)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at Main._main(Main.java:342)
    at Main.main(Main.java:117)
Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8089
    at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:349)
    at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:310)
    at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:80)
    at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:234)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at org.eclipse.jetty.server.Server.doStart(Server.java:401)
    at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:73)
    at winstone.Launcher.<init>(Launcher.java:202)


我也试着做了yum升级,但同样的问题对我来说一直存在。我试图重新启动我的服务后,改变了java构建路径太多,但错误是相同的。
管道目前正在运行,中间的几个地方出现故障。
帮助将是非常感谢!

eeq64g8w

eeq64g8w1#

错误提示已经有东西在使用这个端口
你需要找到哪个程序

sudo lsof -i:8090

字符串
或者是

netstat -ltnp | grep -w ':8090'

相关问题