Open 564008975 opened 1 year ago
Sorry for the delay.
It looks like to problem with PKCS12
file. Did You use provided setup script?
Hi @siewer I use the provided setup script then use docker-compose and got the same problem. I re-run the script with difference key and set chmod +r for whole pki dir but nothing changed
MixerBackend | ####################################################################################################################
MixerBackend | # WARRNING! #
MixerBackend | # Vault Configuration is not set #
MixerBackend | # Scanner passwords will be stored #
MixerBackend | # in clear text. It is recommended #
MixerBackend | # To use vault. #
MixerBackend | # Read Mixeway docummentation #
MixerBackend | ####################################################################################################################
MixerBackend | 2023-08-15 14:59:16.204 INFO 1 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Creating filter chain: any request, [org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@4ef5dd23, org.springframework.security.web.context.SecurityContextPersistenceFilter@582dcd35, org.springframework.security.web.header.HeaderWriterFilter@6a5dd083, org.springframework.security.web.csrf.CsrfFilter@50a7c72b, org.springframework.security.web.authentication.logout.LogoutFilter@62735b13, io.mixeway.jwt.JwtRequestFilter@787e4357, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@394a6d2b, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@55adcf9e, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@163e8949, org.springframework.security.web.session.SessionManagementFilter@1d17423f, org.springframework.security.web.access.ExceptionTranslationFilter@6e00837f]
MixerBackend | 2023-08-15 14:59:16.238 INFO 1 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
MixerBackend | 2023-08-15 14:59:16.545 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Using default implementation for ThreadExecutor
MixerBackend | 2023-08-15 14:59:16.563 INFO 1 --- [ main] org.quartz.core.SchedulerSignalerImpl : Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
MixerBackend | 2023-08-15 14:59:16.563 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Quartz Scheduler v.2.3.2 created.
MixerBackend | 2023-08-15 14:59:16.564 INFO 1 --- [ main] org.quartz.simpl.RAMJobStore : RAMJobStore initialized.
MixerBackend | 2023-08-15 14:59:16.565 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler meta-data: Quartz Scheduler (v2.3.2) 'quartzScheduler' with instanceId 'NON_CLUSTERED'
MixerBackend | Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
MixerBackend | NOT STARTED.
MixerBackend | Currently in standby mode.
MixerBackend | Number of jobs executed: 0
MixerBackend | Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
MixerBackend | Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
MixerBackend |
MixerBackend | 2023-08-15 14:59:16.565 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler 'quartzScheduler' initialized from an externally provided properties instance.
MixerBackend | 2023-08-15 14:59:16.565 INFO 1 --- [ main] org.quartz.impl.StdSchedulerFactory : Quartz scheduler version: 2.3.2
MixerBackend | 2023-08-15 14:59:16.567 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : JobFactory set to: org.springframework.scheduling.quartz.SpringBeanJobFactory@113eed88
MixerBackend | 2023-08-15 14:59:16.780 WARN 1 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
MixerBackend | 2023-08-15 14:59:16.782 INFO 1 --- [ main] o.s.s.quartz.SchedulerFactoryBean : Shutting down Quartz Scheduler
MixerBackend | 2023-08-15 14:59:16.783 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutting down.
MixerBackend | 2023-08-15 14:59:16.783 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED paused.
MixerBackend | 2023-08-15 14:59:16.783 INFO 1 --- [ main] org.quartz.core.QuartzScheduler : Scheduler quartzScheduler_$_NON_CLUSTERED shutdown complete.
MixerBackend | 2023-08-15 14:59:16.785 INFO 1 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
MixerBackend | 2023-08-15 14:59:16.803 INFO 1 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
MixerBackend | 2023-08-15 14:59:16.804 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated...
MixerBackend | 2023-08-15 14:59:16.851 INFO 1 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed.
MixerBackend | 2023-08-15 14:59:16.857 INFO 1 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
MixerBackend | 2023-08-15 14:59:16.878 INFO 1 --- [ main] ConditionEvaluationReportLoggingListener :
MixerBackend |
MixerBackend | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
MixerBackend | 2023-08-15 14:59:16.902 ERROR 1 --- [ main] o.s.boot.SpringApplication : Application run failed
MixerBackend |
MixerBackend | org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) [spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at io.mixeway.MixeWayApp.main(MixeWayApp.java:25) [classes!/:1.7.2]
MixerBackend | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_212]
MixerBackend | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_212]
MixerBackend | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_212]
MixerBackend | at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_212]
MixerBackend | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [app.jar:1.7.2]
MixerBackend | at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) [app.jar:1.7.2]
MixerBackend | at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [app.jar:1.7.2]
MixerBackend | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:88) [app.jar:1.7.2]
MixerBackend | Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
MixerBackend | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) ~[spring-context-5.2.15.RELEASE.jar!/:5.2.15.RELEASE]
MixerBackend | ... 22 common frames omitted
MixerBackend | Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
MixerBackend | at org.apache.catalina.core.StandardService.addConnector(StandardService.java:243) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.3.12.RELEASE.jar!/:2.3.12.RELEASE]
MixerBackend | ... 24 common frames omitted
MixerBackend | Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
MixerBackend | at org.apache.catalina.connector.Connector.startInternal(Connector.java:1075) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.catalina.core.StandardService.addConnector(StandardService.java:239) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | ... 26 common frames omitted
MixerBackend | Caused by: java.lang.IllegalArgumentException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
MixerBackend | at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:99) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:258) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1204) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1290) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:614) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.catalina.connector.Connector.startInternal(Connector.java:1072) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | ... 28 common frames omitted
MixerBackend | Caused by: java.io.IOException: parseAlgParameters failed: ObjectIdentifier() -- data isn't an object ID (tag = 48)
MixerBackend | at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:816) ~[na:1.8.0_212]
MixerBackend | at sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2018) ~[na:1.8.0_212]
MixerBackend | at java.security.KeyStore.load(KeyStore.java:1445) ~[na:1.8.0_212]
MixerBackend | at org.apache.tomcat.util.security.KeyStoreUtil.load(KeyStoreUtil.java:67) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.SSLUtilBase.getStore(SSLUtilBase.java:216) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.SSLHostConfigCertificate.getCertificateKeystore(SSLHostConfigCertificate.java:207) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:282) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:246) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:97) ~[tomcat-embed-core-9.0.46.jar!/:na]
MixerBackend | ... 34 common frames omitted
MixerBackend | Caused by: java.io.IOException: ObjectIdentifier() -- data isn't an object ID (tag = 48)
MixerBackend | at sun.security.util.ObjectIdentifier.<init>(ObjectIdentifier.java:257) ~[na:1.8.0_212]
MixerBackend | at sun.security.util.DerInputStream.getOID(DerInputStream.java:314) ~[na:1.8.0_212]
MixerBackend | at com.sun.crypto.provider.PBES2Parameters.engineInit(PBES2Parameters.java:267) ~[sunjce_provider.jar:1.8.0_212]
MixerBackend | at java.security.AlgorithmParameters.init(AlgorithmParameters.java:293) ~[na:1.8.0_212]
MixerBackend | at sun.security.pkcs12.PKCS12KeyStore.parseAlgParameters(PKCS12KeyStore.java:812) ~[na:1.8.0_212]
MixerBackend | ... 42 common frames omitted
MixerBackend |
MixerBackend exited with code 1
Hi, I have the same problem,
@564008975 @alexmartz001
I have just released v1.8.0 with updated trust.jks
that might be causing problems.
I have just tested this setup with:
docker-compose version
docker-compose version 1.25.0, build unknown
docker-py version: 4.1.0
CPython version: 3.9.2
OpenSSL version: OpenSSL 1.1.1n 15 Mar 2022
and OS:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 11 (bullseye)
Release: 11
Codename: bullseye
Run into the same issue when testing. I did not spend much time looking into the detail but modifying openssl with the "-legacy" tag solved the issue for me.
openssl pkcs12 -export -inkey pki/private.key -in pki/cert.crt -out pki/certificate.p12 -name "$CN" -password pass:$P12PASS -legacy
MacOS 14.3 ,
Docker Compose version v2.23.3
OpenSSL 3.2.1 30 Jan 2024 (Library: OpenSSL 3.2.1 30 Jan 2024)
@hackarada thanks for pointing this out. I confirm that this line in setup.sh script is causing the problem related with usage of keys that cannot be properly parsed in the application - i will try to introduce a fix
Hi! I'm trying to install, however got an error on startup the backend. Please help to check it. Thanks!
Environment:
Other:
Startup log: