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: bucket.s3-region.amazonaws.com #81

Open
gquintana opened this issue Sep 13, 2017 · 0 comments
Open

UnknownHostException: bucket.s3-region.amazonaws.com #81

gquintana opened this issue Sep 13, 2017 · 0 comments

Comments

@gquintana
Copy link

When I use S3FS from an application deployed inside Elastic Beanstalk Java, I get this strange error:

java.net.UnknownHostException: elasticbeanstalk-xxxxxxxxxx.s3-us-east-1.amazonaws.com
	java.net.InetAddress.getAllByName0(InetAddress.java:1280)
	java.net.InetAddress.getAllByName(InetAddress.java:1192)
	java.net.InetAddress.getAllByName(InetAddress.java:1126)
	com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27)
	com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38)
	org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:111)
	org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:353)
	sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	java.lang.reflect.Method.invoke(Method.java:498)
	com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
	com.amazonaws.http.conn.$Proxy37.connect(Unknown Source)
	org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:380)
	org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
	org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:184)
	org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
	org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
	org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:55)
	com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1181)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1030)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:742)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:716)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:699)
	com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:667)
	com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:649)
	com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:513)
	com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4191)
	com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4138)
	com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1257)
	com.amazonaws.services.s3.AmazonS3Client.getObjectMetadata(AmazonS3Client.java:1233)
	com.upplication.s3fs.util.S3Utils.getS3ObjectSummary(S3Utils.java:36)
	com.upplication.s3fs.S3FileSystemProvider.exists(S3FileSystemProvider.java:620)
	com.upplication.s3fs.S3FileSystemProvider.checkAccess(S3FileSystemProvider.java:465)
	java.nio.file.Files.exists(Files.java:2385)

elasticbeanstalk-xxxxxxxxxx is the bucket name.

The workaround is to provide an access key/secret key and put the access key in the S3 URL.
But it's not convenient.

@gquintana gquintana changed the title UnknownHostException: bucket.amazonaws.com UnknownHostException: bucket.s3-region.amazonaws.com Sep 13, 2017
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

1 participant