Skip to content
This repository has been archived by the owner on Nov 5, 2019. It is now read-only.

Unable to start Docker Container #2

Closed
saturnism opened this issue Jul 25, 2018 · 28 comments
Closed

Unable to start Docker Container #2

saturnism opened this issue Jul 25, 2018 · 28 comments

Comments

@saturnism
Copy link

2018-07-25 01:49:59.558  WARN 7 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'zipkinServerConfiguration': Unsatisfied dependency expressed through field 'httpCollector'; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'zipkinHttpCollector' defined in file [/zipkin/BOOT-INF/classes/zipkin/server/internal/ZipkinHttpCollector.class]: Unsatisfied dependency expressed through constructor parameter 0; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'storage' defined in class path resource [zipkin/autoconfigure/storage/stackdriver/ZipkinStackdriverStorageAutoConfiguration.class]: Unsatisfied dependency expressed through method 'storage' parameter 2; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managedChannel' defined in class path resource [zipkin/autoconfigure/storage/stackdriver/ZipkinStackdriverStorageAutoConfiguration.class]: Bean instantiation via factory method failed; 
nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.grpc.ManagedChannel]: Factory method 'managedChannel' threw exception; nested exception is java.lang.IllegalStateException: OpenSsl required
@saturnism
Copy link
Author

/cc @adriancole

@codefromthecrypt
Copy link

will take a look tomorrow first thing. missed it!

@saturnism
Copy link
Author

Thanks! I was having trouble tracing back the container used. Is it using Alpine by any chance? If so.. that could explain the issue.

@codefromthecrypt
Copy link

codefromthecrypt commented Aug 8, 2018 via email

@codefromthecrypt
Copy link

pushing image zipkin-gcp 0.7.0 now

@codefromthecrypt
Copy link

if you don't mind, can you q/a for me once it is on dockerhub? I am watching now, so if there's a problem i will see and dig

@saturnism
Copy link
Author

i just gave 0.7.0 tag a try, but seeing the same issue. I think the base image is still alpine.

I haven't been able to trace the root base image:

FROM openzipkin/zipkin:2.11.1
...
RUN apk add unzip <- this still looks like alpine based distribution
...

@codefromthecrypt
Copy link

the base images is this https://github.com/openzipkin/docker-jre-full

I will try to run and see

@codefromthecrypt
Copy link

It is failing on OpenSsl required. Our base image for very long time has been alpine. Perhaps there's a package missing or something new in a later version of grpc that wasn't the case earlier

@codefromthecrypt
Copy link

I'm very much hoping that netty/netty-tcnative#111 isn't true and grpc isn't unsupported on alpine :P

@saturnism say it ain't so!

cc @openzipkin/devops-tooling

@saturnism
Copy link
Author

afaik, it never supported alpine's libmusl :(
https://github.com/grpc/grpc-java/blob/master/SECURITY.md#troubleshooting <- I wrote most of this ;)

For smaller images, I'd recommend openjdk:8-jre-slim, or gcr.io/distroless/java :(

@codefromthecrypt
Copy link

codefromthecrypt commented Aug 9, 2018 via email

@codefromthecrypt
Copy link

codefromthecrypt commented Aug 9, 2018 via email

@saturnism
Copy link
Author

Makes sense!

The other option is to add glibc to this image. but i don't think there is official support.

In the past we had a stackdriver zipkin proxy image that was hosted on gcr.io. That one worked for sure.

Thanks for taking a look!

@codefromthecrypt
Copy link

one of the things I believe google should be doing while promoting gcp is doing more to help norman. For example, this PR could have gotten alpine.. when there's a surge of demand on projects like netty, it could be good to dig in and help netty/netty-tcnative#252

if that happened, we'd probably have no dillemma right now, but there's still a chance to change the future :) @saturnism can you take this feedback to google? :P

@codefromthecrypt
Copy link

opened openzipkin/docker-java#9 to track us moving our base image to JRE 11, which will obviate the ssl concern

@codefromthecrypt
Copy link

I am testing images.. so far zipkin-gcp up to 0.6.0 works. I think something changed where possibly falling back when openssl isn't available changed to crash the server

@codefromthecrypt
Copy link

zipkin-gcp 0.6.2 works, it started crashing in 0.6.3

@codefromthecrypt
Copy link

so this happened when we upgraded from grpc 1.11.0 to 1.13.1. One way out is to revert that.. this is the easiest. then we just upgrade later

@codefromthecrypt
Copy link

screen shot 2018-08-09 at 1 33 00 pm

so this is from the 0.6.2 image

@codefromthecrypt
Copy link

checking to see if this is related to us changing to a different alpine image, which is entirely possible

@codefromthecrypt
Copy link

ok we are getting somewhere.. our base zipkin image switch from zulu to openjdk jre (both alpine) starting with zipkin 2.9.4.

Must be that the zulu image had openssl else the error would have occurred much earlier
https://github.com/openzipkin/zipkin-gcp/blob/master/autoconfigure/storage-stackdriver/src/main/java/zipkin/autoconfigure/storage/stackdriver/ZipkinStackdriverStorageAutoConfiguration.java#L83

@codefromthecrypt
Copy link

so the original image depended on, so this is why it worked https://hub.docker.com/r/frolvlad/alpine-glibc/~/dockerfile/

@codefromthecrypt
Copy link

Spoke with @anuraaga. We are going to save ourselves some time by using ALPN bootstrap for now. Later, we can just update to JDK 11. openzipkin/zipkin-gcp#91

@codefromthecrypt
Copy link

tested with a local docker build and works

@codefromthecrypt
Copy link

ok 0.7.1 should fix this. thanks especially @anuraaga for helping find a way out of this problem without implying lot of temporary image reshuffling.

@codefromthecrypt
Copy link

tested published image, so hopefully also works for others!

@saturnism
Copy link
Author

Yay! That started off fine. Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants