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

相关推荐
thinkMoreAndDoMore16 分钟前
linux系统服务管理框架
linux·运维·服务器
waves浪游31 分钟前
进程控制(中)
linux·运维·服务器·开发语言·c++
满天星830357743 分钟前
【Linux】信号(上)
linux·运维·服务器·开发语言·c++
博语小屋1 小时前
生产者消费者模型
linux·分布式·缓存
CIb0la1 小时前
在 ARM CPU 上运行 x86 应用的开源项目:FEX
linux·运维·生活
starvapour1 小时前
Ubuntu部署gitlab频繁出现500的问题
linux·ubuntu·gitlab
打不了嗝 ᥬ᭄1 小时前
【Linux】多路转接 Select , Poll和Epoll
linux·网络·c++·网络协议·http
jianchwa1 小时前
Linux Kernel PCIe SRIOV机制分析
linux·运维·服务器
忍冬行者1 小时前
基于docker安装jenkins+gitlab+harbor
docker·gitlab·jenkins
9ilk1 小时前
【Linux】--- 五种IO模型
linux·运维·网络