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

Improve error message when EcsRamRole is incorrect #525

Open
Xun66 opened this issue Oct 22, 2022 · 2 comments
Open

Improve error message when EcsRamRole is incorrect #525

Xun66 opened this issue Oct 22, 2022 · 2 comments

Comments

@Xun66
Copy link

Xun66 commented Oct 22, 2022

  • Type of Demand:
    Could you add error message or debug message when EcsRamRole is incorrect?
  • Detailed Description:
    When there is a typo in ram_role_name, every command (even aliyun configure itself) would fail. The output is very confusing and doesn't give a clue. I also tried to add DEBUG=sdk and it just doesn't help. Here's the output:
[root@iZ2zehua0su******tozx2Z ~]# DEBUG=sdk aliyun ecs DescribeRegions
resolve endpoint with {"Domain":"","Product":"Ecs","RegionId":"cn-beijing","LocationProduct":"ecs","LocationEndpointType":"openAPI"}

	ecs-cn-hangzhou.aliyuncs.com by resolver(local regional resolver)

ERROR: SDK.ServerError
ErrorCode: 
Recommend: 
RequestId: 
Message: <?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
         "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
 <head>
  <title>404 - Not Found</title>
 </head>
 <body>
  <h1>404 - Not Found</h1>
 </body>
</html>

RespHeaders: map[]
  • Design:
    After a long time of research, I realized this 404 message was about fetching STS token credentials. If such error happens, the message should indicate the error was with the EcsRamRole (at least with authentication).
@Xun66 Xun66 changed the title Add error message when EcsRamRole is incorrect Improve error message when EcsRamRole is incorrect Oct 22, 2022
@TsinghuaDream
Copy link
Contributor

@TsinghuaDream
Copy link
Contributor

卷曲http://100.100.100.200/latest/meta-data/ram/security-credentials/

try this, check EcsRamRole configuration.

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

2 participants