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

相关推荐
AZ996ZA22 分钟前
自学linux第十八天:【Linux运维实战】系统性能优化与安全加固精要
linux·运维·安全·性能优化
大虾别跑36 分钟前
OpenClaw已上线:我的电脑开始自己打工了
linux·ai·openclaw
weixin_437044642 小时前
Netbox批量添加设备——堆叠设备
linux·网络·python
hhy_smile2 小时前
Ubuntu24.04 环境配置自动脚本
linux·ubuntu·自动化·bash
宴之敖者、2 小时前
Linux——\r,\n和缓冲区
linux·运维·服务器
LuDvei2 小时前
LINUX错误提示函数
linux·运维·服务器
未来可期LJ2 小时前
【Linux 系统】进程间的通信方式
linux·服务器
Abona2 小时前
C语言嵌入式全栈Demo
linux·c语言·面试
Lenyiin2 小时前
Linux 基础IO
java·linux·服务器
The Chosen One9853 小时前
【Linux】深入理解Linux进程(一):PCB结构、Fork创建与状态切换详解
linux·运维·服务器