kochetkov-ma / allure-server

Allure Server. Save/ generate / provide allure2 reports in one place
http://allure.iopump.ru
Apache License 2.0
208 stars 62 forks source link

Can't run Allure Server jar for https #69

Closed Reksy closed 1 year ago

Reksy commented 1 year ago

Hello!

I have a problem with running the Allure.jar on Windows machine. I configured application.yml file like that server: ssl: key-store: allurekeystore.p12 key-store-password: changeit key-store-type: pkcs12 key-alias: allurecert key-password: changeit port: 8443

I imported machines' certificate into a allurekeystore.p12 and checked it via command.

But when I run the allure.jar an error occured:

java -jar allure-server.jar

. _ _ /\ / '_ () \ \ \ \ ( ( )\ | ' | '| | ' \/ ` | \ \ \ \ \/ _)| |)| | | | | || (| | ) ) ) ) ' |__| .|| ||| |\, | / / / / =========|_|==============|__/=//// :: Spring Boot :: (v2.7.1)

2023-04-26 14:13:43.713 INFO 13472 --- [ main] ru.iopump.qa.allure.Application : Starting Application using Java 20.0.1 on hqsp16dev5 with PID 13472 (C:\allure\allure-server.jar started by secret in C:\allure) 2023-04-26 14:13:43.717 INFO 13472 --- [ main] ru.iopump.qa.allure.Application : No active profile set, falling back to 1 default profile: "default" 2023-04-26 14:13:46.001 INFO 13472 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode. 2023-04-26 14:13:46.141 INFO 13472 --- [ main] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 135 ms. Found 1 JPA repository interfaces. 2023-04-26 14:13:47.734 INFO 13472 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8443 (https) 2023-04-26 14:13:47.750 INFO 13472 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat] 2023-04-26 14:13:47.750 INFO 13472 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.64] 2023-04-26 14:13:47.969 INFO 13472 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext 2023-04-26 14:13:47.969 INFO 13472 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 4090 ms 2023-04-26 14:13:48.516 INFO 13472 --- [ main] c.v.f.s.VaadinServletContextInitializer : Search for VaadinAppShell took 117 ms 2023-04-26 14:13:49.016 INFO 13472 --- [ main] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default] 2023-04-26 14:13:49.188 INFO 13472 --- [ main] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.9.Final 2023-04-26 14:13:49.578 INFO 13472 --- [ main] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final} 2023-04-26 14:13:49.781 INFO 13472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting... 2023-04-26 14:13:50.063 INFO 13472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed. 2023-04-26 14:13:50.109 INFO 13472 --- [ main] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect 2023-04-26 14:13:51.306 INFO 13472 --- [ main] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform] 2023-04-26 14:13:51.322 INFO 13472 --- [ main] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default' 2023-04-26 14:13:51.399 INFO 13472 --- [ main] r.i.q.a.properties.AllureProperties : [ALLURE SERVER CONFIGURATION] Main AllureProperties parameters: AllureProperties(reports=AllureProperties.Reports(dirPath=allure\reports, dir=allure/reports/, path=reports/, historyLevel=20), resultsDir=allure/results/, supportOldFormat=false, dateFormat=yy/MM/dd HH:mm:ss, serverBaseUrl=) 2023-04-26 14:13:52.477 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found plugins directory allure\plugins 2023-04-26 14:13:52.587 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=behaviors, name=Behaviors aggregator, description=The aggregator adds behaviors tab to the report, extensions=[io.qameta.allure.behaviors.BehaviorsPlugin], jsFiles=[index.js], cssFiles=[]) plugin 2023-04-26 14:13:52.587 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=custom-logo, name=Custom logo aggregator, description=The aggregator replaces default Allure logo with a custom one, extensions=[], jsFiles=[], cssFiles=[styles.css]) plugin 2023-04-26 14:13:52.602 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=jira, name=Jira Plugin, description=The plugin that adds support for Jira integration., extensions=[io.qameta.allure.jira.JiraExportPlugin], jsFiles=[], cssFiles=[]) plugin 2023-04-26 14:13:52.618 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=packages, name=Packages aggregator, description=The aggregator adds packages tab to the report, extensions=[io.qameta.allure.packages.PackagesPlugin], jsFiles=[index.js], cssFiles=[]) plugin 2023-04-26 14:13:52.618 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=screen-diff, name=Screen diff, description=Who cares about description by just-boris, extensions=[], jsFiles=[index.js], cssFiles=[styles.css]) plugin 2023-04-26 14:13:52.649 INFO 13472 --- [ main] r.i.q.a.helper.AllureReportGenerator : Found PluginConfiguration(id=xray, name=Xray Plugin, description=The plugin that adds support for Xray integration., extensions=[io.qameta.allure.xray.XrayTestRunExportPlugin], jsFiles=[], cssFiles=[]) plugin 2023-04-26 14:13:53.274 INFO 13472 --- [ main] r.i.q.a.s.CleanUpServiceConfiguration : [ALLURE SERVER CONFIGURATION] CleanUp policy settings: { "dryRun" : false, "time" : "00:00:00", "ageDays" : 90, "paths" : [ { "path" : "manual_uploaded", "ageDays" : 30, "edgeDate" : "2023-03-27T14:13:53.2747458" } ], "minAge" : 30, "edgeDate" : "2023-01-26T14:13:53.2747458", "notDryRun" : true, "closestEdgeDate" : "2023-03-27T14:13:53.2747458" } 2023-04-26 14:13:53.352 INFO 13472 --- [ main] r.i.q.allure.properties.BasicProperties : [ALLURE SERVER CONFIGURATION] Authorization parameters: BasicProperties(username=admin, enable=false) 2023-04-26 14:13:53.680 WARN 13472 --- [ main] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning 2023-04-26 14:13:54.274 INFO 13472 --- [ main] o.s.s.web.DefaultSecurityFilterChain : Will secure any request with [org.springframework.security.web.session.DisableEncodeUrlFilter@53ed80d3, org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter@6ba060f3, org.springframework.security.web.context.SecurityContextPersistenceFilter@ceddaf8, org.springframework.security.web.header.HeaderWriterFilter@21a02556, org.springframework.security.web.authentication.logout.LogoutFilter@167381c7, org.springframework.security.web.savedrequest.RequestCacheAwareFilter@1db87583, org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter@7978e022, org.springframework.security.web.authentication.AnonymousAuthenticationFilter@7c51782d, org.springframework.security.web.session.SessionManagementFilter@1945113f, org.springframework.security.web.access.ExceptionTranslationFilter@3003e580] 2023-04-26 14:13:57.596 WARN 13472 --- [ 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 2023-04-26 14:13:57.596 INFO 13472 --- [ main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default' 2023-04-26 14:13:57.596 INFO 13472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown initiated... 2023-04-26 14:13:57.627 INFO 13472 --- [ main] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Shutdown completed. 2023-04-26 14:13:57.627 INFO 13472 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2023-04-26 14:13:57.674 INFO 13472 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2023-04-26 14:13:57.752 ERROR 13472 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.21.jar!/:5.3.21] at java.base/java.lang.Iterable.forEach(Iterable.java:75) ~[na:na] at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:935) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.21.jar!/:5.3.21] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:308) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) ~[spring-boot-2.7.1.jar!/:2.7.1] at ru.iopump.qa.allure.Application.main(Application.java:23) ~[classes!/:na] at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104) ~[na:na] at java.base/java.lang.reflect.Method.invoke(Method.java:578) ~[na:na] at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) ~[allure-server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) ~[allure-server.jar:na] at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) ~[allure-server.jar:na] at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:65) ~[allure-server.jar:na] Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:178) ~[spring-context-5.3.21.jar!/:5.3.21] ... 20 common frames omitted Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed at org.apache.catalina.core.StandardService.addConnector(StandardService.java:238) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.7.1.jar!/:2.7.1] at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.7.1.jar!/:2.7.1] ... 22 common frames omitted Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed at org.apache.catalina.connector.Connector.startInternal(Connector.java:1077) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.catalina.core.StandardService.addConnector(StandardService.java:234) ~[tomcat-embed-core-9.0.64.jar!/:na] ... 24 common frames omitted Caused by: java.lang.IllegalArgumentException: Alias name [allurecert] does not identify a key entry at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:107) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.AbstractJsseEndpoint.initialiseSsl(AbstractJsseEndpoint.java:71) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:234) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1227) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1313) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:614) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.catalina.connector.Connector.startInternal(Connector.java:1074) ~[tomcat-embed-core-9.0.64.jar!/:na] ... 26 common frames omitted Caused by: java.io.IOException: Alias name [allurecert] does not identify a key entry at org.apache.tomcat.util.net.SSLUtilBase.getKeyManagers(SSLUtilBase.java:337) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.SSLUtilBase.createSSLContext(SSLUtilBase.java:247) ~[tomcat-embed-core-9.0.64.jar!/:na] at org.apache.tomcat.util.net.AbstractJsseEndpoint.createSSLContext(AbstractJsseEndpoint.java:105) ~[tomcat-embed-core-9.0.64.jar!/:na] ... 32 common frames omitted

I am new in this.

Can you please give me a piece of advice what's going on in this case?

Thanks a bunch!

kochetkov-ma commented 1 year ago

It doesn't work directly with HTTPS because in common situation you should configure external API gateway to handle and route all requests, also manage ssl connection. For example in Kubernetes you may use Ingress or something like Ambassador gateway. AWS and others cloud solutions provide the same services.