CMSgov / qpp-conversion-tool

Conversion tool for QPP, particularly focused on QRDA3 -> QPP, built by Flexion.
Creative Commons Zero v1.0 Universal
36 stars 62 forks source link

Docker Compose Build Failing #1479

Closed EndlessMe closed 4 days ago

EndlessMe commented 1 week ago

Information

Expected behavior

API endpoint is built using Docker Compose. I can submit QRDA files to the endpoint and receive JSON back.

Actual behavior

Docker container exits with status 1 when running the build commands in the README. Error message states that webserver cannot be started due to being unable to load keystore.

Steps to reproduce

docker-compose -f ./docker-compose.test.yaml up --build

Other details

docker-compose -f ./docker-compose.test.yaml up --build
WARN[0000] /Users/mlubke/qpp-conversion-tool/docker-compose.test.yaml: `version` is obsolete 
[+] Building 102.3s (16/16) FINISHED                                                                              docker:desktop-linux
 => [rest internal] load build definition from DockerfileTest                                                                     0.0s
 => => transferring dockerfile: 538B                                                                                              0.0s
 => [rest internal] load metadata for docker.io/library/maven:3.9.6-eclipse-temurin-17                                            1.7s
 => [rest internal] load .dockerignore                                                                                            0.0s
 => => transferring context: 192B                                                                                                 0.0s
 => [rest  1/11] FROM docker.io/library/maven:3.9.6-eclipse-temurin-17@sha256:29a1658b1f3078e07c2b17f7b519b45eb47f65d9628e887ea  16.2s
 => => resolve docker.io/library/maven:3.9.6-eclipse-temurin-17@sha256:29a1658b1f3078e07c2b17f7b519b45eb47f65d9628e887eac45a8c5c  0.0s
 => => sha256:b004db4463b8b37b4596a11f6d3081ffb92b139e1c1be02e3a67a1f7833fac02 2.41kB / 2.41kB                                    0.0s
 => => sha256:c5b7d030db882e91686c67d5a7c655905f45b24a3e131c15eacc276f3033475c 172B / 172B                                        0.5s
 => => sha256:7ae7c0a5bb23bbfcb0cf25dc90974b75ac1d0e6d8a75118cb0f78fc240c335c8 7.93kB / 7.93kB                                    0.0s
 => => sha256:29a1658b1f3078e07c2b17f7b519b45eb47f65d9628e887eac45a8c5c8f939d4 1.21kB / 1.21kB                                    0.0s
 => => sha256:0a8868eeb30ae6b43fdd3ec11d565b77e83f6c78c86d892957cf1cecb5cc59c9 18.86MB / 18.86MB                                  2.0s
 => => sha256:07c5f0f638087f0231a157f7deba2d5494e0cd15dfc56fab26293430ccccd3d2 143.90MB / 143.90MB                               14.6s
 => => sha256:a00ec0bc677d0cfff04f78636ce68c4815766fc7560ceb0c5f031e84ffb38607 731B / 731B                                        0.7s
 => => sha256:fe177f814eba094f78ae56a017473300875648ab657194e4573264197e89d4f8 19.00MB / 19.00MB                                  5.3s
 => => extracting sha256:0a8868eeb30ae6b43fdd3ec11d565b77e83f6c78c86d892957cf1cecb5cc59c9                                         1.0s
 => => sha256:73939a235da0765790dbb200789d2737364c4600e9c35e80ff2cc780f43141f2 9.48MB / 9.48MB                                    3.9s
 => => sha256:909c41446f46e4d413e0b7126752c55a2b63257586a1d8dabc27bad321609d67 852B / 852B                                        4.1s
 => => sha256:f50311219293ecffccc12e790c3d66c437ca92b4e4a333f896cb5f700d4ad083 355B / 355B                                        4.3s
 => => sha256:d492bd2e9bd153e8ade890ab4dbf0b1d25afa89fb2f0b82de446e0e42fe8276d 157B / 157B                                        4.5s
 => => extracting sha256:07c5f0f638087f0231a157f7deba2d5494e0cd15dfc56fab26293430ccccd3d2                                         1.0s
 => => extracting sha256:c5b7d030db882e91686c67d5a7c655905f45b24a3e131c15eacc276f3033475c                                         0.0s
 => => extracting sha256:a00ec0bc677d0cfff04f78636ce68c4815766fc7560ceb0c5f031e84ffb38607                                         0.0s
 => => extracting sha256:fe177f814eba094f78ae56a017473300875648ab657194e4573264197e89d4f8                                         0.5s
 => => extracting sha256:73939a235da0765790dbb200789d2737364c4600e9c35e80ff2cc780f43141f2                                         0.0s
 => => extracting sha256:909c41446f46e4d413e0b7126752c55a2b63257586a1d8dabc27bad321609d67                                         0.0s
 => => extracting sha256:f50311219293ecffccc12e790c3d66c437ca92b4e4a333f896cb5f700d4ad083                                         0.0s
 => => extracting sha256:d492bd2e9bd153e8ade890ab4dbf0b1d25afa89fb2f0b82de446e0e42fe8276d                                         0.0s
 => [rest internal] load build context                                                                                            4.5s
 => => transferring context: 958.64MB                                                                                             4.5s
 => [rest  2/11] RUN mkdir -p /usr/src/app/                                                                                       0.3s
 => [rest  3/11] RUN mkdir -p /usr/src/run/                                                                                       0.1s
 => [rest  4/11] RUN apt-get update && apt-get install dos2unix                                                                   8.9s
 => [rest  5/11] COPY ./ /usr/src/app/                                                                                            0.6s
 => [rest  6/11] WORKDIR /usr/src/app/                                                                                            0.0s
 => [rest  7/11] RUN mvn install -Dmaven.test.skip -Djacoco.skip=true > /dev/null                                                73.0s
 => [rest  8/11] RUN cp ./rest-api/target/rest-api.jar /usr/src/run/                                                              0.1s
 => [rest  9/11] RUN cp -r ./tools/docker/docker-test-artifacts/* /usr/src/run/                                                   0.1s
 => [rest 10/11] RUN dos2unix /usr/src/run/qppConverterTest.sh                                                                    0.1s
 => [rest 11/11] WORKDIR /usr/src/run/                                                                                            0.0s
 => [rest] exporting to image                                                                                                     1.1s
 => => exporting layers                                                                                                           1.1s
 => => writing image sha256:f6ef1c926dfd60e158b3600160144d05d7794fd2f51a4c68b4fce9ef8620ac4f                                      0.0s
 => => naming to docker.io/library/qpp-conversion-tool-rest                                                                       0.0s
[+] Running 2/0
 ✔ Network qpp-conversion-tool_default   Created                                                                                  0.0s 
 ✔ Container qpp-conversion-tool-rest-1  Created                                                                                  0.0s 
Attaching to rest-1
rest-1  | {"timestamp":"2024-11-18 14:00:53.654","thread":"main","attachment":"","level":"INFO ","logger":"g.c.q.c.api.RestApiApplication","message":"Starting RestApiApplication v2024.2.3 using Java 17.0.11 on cd633956dba4 with PID 1 (/usr/src/run/rest-api.jar started by root in /usr/src/run)"}
rest-1  | {"timestamp":"2024-11-18 14:00:53.657","thread":"main","attachment":"","level":"INFO ","logger":"g.c.q.c.api.RestApiApplication","message":"No active profile set, falling back to 1 default profile: \"default\""}
rest-1  | {"timestamp":"2024-11-18 14:00:54.117","thread":"main","attachment":"","level":"WARN ","logger":"o.s.b.w.s.c.AnnotationConfigServletWebServerApplicationContext","message":"Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Could not load key store 'null'"}
rest-1  | {"timestamp":"2024-11-18 14:00:54.122","thread":"main","attachment":"","level":"INFO ","logger":"o.s.b.a.l.ConditionEvaluationReportLoggingListener","message":"\n\nError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled."}
rest-1  | {"timestamp":"2024-11-18 14:00:54.131","thread":"main","attachment":"","level":"ERROR","logger":"o.s.boot.SpringApplication","message":"Application run failed","stack_trace":"org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Could not load key store 'null'\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:163)\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:577)\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145)\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780)\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:453)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:343)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1370)\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1359)\n\tat gov.cms.qpp.conversion.api.RestApiApplication.main(RestApiApplication.java:23)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)\n\tat java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.base/java.lang.reflect.Method.invoke(Method.java:568)\n\tat org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:108)\n\tat org.springframework.boot.loader.Launcher.launch(Launcher.java:58)\n\tat org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65)\nCaused by: org.springframework.boot.web.server.WebServerException: Could not load key store 'null'\n\tat org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSslKeyStore(SslConnectorCustomizer.java:132)\n\tat org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSsl(SslConnectorCustomizer.java:92)\n\tat org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.customize(SslConnectorCustomizer.java:57)\n\tat org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeSsl(TomcatServletWebServerFactory.java:357)\n\tat org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.customizeConnector(TomcatServletWebServerFactory.java:335)\n\tat org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:196)\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:182)\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:160)\n\t... 16 common frames omitted\nCaused by: java.lang.IllegalArgumentException: Resource location must not be null\n\tat org.springframework.util.Assert.notNull(Assert.java:201)\n\tat org.springframework.util.ResourceUtils.getURL(ResourceUtils.java:130)\n\tat org.springframework.boot.web.embedded.tomcat.SslConnectorCustomizer.configureSslKeyStore(SslConnectorCustomizer.java:129)\n\t... 23 common frames omitted\n"}
rest-1 exited with code 1
sivaksb commented 6 days ago

@EndlessMe Please disable HTTPS. https://github.com/CMSgov/qpp-conversion-tool?tab=readme-ov-file#disable-https

In application.properties file, comment out port and key-store-type.

EndlessMe commented 4 days ago

@sivaksb Sometimes it helps to read step one 🤦‍♂️. I'll adjust it and rebuild and close if it resolves the issue.