Centos8
中的Docker+spring boot
服务无法访问局域网内的mysql服务。
通过telnet测试端口情况,发下如下错误
YB|m0A9mysql_native_password packets out of orderConnection closed by foreign host
执行命令:
getsebool -a|grep httpd
发现 httpd_can_network_connect off
解决:
setsebool httpd_can_network_connect 1
setsebool httpd_can_network_connect_cobbler 1
setsebool httpd_can_network_connect_db 1
setsebool httpd_can_network_relay 1
需要重新系统
reboot