入手阿里云服务器,入门Jenkins,貌似不太顺利……直接上问题
1、service jenkins start 时候Jenkins无法启动
Restarting 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.
查看systemctl status jenkins.service和journalctl -xe找出问题详情,明确是背后的运行的环境JDK未识别,所以记得
在Jenkins安装成功后,需要在/etc/init.d/jenkins(PS:可以用rpm -ql jenkins查看Jenkins被安装的进所有目录)文件里,将JDK的路径添加置换进去
2、Jenkins服务成功启动,且状态为running(PS:可以通过systemctl status Jenkins查看Jenkins的服务状态),但是访问IP:8081的时候出现“无法访问此网站”
是因为阿里云没有在安全组中打开对应的访问端口,如下图进行操作:
找到安全组配置的入口:
添加安全组:
3、在输入初始密码解锁进入下一步后,页面出现Jenkins实例似乎已离线
去/var/lib/jenkins/hudson.model.UpdateCenter.xml更改协议头为http
4、初始化Jenkins页面的时候,跳过了Jenkins插件的安装,进入Jenkins时候,plugn Manager报错(与问题3是同一个原因):
There were errors checking the update sites: SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
在plugn Manager —Advanced更改HTTPS为http:
其他:
卸载Jenkins
- rpm -e jenkins
- find / -iname jenkins | xargs -n 1000 rm -rf