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

java.net.UnknownHostException during basic test execution #1

Open
Florian9M opened this issue Aug 13, 2024 · 3 comments
Open

java.net.UnknownHostException during basic test execution #1

Florian9M opened this issue Aug 13, 2024 · 3 comments

Comments

@Florian9M
Copy link

Environment

  • OS: Windows 11
  • Java: 17.0.10
  • Geomesa: 5.0.0

Issue

An exception occurs when launching a basic test with the following message:
java.net.UnknownHostException: fae11ce07818

Description

I'm encountering this hostname resolution error, which seems to block the test execution. Does anyone have any insights on the possible cause or suggestions for resolving this issue?

Below you can find the related code and stack trace:
Code and Stacktrace

@elahrvivaz
Copy link
Member

It seems like your local machine is not able to resolve the hostname of the docker container. When I pause the test and exec into the running container, hostname -f matches my local machine, so it tries to connect to my local machine, which then through the exposed port connects to the Accumulo instance. This seems to be the same behavior on github actions, FWIW. If that isn't the case on your setup, then you will probably need to configure your system so that accumulo.local resolves to localhost/127.0.0.1, then add to the container in your test code:
.withEnv("UNO_HOST", "accumulo.local")

You might also try upgrading to version 1.4.1, and adding slf4j-simple as a dependency so that logging works, which might provide more details.

@Florian9M
Copy link
Author

Thanks for the reply, I'll look into it

@elahrvivaz
Copy link
Member

Actually instead of using accumulo.local, you might be able to do .withEnv("UNO_HOST", System.getenv("HOSTNAME")) - I'm not entirely sure that won't cause weird conflicts though. It also might depend on if your docker daemon is running as root or was installed rootless.

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