openzipkin / zipkin

Zipkin is a distributed tracing system
https://zipkin.io/
Apache License 2.0
17.02k stars 3.09k forks source link

ZIpkin 2.32.2 - SSL activation issue :: Error creating bean with name 'armeriaServer' #3342

Open petr-hybler opened 3 years ago

petr-hybler commented 3 years ago

Hello guys, I have the latest version of Zipkin Installed ... it works great ....

I wanted to activate the SSL based on this issue: https://github.com/openzipkin/zipkin/issues/2627

When I run that manually:

sudo java -jar /opt/zipkin/zipkin.jar --armeria.ssl.key-store=zipkin.p12 --armeria.ssl.key-store-type=PKCS12 --armeria.ssl.key-store-password=******--armeria.ssl.key-alias=zipkin --armeria.ssl.enabled=true --armeria.ports[0].port=9411 --armeria.ports[0].protocols[0]=https

But I wanted to make it as a systemd service

zipkin.service:

# Zipkin System Service [Unit] Description=Managa Java service Documentation=https://zipkin.io/ [Service] WorkingDirectory=/opt/zipkin

no ssl

ExecStart=/usr/bin/java -Xms128m -Xmx256m -jar zipkin.jar

w/ ssl

ExecStart=/usr/bin/java -Xms128m -Xmx256m -jar zipkin.jar --armeria.ssl.key-store=zipkin.p12 --armeria.ssl.key-store-type=PKCS12 --armeria.ssl.key-store-password=** --armeria.ssl.key-alias=zipkin --armeria.ssl.enabled=true --armeria.ports[0].port=9411 --armeria.ports[0].protocols[0]=https User=zipkin Group=zipkin Type=simple Restart=on-failure RestartSec=10 [Install] WantedBy=multi-user.target

the former version (#no ssl) works fine .. the latter does not ...

journalctl says:

-- Logs begin at Thu 2020-12-03 19:04:13 PST, end at Wed 2021-01-13 17:36:46 PST. -- Jan 11 19:01:01 my-server-name systemd[1]: Started Managa Java service. Jan 11 19:01:02 my-server-name java[107888]: oo Jan 11 19:01:02 my-server-name java[107888]: oooo Jan 11 19:01:02 my-server-name java[107888]: oooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooooooo Jan 11 19:01:02 my-server-name java[107888]: ooooooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo o o oooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo oo oo oooooo Jan 11 19:01:02 my-server-name java[107888]: ooooooo oooo oooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo ooooo ooooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooo oooooo oooooo ooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooo oo oo oooooooo Jan 11 19:01:02 my-server-name java[107888]: ooooooooooooo oo oo ooooooooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooooooo oooooooooooo Jan 11 19:01:02 my-server-name java[107888]: oooooooo oooooooo Jan 11 19:01:02 my-server-name java[107888]: oooo oooo Jan 11 19:01:02 my-server-name java[107888]: ____ Jan 11 19:01:02 my-server-name java[107888]: | / | | |/ / | \ | | Jan 11 19:01:02 my-server-name java[107888]: / / | || |) | ' / | || | | Jan 11 19:01:02 my-server-name java[107888]: / /_ | || /| . \ | || |\ | Jan 11 19:01:02 my-server-name java[107888]: |__|_|| ||___|| _| Jan 11 19:01:02 my-server-name java[107888]: :: version 2.23.2 :: commit 7bf3aab :: Jan 11 19:01:06 my-server-name java[107888]: 2021-01-11 19:01:06.441 WARN [/] 107888 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context Jan 11 19:01:06 my-server-name java[107888]: 2021-01-11 19:01:06.453 INFO [/] 107888 --- [ main] ConditionEvaluationReportLoggingListener : Jan 11 19:01:06 my-server-name java[107888]: Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. Jan 11 19:01:06 my-server-name java[107888]: 2021-01-11 19:01:06.472 ERROR [/] 107888 --- [ main] o.s.b.SpringApplication : Application run failed Jan 11 19:01:06 my-server-name java[107888]: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'armeriaServer' defined in com.linecorp.armeria.spring. Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) ~[spring-beans-5.3.2.jar!/:5.3.2] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:638) ~[spring-beans-5. Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFacto Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:117 Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:571) ~[sp Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:531) ~[spri Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.2.jar!/:5 Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5 Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.2.jar!/:5.3.2] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.2.jar!/:5.3.2] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) ~[spring Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:923) ~[sprin Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:588) ~[spring-context-5.3.2.jar!/:5. Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767) ~[spring-boot-2.4.1.jar!/:2.4.1] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759) [spring-boot-2.4.1.jar!/:2.4.1] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426) [spring-boot-2.4.1.jar!/:2.4.1] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.boot.SpringApplication.run(SpringApplication.java:326) [spring-boot-2.4.1.jar!/:2.4.1] Jan 11 19:01:06 my-server-name java[107888]: at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144) [spring-boot-2.4.1.jar!/:2.4.1] Jan 11 19:01:06 my-server-name java[107888]: at zipkin.server.ZipkinServer.main(ZipkinServer.java:56) [classes!/:?]

any idea what is going on?

jorgheymans commented 3 years ago

The stacktrace seems incomplete, can you paste the complete one ?

qzmer1104 commented 2 years ago

add config in application.properties or yml

server.compression.enabled=false or server.compression.enabled=false

NPE happen in ZipkinUiAutoConfiguration