Amazon web services 使用具有正斜杠的密钥连接到s3接收器时出现无效主机名错误

Amazon web services 使用具有正斜杠的密钥连接到s3接收器时出现无效主机名错误,amazon-web-services,amazon-s3,flume,Amazon Web Services,Amazon S3,Flume,我在aws密钥中有一个正斜杠 当我尝试连接到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 si

我在aws密钥中有一个正斜杠

当我尝试连接到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.

我应该如何对我的密钥进行编码。

我最终创建了一个新的密钥,而没有使用斜杠。这是一个已知问题,生成新密钥是唯一的解决方案。

使用

-Dfs.s3n.awsAccessKeyId=<your-key> -Dfs.s3n.awsSecretAccessKey=<your-secret-key>
-Dfs.s3n.awsAccessKeyId=-Dfs.s3n.awsSecretAccessKey=
e、 g

hadoop distcp-Dfs.s3n.awsAccessKeyId=-Dfs.s3n.awsSecretAccessKey=-

hadoop fs-Dfs.s3n.awsAccessKeyId=-Dfs.s3n.awsSecretAccessKey=-
如果最佳解决方案有效,您只需在键周围添加“”。以下是如何使用它:

hadoop distcp -Dfs.s3a.awsAccessKeyId="yourkey" -Dfs.s3a.awsSecretAccessKey="yoursecret" <your_hdfs_path> s3a://<your-bucket>
hadoop distcp-Dfs.s3a.awsAccessKeyId=“yourkey”-Dfs.s3a.awsSecretAccessKey=“yoursecret”s3a://
请进一步解释您的答案,不要只发布片段。
hadoop fs -Dfs.s3n.awsAccessKeyId=<your-key> -Dfs.s3n.awsSecretAccessKey=<your-secret-key> -<subsubcommand> <args>
hadoop distcp -Dfs.s3a.awsAccessKeyId="yourkey" -Dfs.s3a.awsSecretAccessKey="yoursecret" <your_hdfs_path> s3a://<your-bucket>