hyness / spring-cloud-config-server

Docker build of the spring-cloud-config-server
Apache License 2.0
74 stars 54 forks source link

jdk11 image reports invalid application.yml #23

Closed tkgregory closed 4 years ago

tkgregory commented 4 years ago

I've been running images over the last 2 days hyness/spring-cloud-config-server:jdk11. I'm adding an application.yml inside the image. Sometimes the image runs fine, sometimes not. The reported error is:

***************************
APPLICATION FAILED TO START
***************************

Description:

Invalid config server configuration.

The application.yml file is not changing between when the image runs and when it doesn't.

I've done a diff between the the image that works and one that doesn't and I can see these changes in \opt\spring-cloud-config-server\entrypoint.sh.

-java -cp /opt/spring-cloud-config-server ${JAVA_OPTS} org.springframework.boot.loader.JarLauncher \
+java ${JAVA_OPTS} org.springframework.boot.loader.JarLauncher \

I suspect that different images are being tagged with jdk11 as I can see there is some development underway in this project. Would that be the case?

Thanks in advance, and great work on this project by the way!

hyness commented 4 years ago

There was a bug introduced when I upgraded the image to 2.2.4.RELEASE. That release also included a switch for this image to use Spring Boot Docker Layers which should help this image pull faster and use less disk space. The change that you found in entrypoint.sh caused the /config directory to be ignored. The bug was fixed yesterday and new images were built. You should be able to pull on the jdk11 or any of the other tags and it should work now.

I'm confused by this statement

The application.yml file is not changing between when the image runs and when it doesn't.

Are you saying it was broken for two days and now it's fixed? It reads to me like it's intermittently breaking between runs, which I'm sure not how that could happen. I just pulled that tag and ran a test which passed.

I suspect that different images are being tagged with jdk11 as I can see there is some development underway in this project. Would that be the case?

Yes, the jdk11 tag is equivalent to the latest but runs the image with jdk 11. You will need to periodically pull to get changes.

Thanks for the kind words

tkgregory commented 4 years ago

Thanks @hyness this makes sense. I don't have the exact timings to hand but I can verify that things are working as expected now. for 2.2.4.RELEASE-jdk11. I'll close this issue.