Linux下启动jenkins报错问题解决

jenkins端口报错

bash 复制代码
java.io.IOException: Failed to start Jetty
	at winstone.Launcher.<init>(Launcher.java:209)
	at winstone.Launcher.main(Launcher.java:496)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:568)
	at executable.Main.main(Main.java:351)
Caused by: java.io.IOException: Failed to bind to 0.0.0.0/0.0.0.0:8080
	at org.eclipse.jetty.server.ServerConnector.openAcceptChannel(ServerConnector.java:344)
	at org.eclipse.jetty.server.ServerConnector.open(ServerConnector.java:304)
	at org.eclipse.jetty.server.Server.lambda$doStart$0(Server.java:402)

更换端口运行启动jenkins

bash 复制代码
./jenkins start --httpPort=8088

还是出现报错

bash 复制代码
WARNING	hudson.model.UpdateCenter#updateDefaultSite: Upgrading 

解决方法

1.查询宿主主机防火墙NAT转发情况:firewall-cmd --query-masquerade

2.开启NAT转发: firewall-cmd --zone=public --add-masquerade --permanent

3.重启防火墙: firewall-cmd --reload

如果使用命令出现 FirewallD is not running 问题 :

1.查看firewalld状态:systemctl status firewalld,如果是dead状态,即防火墙未开启。

2.开启防火墙:systemctl start firewalld

3.确认firewalld状态:systemctl status firewalld

(根据需求是否关闭防火墙)关闭防火墙:systemctl stop firewalld

再次启动

bash 复制代码
./jenkins start --httpPort=8088

输入IP及端口可正常启动jenkins

相关推荐
一位摩羯座DBA1 小时前
Redhat&Centos挂载镜像
linux·运维·centos
学习3人组1 小时前
CentOS配置网络
linux·网络·centos
weixin_307779131 小时前
Hive集群之间迁移的Linux Shell脚本
大数据·linux·hive·bash·迁移学习
漫步企鹅2 小时前
【蓝牙】Linux Qt4查看已经配对的蓝牙信息
linux·qt·蓝牙·配对
cui_win2 小时前
【网络】Linux 内核优化实战 - net.core.flow_limit_table_len
linux·运维·网络
梦在深巷、2 小时前
MySQL/MariaDB数据库主从复制之基于二进制日志的方式
linux·数据库·mysql·mariadb
冰橙子id3 小时前
linux系统安全
linux·安全·系统安全
stark张宇3 小时前
VMware 虚拟机装 Linux Centos 7.9 保姆级教程(附资源包)
linux·后端
Johny_Zhao3 小时前
Ubuntu系统安装部署Pandawiki智能知识库
linux·mysql·网络安全·信息安全·云计算·shell·yum源·系统运维·itsm·pandawiki
悲伤小伞3 小时前
linux_git的使用
linux·c语言·c++·git