Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Tomcat 8.5.51 - Issues with secretRequired="false"

The secretRequired="false" option added to AJP connector is server.xml. However, the connector does not start with Protocol handler start failed error. It is behind an Apache Server version 2.4.25.

    <Connector port="8009"
               address="127.0.0.1" tomcatAuthentication="false" URIEncoding="UTF-8" enableLookups="false"
               protocol="AJP/1.3" redirectPort="8663" connectionTimeout="600000" secretRequired="false" />

The error:

Caused by: java.lang.IllegalArgumentException: The AJP Connector is configured with secretRequired="true" but the secret attribute is either null or "". This combination is not valid.

Thanks

like image 446
imriss Avatar asked Mar 05 '20 19:03

imriss


People also ask

Is Ajp deprecated?

IMPORTANT NOTE: The AJP/1.3 Connector is now deprecated.

What is Tomcat AJP connector?

AJP connectors Apache JServ Protocol, or AJP, is an optimized binary version of HTTP that is typically used to allow Tomcat to communicate with an Apache web server.

How do I update my Tomcat to latest version?

a)Navigate to the folder C:\Program Files\Apache Software Foundation\[ Tomcat folder ]\bin and run Tomcat9w.exe. b)In the General tab set Startup Type to Automatic and press Start. c)Click the Java tab, make sure Use default is deselected and Java Virtual Machine includes the path to jvm.


2 Answers

Adding the address attribute and specifying the loopback address is what worked for me on Tomcat 8.5.54.

<Connector port="8009" protocol="AJP/1.3" redirectPort="8443" address="0.0.0.0" secretRequired="false" />
like image 98
user6708591 Avatar answered Oct 07 '22 06:10

user6708591


Tomcat 9.0.34 has that secretReqiured set to true by default now to address CVS issue.

See these URLs for details of this issue:
https://access.redhat.com/solutions/4851251 https://tomcat.apache.org/tomcat-9.0-doc/config/ajp.html https://github.com/spring-projects/spring-boot/issues/20377

like image 38
Lionel Avatar answered Oct 07 '22 05:10

Lionel