问题描述:当tomcat启动成功后,访问web服务器,请求失败。导致失败的原因之一可能就是防火墙将8080端口或者其他端口拦截掉了,我们需要重新开放8080或者其他端口,不建议关闭防火墙。
1.安装 iptables-services
yum install iptables-services
2.添加8080端口允许外网访问
/sbin/iptables -I INPUT -p tcp --dport 8080 -j ACCEPT
3.保存规则设定
service iptables save
4.重启防火墙
service iptables restart
问题描述:当tomcat启动成功后,访问web服务器,请求迟迟没有响应并且也没有报错。
在tomcat/bin/catalina.sh中添加如下语句:
JAVA_OPTS="$JAVA_OPTS -Djava.security.egd=file:/dev/./urandom"