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

[Demo] Fix UnknownHostException: host.docker.internal in docker demo #430

Merged
merged 1 commit into from May 13, 2024

Conversation

daragu
Copy link
Contributor

@daragu daragu commented Apr 30, 2024

Important Read

Fixed #429

What is the purpose of the pull request

Fix UnknownHostException: host.docker.internal in docker demo under Linux OS.

MetaException(message:Could not connect to meta store using any of the URIs provided. Most recent failure: org.apache.thrift.transport.TTransportException: java.net.UnknownHostException: host.docker.internal
	at org.apache.thrift.transport.TSocket.open(TSocket.java:226)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.open(HiveMetaStoreClient.java:478)
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.<init>(HiveMetaStoreClient.java:245)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.newInstance(MetaStoreUtils.java:1740)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.<init>(RetryingMetaStoreClient.java:83)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:133)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:104)
	at org.apache.hadoop.hive.metastore.RetryingMetaStoreClient.getProxy(RetryingMetaStoreClient.java:97)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.apache.iceberg.common.DynMethods$UnboundMethod.invokeChecked(DynMeth

Brief change log

We can use docker container hostname.

Verify this pull request

locally.

@xtable-bot
Copy link

CI report:

Bot commands @xtable-bot supports the following commands:
  • @xtable-bot run azure re-run the last Azure build

@daragu
Copy link
Contributor Author

daragu commented May 8, 2024

hi @the-other-tim-brown can you take a look, please?

@daragu
Copy link
Contributor Author

daragu commented May 11, 2024

hi @vinishjail97 can you help to take a look? thanks

@the-other-tim-brown
Copy link
Contributor

I have 127.0.0.1 kubernetes.docker.internal added to /etc/hosts, I'm guessing that is how I'm able to make this work without these changes. I will try this out though on my machine and validate it works with the updates

@the-other-tim-brown
Copy link
Contributor

I'm running into java.io.FileNotFoundException: File file:/home/data/db/hudi_dimCustomer/metadata/00001-64637ad8-218d-496d-aa33-52db8188727b.metadata.json does not exist right now. @daragu did you ever see something similar?

@vinishjail97
Copy link
Contributor

I'm not able to re-produce the issue from my side, added a comment on the issue.
#429 (comment)

@daragu
Copy link
Contributor Author

daragu commented May 13, 2024

I'm not able to re-produce the issue from my side, added a comment on the issue. #429 (comment)

hi @vinishjail97, I think host.docker.internal is effective in Docker Desktop environment, but not in systems such as Linux.

https://docs.docker.com/desktop/networking/#i-want-to-connect-from-a-container-to-a-service-on-the-host

Copy link
Contributor

@the-other-tim-brown the-other-tim-brown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@daragu can you squash your commits? I was able to confirm this is working after resetting some things on my local env.

@daragu
Copy link
Contributor Author

daragu commented May 13, 2024

@daragu can you squash your commits? I was able to confirm this is working after resetting some things on my local env.

Done, thanks.

@the-other-tim-brown the-other-tim-brown merged commit 3352098 into apache:main May 13, 2024
@daragu daragu deleted the net branch May 13, 2024 08:31
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

Successfully merging this pull request may close these issues.

[Bug] Fix UnknownHostException: host.docker.internal in docker demo
4 participants