使用具有正斜杠的密钥时连接到s3接收器时无效的主机名错误(Invalid hostname error when connecting to s3 sink when using secret key

编程入门 行业动态 更新时间:2024-10-27 20:25:33
使用具有正斜杠的密钥时连接到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.

更多推荐

本文发布于:2023-07-25 22:19:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1266975.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:斜杠   密钥   接收器   连接到   主机名

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!