Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UnknownHostException: : Name or service not known on glibc 11.0.2 image #6

Closed
Ivanbmstu opened this issue Apr 1, 2019 · 5 comments
Closed
Assignees

Comments

@Ivanbmstu
Copy link

Ivanbmstu commented Apr 1, 2019

I have spring boot application with logback.groovy as logging configuration.

Launching application on alpine musl 11.0.2 image everything works well.
But launching same app throws exception on start while using glibc 11.0.2 image.
Am i using wrong glibc alpine image or something wrong with image itself?

repo to reproduce https://github.com/Ivanbmstu/bellsoft_glibc_alpine_error.git
run glibc-alpine-build.sh to build glibc docker image with app
run musl-alpine-build.sh to build musl docker image with app

with glibc check: docker run -p 8080:8080 alpine-sb2-logback-glibc java -jar /app.jar --logging.config=/logback.groovy
with musl check: docker run -p 8080:8080 alpine-sb2-logback-musl java -jar /app.jar --logging.config=/logback.groovy

exception in attachment

exception.txt

It is also possible to call endpoint inside application (e.g. curl localhost:8080/), it call InetAddress addr = InetAddress.getLocalHost(); which throws java.net.UnknownHostException.

PS. вам на русском issue писать можно?)

@den1ska
Copy link
Collaborator

den1ska commented Apr 1, 2019

Thank you for the bug report. I identified the issue and am working on it.

@den1ska
Copy link
Collaborator

den1ska commented Apr 1, 2019

For now I could offer you a simple workaround, run the following command from the console:

echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' > /etc/nsswitch.conf

If you build images yourself, this should work as well, just add

RUN echo 'hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4' > /etc/nsswitch.conf

into your Dockerfile.

Later we will provide new images and Dockerfiles addressing this issue. Thank you.

@Ivanbmstu
Copy link
Author

Thanks a lot for fast response. I think we will wait for your new images :)
How much time approximately will it take?

@den1ska
Copy link
Collaborator

den1ska commented Apr 1, 2019

Aiming to finish testing and roll out the updated images tomorrow.

@den1ska
Copy link
Collaborator

den1ska commented Apr 2, 2019

Fixed by f48c638 854e67f. Alpine images are up-to-date.

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

No branches or pull requests

2 participants