今天在配置Jenkins 的云服务器的时候提示:java.net.NoRouteToHostException: 没有到主机的路由,网上查到的没有主机路由问题提到的大多是防火墙问题。

查看防火墙状态:firewall-cmd --state
关闭防火墙:systemctl stop firewalld.service

然而问题还是没有解决,最终发现了一个新问题:SELinux,SELinux是Linux一个子安全机制

查看SELinux状态:

/usr/sbin/sestatus -v

SELinux status参数为enabled即为开启状态

java.net.NoRouteToHostException: 没有到主机的路由


关闭SELinux:

1.临时关闭(不用重启机器):
setenforce 0

2.修改配置文件需要重启机器:

修改/etc/selinux/config文件

将SELINUX=enforcing改为SELINUX=disabled

重启机器

相关文章:

  • 2022-12-23
  • 2021-09-17
  • 2022-01-01
  • 2021-11-11
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2022-02-15
猜你喜欢
  • 2021-09-29
  • 2022-01-08
  • 2022-12-23
  • 2022-01-03
  • 2021-04-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案