使用具有正斜杠的密钥时连接到s3接收器时无效的主机名错误(Invalid hostname error when connecting to s3 sink when using secret key having forward slash)
我在aws密钥中有forward slash 。
当我尝试连接到s3接收器时
Caused by: java.lang.IllegalArgumentException: Invalid hostname in URI s3://xxxx:xxxx@jelogs/je.1359961366545 at org.apache.hadoop.fs.s3.S3Credentials.initialize(S3Credentials.java:41)当我使用%2F编码正斜杠时,我得到了
The request signature we calculated does not match the signature you provided. Check your key and signing method.我应该如何编码我的密钥。
I have a forward slash in aws secret key.
When I try to connect to s3 sink
Caused by: java.lang.IllegalArgumentException: Invalid hostname in URI s3://xxxx:xxxx@jelogs/je.1359961366545 at org.apache.hadoop.fs.s3.S3Credentials.initialize(S3Credentials.java:41)When I encode forward slash with %2F, I get
The request signature we calculated does not match the signature you provided. Check your key and signing method.How should I encode my secret key.
最满意答案
samthebest解决方案有效,你只需要在键周围添加“”。 在这里如何使用它:
hadoop distcp -Dfs.s3a.awsAccessKeyId="yourkey" -Dfs.s3a.awsSecretAccessKey="yoursecret" <your_hdfs_path> s3a://<your-bucket>I end up creating a new secret key without forward slashes. This is a know issue and generating new key is only solution.
更多推荐
发布评论