I am having a weird issue when I am trying to use vfs-s3 and connect to a bucket which is residing in us-east-1 region. It gives me errors as follow. But apart from this all other region buckets gives me correct information. Below is the java code and the output for failure request. any help will be much appreciated.
amz-sdk-invocation-id;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"
01:05:45.916 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 String to Sign: '"AWS4-HMAC-SHA256
20230705T200545Z
20230705/us-east-1/s3/aws4_request
264723118766e4a56d8a302b9a3cbe46965f4c59ca7fa110542a25314f5f397d"
01:05:45.917 [main] DEBUG com.amazonaws.auth.AWS4Signer - Generating a new signing key as the signing key not available in the cache for the date 1688515200000
01:05:45.934 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
01:05:45.941 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
01:05:45.941 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
01:05:45.954 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
01:05:45.955 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->https://s3-us-east-1.amazonaws.com:443
01:05:46.042 [main] DEBUG com.amazonaws.http.conn.ClientConnectionManagerFactory -
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
at com.amazonaws.http.conn.$Proxy2.connect(Unknown Source)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1323)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1139)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:796)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:764)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:738)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:698)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:680)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:544)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:524)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5054)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5000)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4994)
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:895)
at com.github.vfss3.S3FileObject.doListChildrenResolved(S3FileObject.java:270)
at com.github.vfss3.AbstractFileObject.getChildren(AbstractFileObject.java:1091)
at com.github.vfss3.S3FileObject.getChildren(S3FileObject.java:38)
at com.gallerysystems.tms.common.util.FileUtil.main(FileUtil.java:863)
Caused by: java.net.UnknownHostException: No such host is known (s3-us-east-1.amazonaws.com)
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301)
at com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27)
at com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
... 30 common frames omitted
01:05:46.042 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection
01:05:46.042 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded
01:05:46.042 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
01:05:46.043 [main] DEBUG com.amazonaws.request - Retrying Request: GET https://s3-us-east-1.amazonaws.com /usr80005/ Parameters: ({"prefix":[""],"delimiter":["/"],"encoding-type":["url"]}Headers: (amz-sdk-invocation-id: 35fae9e7-7367-94cc-9985-692c57cb5018, Content-Type: application/octet-stream, User-Agent: aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation, )
01:05:46.044 [main] DEBUG com.amazonaws.http.AmazonHttpClient - Retriable error detected, will retry in 39ms, attempt number: 0
01:05:46.084 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 Canonical Request: '"GET
/usr80005/
delimiter=%2F&encoding-type=url&prefix=
amz-sdk-invocation-id:35fae9e7-7367-94cc-9985-692c57cb5018
amz-sdk-retry:1/39/495
content-type:application/octet-stream
host:s3-us-east-1.amazonaws.com
user-agent:aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation
x-amz-content-sha256:UNSIGNED-PAYLOAD
x-amz-date:20230705T200546Z
amz-sdk-invocation-id;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date
UNSIGNED-PAYLOAD"
01:05:46.085 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 String to Sign: '"AWS4-HMAC-SHA256
20230705T200546Z
20230705/us-east-1/s3/aws4_request
9c498a2d4389d6343ce1491d22042753d0b67f06b8affb29528ca21d30b76326"
01:05:46.086 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default
01:05:46.086 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context
01:05:46.086 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50]
01:05:46.087 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50]
01:05:46.087 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->https://s3-us-east-1.amazonaws.com:443
01:05:46.088 [main] DEBUG com.amazonaws.http.conn.ClientConnectionManagerFactory -
java.lang.reflect.InvocationTargetException: null
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76)
at com.amazonaws.http.conn.$Proxy2.connect(Unknown Source)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1323)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1139)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:796)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:764)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:738)
at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:698)
at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:680)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:544)
at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:524)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5054)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5000)
at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4994)
at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:895)
at com.github.vfss3.S3FileObject.doListChildrenResolved(S3FileObject.java:270)
at com.github.vfss3.AbstractFileObject.getChildren(AbstractFileObject.java:1091)
at com.github.vfss3.S3FileObject.getChildren(S3FileObject.java:38)
at com.gallerysystems.tms.common.util.FileUtil.main(FileUtil.java:863)
Caused by: java.net.UnknownHostException: No such host is known (s3-us-east-1.amazonaws.com)
at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method)
at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933)
at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519)
at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852)
at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367)
at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301)
at com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27)
at com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376)
... 30 common frames omitted
`
But if i use the url this way it gives me correct result String path = "s3://s3.us-east-1.amazonaws.com/usr80005"; (. instead of - before region name)
I am having a weird issue when I am trying to use vfs-s3 and connect to a bucket which is residing in us-east-1 region. It gives me errors as follow. But apart from this all other region buckets gives me correct information. Below is the java code and the output for failure request. any help will be much appreciated.
String path = "s3://s3-us-east-1.amazonaws.com/usr80005"; try { FileSystemManager fsManager = VFS.getManager(); FileObject fileObject = fsManager.resolveFile(path); fileObject.getChildren(); }catch(FileSystemException ex) { logger.error("Cannot find folder... {} ", path, ex); } It gives me this error
` 01:05:45.879 [main] DEBUG com.amazonaws.auth.AWSCredentialsProviderChain - Unable to load credentials from EnvironmentVariableCredentialsProvider: Unable to load AWS credentials from environment variables (AWS_ACCESS_KEY_ID (or AWS_ACCESS_KEY) and AWS_SECRET_KEY (or AWS_SECRET_ACCESS_KEY)) 01:05:45.881 [main] DEBUG com.amazonaws.auth.AWSCredentialsProviderChain - Loading credentials from SystemPropertiesCredentialsProvider 01:05:45.889 [main] DEBUG com.amazonaws.request - Sending Request: GET https://s3-us-east-1.amazonaws.com /usr80005/ Parameters: ({"prefix":[""],"delimiter":["/"],"encoding-type":["url"]}Headers: (amz-sdk-invocation-id: 35fae9e7-7367-94cc-9985-692c57cb5018, Content-Type: application/octet-stream, User-Agent: aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation, ) 01:05:45.916 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 Canonical Request: '"GET /usr80005/ delimiter=%2F&encoding-type=url&prefix= amz-sdk-invocation-id:35fae9e7-7367-94cc-9985-692c57cb5018 amz-sdk-retry:0/0/500 content-type:application/octet-stream host:s3-us-east-1.amazonaws.com user-agent:aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation x-amz-content-sha256:UNSIGNED-PAYLOAD x-amz-date:20230705T200545Z
amz-sdk-invocation-id;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date UNSIGNED-PAYLOAD" 01:05:45.916 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 String to Sign: '"AWS4-HMAC-SHA256 20230705T200545Z 20230705/us-east-1/s3/aws4_request 264723118766e4a56d8a302b9a3cbe46965f4c59ca7fa110542a25314f5f397d" 01:05:45.917 [main] DEBUG com.amazonaws.auth.AWS4Signer - Generating a new signing key as the signing key not available in the cache for the date 1688515200000 01:05:45.934 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default 01:05:45.941 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context 01:05:45.941 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50] 01:05:45.954 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 0][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50] 01:05:45.955 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->https://s3-us-east-1.amazonaws.com:443 01:05:46.042 [main] DEBUG com.amazonaws.http.conn.ClientConnectionManagerFactory - java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76) at com.amazonaws.http.conn.$Proxy2.connect(Unknown Source) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1323) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1139) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:796) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:764) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:738) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:698) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:680) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:544) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:524) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5054) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5000) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4994) at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:895) at com.github.vfss3.S3FileObject.doListChildrenResolved(S3FileObject.java:270) at com.github.vfss3.AbstractFileObject.getChildren(AbstractFileObject.java:1091) at com.github.vfss3.S3FileObject.getChildren(S3FileObject.java:38) at com.gallerysystems.tms.common.util.FileUtil.main(FileUtil.java:863) Caused by: java.net.UnknownHostException: No such host is known (s3-us-east-1.amazonaws.com) at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933) at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519) at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852) at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301) at com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27) at com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ... 30 common frames omitted 01:05:46.042 [main] DEBUG org.apache.http.impl.conn.DefaultManagedHttpClientConnection - http-outgoing-0: Shutdown connection 01:05:46.042 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Connection discarded 01:05:46.042 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection released: [id: 0][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50] 01:05:46.043 [main] DEBUG com.amazonaws.request - Retrying Request: GET https://s3-us-east-1.amazonaws.com /usr80005/ Parameters: ({"prefix":[""],"delimiter":["/"],"encoding-type":["url"]}Headers: (amz-sdk-invocation-id: 35fae9e7-7367-94cc-9985-692c57cb5018, Content-Type: application/octet-stream, User-Agent: aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation, ) 01:05:46.044 [main] DEBUG com.amazonaws.http.AmazonHttpClient - Retriable error detected, will retry in 39ms, attempt number: 0 01:05:46.084 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 Canonical Request: '"GET /usr80005/ delimiter=%2F&encoding-type=url&prefix= amz-sdk-invocation-id:35fae9e7-7367-94cc-9985-692c57cb5018 amz-sdk-retry:1/39/495 content-type:application/octet-stream host:s3-us-east-1.amazonaws.com user-agent:aws-sdk-java/1.11.762 Windows_10/10.0 OpenJDK_64-Bit_Server_VM/17.0.2+8-86 java/17.0.2 vendor/Oracle_Corporation x-amz-content-sha256:UNSIGNED-PAYLOAD x-amz-date:20230705T200546Z
amz-sdk-invocation-id;amz-sdk-retry;content-type;host;user-agent;x-amz-content-sha256;x-amz-date UNSIGNED-PAYLOAD" 01:05:46.085 [main] DEBUG com.amazonaws.auth.AWS4Signer - AWS4 String to Sign: '"AWS4-HMAC-SHA256 20230705T200546Z 20230705/us-east-1/s3/aws4_request 9c498a2d4389d6343ce1491d22042753d0b67f06b8affb29528ca21d30b76326" 01:05:46.086 [main] DEBUG org.apache.http.client.protocol.RequestAddCookies - CookieSpec selected: default 01:05:46.086 [main] DEBUG org.apache.http.client.protocol.RequestAuthCache - Auth cache not set in the context 01:05:46.086 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection request: [route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 0 of 50; total allocated: 0 of 50] 01:05:46.087 [main] DEBUG org.apache.http.impl.conn.PoolingHttpClientConnectionManager - Connection leased: [id: 1][route: {s}->https://s3-us-east-1.amazonaws.com:443][total available: 0; route allocated: 1 of 50; total allocated: 1 of 50] 01:05:46.087 [main] DEBUG org.apache.http.impl.execchain.MainClientExec - Opening connection {s}->https://s3-us-east-1.amazonaws.com:443 01:05:46.088 [main] DEBUG com.amazonaws.http.conn.ClientConnectionManagerFactory - java.lang.reflect.InvocationTargetException: null at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:568) at com.amazonaws.http.conn.ClientConnectionManagerFactory$Handler.invoke(ClientConnectionManagerFactory.java:76) at com.amazonaws.http.conn.$Proxy2.connect(Unknown Source) at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393) at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236) at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186) at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83) at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56) at com.amazonaws.http.apache.client.impl.SdkHttpClient.execute(SdkHttpClient.java:72) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeOneRequest(AmazonHttpClient.java:1323) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeHelper(AmazonHttpClient.java:1139) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.doExecute(AmazonHttpClient.java:796) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.executeWithTimer(AmazonHttpClient.java:764) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.execute(AmazonHttpClient.java:738) at com.amazonaws.http.AmazonHttpClient$RequestExecutor.access$500(AmazonHttpClient.java:698) at com.amazonaws.http.AmazonHttpClient$RequestExecutionBuilderImpl.execute(AmazonHttpClient.java:680) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:544) at com.amazonaws.http.AmazonHttpClient.execute(AmazonHttpClient.java:524) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5054) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:5000) at com.amazonaws.services.s3.AmazonS3Client.invoke(AmazonS3Client.java:4994) at com.amazonaws.services.s3.AmazonS3Client.listObjects(AmazonS3Client.java:895) at com.github.vfss3.S3FileObject.doListChildrenResolved(S3FileObject.java:270) at com.github.vfss3.AbstractFileObject.getChildren(AbstractFileObject.java:1091) at com.github.vfss3.S3FileObject.getChildren(S3FileObject.java:38) at com.gallerysystems.tms.common.util.FileUtil.main(FileUtil.java:863) Caused by: java.net.UnknownHostException: No such host is known (s3-us-east-1.amazonaws.com) at java.base/java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.base/java.net.InetAddress$PlatformNameService.lookupAllHostAddr(InetAddress.java:933) at java.base/java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1519) at java.base/java.net.InetAddress$NameServiceAddresses.get(InetAddress.java:852) at java.base/java.net.InetAddress.getAllByName0(InetAddress.java:1509) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1367) at java.base/java.net.InetAddress.getAllByName(InetAddress.java:1301) at com.amazonaws.SystemDefaultDnsResolver.resolve(SystemDefaultDnsResolver.java:27) at com.amazonaws.http.DelegatingDnsResolver.resolve(DelegatingDnsResolver.java:38) at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:112) at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:376) ... 30 common frames omitted `
But if i use the url this way it gives me correct result String path = "s3://s3.us-east-1.amazonaws.com/usr80005"; (. instead of - before region name)
anybody can help ?