我创建了两个tomcat实例,并如下更改了AJP端口。
<Connector port="1983" protocol="AJP/1.3" redirectPort="8553" address="0.0.0.0" />
然后我编辑了worker.properties并添加了以下端口。
worker.app2Worker.type=ajp13
worker.app2Worker.host=serapp.abcapp.com
worker.app2Worker.port=1983
我修改了ssl.conf和该工作程序。 但是我遇到了错误。
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] jk_open_socket::jk_connect.c (817): connect to 14.178.78.77:1983 failed (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1068): (app2Worker) Failed opening socket to (14.178.78.77:1983) (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [error] ajp_send_request::jk_ajp_common.c (1728): (app2Worker) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] ajp_service::jk_ajp_common.c (2778): (app2Worker) sending request to tomcat failed (recoverable), because of error during request sending (attempt=1)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] jk_open_socket::jk_connect.c (817): connect to 14.178.78.77:1983 failed (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] ajp_connect_to_endpoint::jk_ajp_common.c (1068): (app2Worker) Failed opening socket to (14.178.78.77:1983) (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [error] ajp_send_request::jk_ajp_common.c (1728): (app2Worker) connecting to backend failed. Tomcat is probably not started or is listening on the wrong port (errno=13)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] ajp_service::jk_ajp_common.c (2778): (app2Worker) sending request to tomcat failed (recoverable), because of error during request sending (attempt=2)
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [error] ajp_service::jk_ajp_common.c (2799): (app2Worker) connecting to tomcat failed (rc=-3, errors=1, client_errors=0).
[Wed Jan 30 08:37:51 2019] [15458:140454934608000] [info] jk_handler::mod_jk.c (2995): Service error=-3 for worker=app2Worker
网络服务器:Apache 7
应用服务器:Tomcat 8
您能告诉我这是怎么回事吗?
答案 0 :(得分:0)
对我来说是selinux阻止连接,需要调整策略:https://serverfault.com/questions/563872/selinux-allow-httpd-to-connect-to-a-specific-port
答案 1 :(得分:0)
请找到我对上述问题的调查和回答:
factory="org.apache.tomcat.jdbc.pool.DataSourceFactory"
maxActive="100"
maxIdle="20"
maxWait="10000"
validationInterval="60000"
minEvictableIdleTimeMillis="600000"
removeAbandoned="true"
removeAbandonedTimeout="600"
logAbandoned="true"
timeBetweenEvictionRunsMillis="60000"
添加这些参数后Tomcat需要重启
它解决了我的问题希望它会帮助你:)