我在AWS Linux上安装了Jenkins
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
yum install jenkins
如官方文件所述
当我跑步时:
服务启动jenkins我得到以下错误消息:
Starting jenkins (via systemctl): Job for jenkins.service failed because the control process exited with error code. See "systemctl status jenkins.service" and "journalctl -xe" for details.
[FAILED]
运行systemctlstatusjenkins.service得到以下结果:
● jenkins.service - LSB:Jenkins持续集成服务器已加载:已加载(/etc/rc.d/init.d/jenkins)活动:失败(结果:exit-code)自Wed 2016-09-21 16:45:28 BST; 3分钟59秒前Docs:man:systemd-sysv-generator(8)过程:2818 ExecStart=/etc/rc.d/init.d/jenkins start(code=exited,status=1/FAILURE)
9月21日16:45:28 webstack.local.caplib jenkins[2818]:at com.sun.akuma.JavaVMArguments.of(JavaVMArguments...04)Sep 21 16:45:28 webstack.local.caplib jenkins[2818]:at com.sun.akuma.JavaVMArguments.current(JavaVMArgue...92)Sep 21 16:45:28 webstack.local.caplib jenkins[2818]:at com.sun.akuma.Daemon.daemonize(Daemon.java:106)Sep 21 16:45:28 webstack.local.caplib jenkins[2818]:at com.sun.akuma.Daemon.all(Daemon.java:88)Sep 21 16:45:28 webstack.local.caplib jenkins[2818]:... 6 more Sep 21 16:45:28 webstack.local.caplib systemd[1]:jenkins.service:control process existed,code= existed s...s=1 Sep 21 16:45:28 webstack.local.caplib systemd[1]:无法启动LSB:Jenkins持续集成服务器Sep 21 16:45:28 webstack.local.caplib systemd[1]:单位Jenkins。服务进入失败状态。Sep 21 16:45:28 webstack.local.caplib systemd[1]:jenkins.服务失败. 9月21日16:45:28 webstack.local.caplib jenkins[2818]:提示:有些行是省略号,使用-l显示完整行。
在我的AWS机器上完成所有jenkins设置后,我们得到了错误-----启动jenkins(通过systemctl):jenkins.service的作业失败,因为控制进程退出时出现错误代码。有关详细信息,请参阅“systemctl status jenkins.service”和“journalctl -xe”。[失败]
”””我有一个工作围绕这个。请在此尝试并投票**
1)Uninstall all java version installed
command- sudo yum remove java*
2) install java 11 by using below command
command -sudo amazon-linux-extras install java-openjdk11
肯定能解决你的问题。注意:这个问题是因为我们的Jenkins更新了,Java8中的一些东西与最新的Jenkins版本不兼容
1条答案
按热度按时间ckx4rj1h1#
您需要安装Java 11,而不是Java 8。我有文件的所有命令这样做:
sudo yum install java-11-amazon-corretto-headless
sudo wget -O /etc/yum.repos.d/jenkins.repo http://pkg.jenkins.io/redhat-stable/jenkins.repo
sudo rpm --import http://pkg.jenkins.io/redhat-stable/jenkins.io.key
sudo yum install jenkins
sudo systemctl restart jenkins
sudo systemctl enable jenkins
配置Jenkins
Jenkins现在已经安装并运行在您的EC2示例上。配置Jenkins:
1.从浏览器连接到
http://<your_server_public_DNS>:8080
。您将能够通过其管理界面访问Jenkins。1.解锁Jenkins:
sudo cat /var/lib/jenkins/secrets/initialAdminPassword