Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 [BUG] Fails to start with docker compose #176

Closed
jcollum opened this issue Jul 29, 2022 · 2 comments
Closed

🐛 [BUG] Fails to start with docker compose #176

jcollum opened this issue Jul 29, 2022 · 2 comments
Assignees
Labels
docker release/patch Patch release x.x.(x++) release/0.0.2 type/bug Something isn't working

Comments

@jcollum
Copy link

jcollum commented Jul 29, 2022

What is the issue?

Caused by: java.lang.IllegalArgumentException: Short read of DER length

I guess that's the issue? I'm giving up on using this tool.

Log output

mimock     | 2022-07-29 21:03:56.968 ERROR 1 --- [           main] o.s.boot.SpringApplication               : Application run failed
mimock     |
mimock     | org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na]
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at com.arbindo.mimock.MimockApplication.main(MimockApplication.java:27) ~[classes!/:0.0.1]
mimock     | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
mimock     | 	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
mimock     | 	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
mimock     | 	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
mimock     | 	at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[mimock-0.0.1.jar:0.0.1]
mimock     | 	at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[mimock-0.0.1.jar:0.0.1]
mimock     | 	at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[mimock-0.0.1.jar:0.0.1]
mimock     | 	at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) ~[mimock-0.0.1.jar:0.0.1]
mimock     | Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
mimock     | 	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.18.jar!/:5.3.18]
mimock     | 	... 22 common frames omitted
mimock     | Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
mimock     | 	at org.apache.catalina.core.StandardService.addConnector(StandardService.java:238) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.6.6.jar!/:2.6.6]
mimock     | 	... 24 common frames omitted
mimock     | Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
mimock     | 	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1075) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.catalina.core.StandardService.addConnector(StandardService.java:234) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	... 26 common frames omitted
mimock     | Caused by: java.lang.IllegalArgumentException: Short read of DER length
mimock     | 	at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:234) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1313) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:614) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.catalina.connector.Connector.startInternal(Connector.java:1072) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	... 28 common frames omitted
mimock     | Caused by: java.io.IOException: Short read of DER length
mimock     | 	at java.base/sun.security.util.DerInputStream.getLength(DerInputStream.java:584) ~[na:na]
mimock     | 	at java.base/sun.security.util.DerValue.init(DerValue.java:411) ~[na:na]
mimock     | 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:352) ~[na:na]
mimock     | 	at java.base/sun.security.util.DerValue.<init>(DerValue.java:365) ~[na:na]
mimock     | 	at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:1973) ~[na:na]
mimock     | 	at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222) ~[na:na]
mimock     | 	at java.base/java.security.KeyStore.load(KeyStore.java:1479) ~[na:na]
mimock     | 	at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:67) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:215) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:207) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:281) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:245) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ~[tomcat-embed-core-9.0.60.jar!/:na]
mimock     | 	... 34 common frames omitted

Type of the bug

Backend

Steps to reproduce

  1. pull source code
  2. change to source dir
  3. docker compose up

Mimock version

0.0.1

OS version

macOS 12.2.1

@jcollum jcollum added the type/bug Something isn't working label Jul 29, 2022
@neel1996 neel1996 self-assigned this Jul 30, 2022
neel1996 added a commit that referenced this issue Jul 30, 2022
- The new dockerfile will generate an image with a keystore and required DB setup
- If the user prefers this, then no additional setup will be required other than running the container
- Addresses #176
@neel1996
Copy link
Member

@jcollum The issue with docker-compose.yml has been fixed and the new file will act as a standalone manifest to start mimock

@neel1996
Copy link
Member

Updated docs

@neel1996 neel1996 added the release/patch Patch release x.x.(x++) label Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docker release/patch Patch release x.x.(x++) release/0.0.2 type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants