- sudo systemctl启动jenkins时出错

wnavrhmk  于 2022-11-21  发布在  Jenkins
关注(0)|答案(3)|浏览(160)

$ sudo systemctl启动Jenkins
无法发出方法调用:无法加载设备jenkins.服务:没有这样的文件或目录。有关详细信息,请参阅系统日志和“systemctl status jenkins.service”。
$ systemctl状态Jenkins.服务
无法发出方法调用:路径/org/freedesktop/systemd 1/unit/jenkins_2eservice下对象上没有这样接口'org.freedesktop.DBus.Properties'

z8dt9xmd

z8dt9xmd1#

听起来你的安装出错了
尝试安装

sudo apt-get install jenkins

以获得正确的安装并重试

e5njpo68

e5njpo682#

您的软件包安装错误。
尝试重新安装程序包。首先卸载并清除它。

sudo apt-get purge jenkins

重新安装

sudo apt-get install jenkins
2wnc66cl

2wnc66cl3#

这对我很有效:

systemctl daemon-reload

之后,错误消息更改为

Job for jenkins.service failed because the control process exited with error code.
See "systemctl status jenkins.service" and "journalctl -xe" for details.

阅读日志告诉了我实际的问题:

# cat /var/log/jenkins.rc
Apr. 16, 2020 10:54:25 VORM. Main verifyJavaVersion
FATAL: Running with Java class version 56 which is not in the list of supported versions: [52, 55]. Run with the --enable-future-java flag to enable such behavior. See https://jenkins.io/redirect/java-support/
java.lang.UnsupportedClassVersionError: 56.0
    at Main.verifyJavaVersion(Main.java:174)
    at Main.main(Main.java:142)

Jenkins requires Java versions [8, 11] but you are running with Java 12 from /usr/lib64/jvm/java-12-openjdk-12
java.lang.UnsupportedClassVersionError: 56.0
    at Main.verifyJavaVersion(Main.java:174)
    at Main.main(Main.java:142)

相关问题