Repository navigation
Docker build passes even though landing page does not load #554
Copy link
Copy link
Open
Labels
Description
There is currently no test to see if the webpage loads when the build for docker is complete.
Below an an issue with the sed command not working where its supposed to replace TLS_KEYSTORE_FILE in /usr/local/tomcat/conf/ with the actual value but it fails. The file is not referenced when the application starts up and cannot produce the landing page.
There needs to be a test developed to catch this.
Evidence of build passing - https://travis-ci.com/OWASP/SecurityShepherd/jobs/294068223
ecshep_tomcat | 04-Mar-2020 18:16:59.971 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8443]]
secshep_tomcat | org.apache.catalina.LifecycleException: Protocol handler initialization failed
secshep_tomcat | at org.apache.catalina.connector.Connector.initInternal(Connector.java:1032)
secshep_tomcat | at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
secshep_tomcat | at org.apache.catalina.core.StandardService.initInternal(StandardService.java:552)
secshep_tomcat | at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
secshep_tomcat | at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:848)
secshep_tomcat | at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
secshep_tomcat | at org.apache.catalina.startup.Catalina.load(Catalina.java:639)
secshep_tomcat | at org.apache.catalina.startup.Catalina.load(Catalina.java:662)
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.load(Bootstrap.java:303)
secshep_tomcat | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
secshep_tomcat | Caused by: java.lang.IllegalArgumentException: /usr/local/tomcat/conf/TLS_KEYSTORE_FILE (No such file or directory)
secshep_tomcat | at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:100)
secshep_tomcat | at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:72)
secshep_tomcat | at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:246)
secshep_tomcat | at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:1118)
secshep_tomcat | at org.apache.tomcat.util.net.AbstractJsseEndpoint.init(AbstractJsseEndpoint.java:223)
secshep_tomcat | at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:587)
secshep_tomcat | at org.apache.coyote.http11.AbstractHttp11Protocol.init(AbstractHttp11Protocol.java:74)
secshep_tomcat | at org.apache.catalina.connector.Connector.initInternal(Connector.java:1030)
secshep_tomcat | ... 13 more
secshep_tomcat | Caused by: java.io.FileNotFoundException: /usr/local/tomcat/conf/TLS_KEYSTORE_FILE (No such file or directory)
secshep_tomcat | at java.io.FileInputStream.open0(Native Method)
secshep_tomcat | at java.io.FileInputStream.open(FileInputStream.java:195)
secshep_tomcat | at java.io.FileInputStream.<init>(FileInputStream.java:138)
secshep_tomcat | at java.io.FileInputStream.<init>(FileInputStream.java:93)
secshep_tomcat | at sun.net.www.protocol.file.FileURLConnection.connect(FileURLConnection.java:90)
secshep_tomcat | at sun.net.www.protocol.file.FileURLConnection.getInputStream(FileURLConnection.java:188)
secshep_tomcat | at org.apache.tomcat.util.file.ConfigFileLoader.getInputStream(ConfigFileLoader.java:89)
secshep_tomcat | at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:197)
secshep_tomcat | at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:206)
secshep_tomcat | at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:282)
secshep_tomcat | at org.apache.tomcat.util.net.openssl.OpenSSLUtil.getKeyManagers(OpenSSLUtil.java:98)
secshep_tomcat | at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246)
secshep_tomcat | at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:98)
secshep_tomcat | ... 20 more
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNext Release Backlog
Activity
ismisepaul commentedon Oct 23, 2026
Status update.
Partly covered by #946 (not merged yet). It adds
src/test/scripts/tomcat-config-test.sh, which runs in the CIbuildjob afterdocker compose build. The script readsconf/server.xmlfrom the built Tomcat image and fails if any placeholder (HTTPS_PORT,TLS_KEYSTORE_FILE,TLS_KEYSTORE_PASS,ALIAS) wasn't replaced. That catches the exact failure reported here.Still missing: CI never starts the containers. Because the check above only reads the config file, a build where Tomcat fails at runtime would still pass. Examples: the keystore file is missing from the image, the WAR fails to deploy, or there's another
SEVEREstartup error.Next steps once #946 is merged
src/test/scripts/and run it in thebuildjob right aftertomcat-config-test.sh. It should:docker compose up -dhttps://localhost:${HTTPS_PORT}/answers (curl -k, since the cert is self-signed)setup.jsp, and that the HTTP port redirects to HTTPSsecshep_tomcatlogs containSEVEREstartup or connector errors, and print the logs on failuredocker compose down -v(via a trap)docker/tomcat/serverxml.patchand confirm the script fails.AGENTS.md.This issue can be closed once that's merged.