OWASP / SecurityShepherd

Web and mobile application security training platform

Home Page:https://owasp.org/www-project-security-shepherd/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] Error with ajp-connector when starting docker environment

vikiorf opened this issue · comments

Describe the bug
When trying to start the docker environment, tomcat displays error:

Failed to start connector [Connector[AJP/1.3-8009]]
secshep_tomcat   | 05-Aug-2022 12:41:03.331 SEVERE [main] org.apache.catalina.core.StandardService.startInternal Failed to start connector [Connector[AJP/1.3-8009]]
secshep_tomcat   |      org.apache.catalina.LifecycleException: Protocol handler start failed
secshep_tomcat   |              at org.apache.catalina.connector.Connector.startInternal(Connector.java:1140)
secshep_tomcat   |              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
secshep_tomcat   |              at org.apache.catalina.core.StandardService.startInternal(StandardService.java:452)
secshep_tomcat   |              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
secshep_tomcat   |              at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:794)
secshep_tomcat   |              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
secshep_tomcat   |              at org.apache.catalina.startup.Catalina.start(Catalina.java:695)
secshep_tomcat   |              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
secshep_tomcat   |              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
secshep_tomcat   |              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
secshep_tomcat   |              at java.lang.reflect.Method.invoke(Method.java:498)
secshep_tomcat   |              at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:345)
secshep_tomcat   |              at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:476)
secshep_tomcat   |      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.
secshep_tomcat   |              at org.apache.coyote.ajp.AbstractAjpProtocol.start(AbstractAjpProtocol.java:274)
secshep_tomcat   |              at org.apache.catalina.connector.Connector.startInternal(Connector.java:1137)
secshep_tomcat   |              ... 12 more
secshep_tomcat   | 05-Aug-2022 12:41:03.332 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 1658 ms

To Reproduce
Steps to reproduce the behavior:

  1. Follow the instructions in the docker setup here on github
  2. See error:

Expected behavior
Expected the environment to run without errors.

Desktop (please complete the following information):

  • OS: Ubuntu Server 20.4LTS

Further Information:

  • mvn version: apache-maven-3.6.3
  • docker Docker version 20.10.17
  • docker-compose docker-compose version 1.25.0]
  • java openjdk version "1.8.0_342"

Additional context
I have checked issue #595 and the solutions there did not help me.

I don't seem to be able to reproduce and I don't see that setting secretRequired set in the server.xml (see snippet below showing this is commented out. Have you made modifications?

    <!-- Define an AJP 1.3 Connector on port 8009 -->
    <!--
    <Connector protocol="AJP/1.3"
               address="::1"
               port="8009"
               redirectPort="8443" />
    -->

I did not do any modifications in the source files. I also saw that commented line but did not touch it which is why I was so confused.
I did a full reinstall of the machine and it now works.
My theory is that I had two different versions of docker installed if that would affect this in any way.