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

Aliyun SMS has a malfunction #5086

Closed
1 task done
ShiaBox opened this issue Sep 4, 2024 · 3 comments
Closed
1 task done

Aliyun SMS has a malfunction #5086

ShiaBox opened this issue Sep 4, 2024 · 3 comments
Labels
area:monitor Everything related to monitors help type:enhance-existing feature wants to enhance existing monitor

Comments

@ShiaBox
Copy link

ShiaBox commented Sep 4, 2024

πŸ“‘ I have found these related issues/pull requests

/

πŸ›‘οΈ Security Policy

Description

When I configure AliyunSMS correctly, the program cannot send SMS messages properly.
The error message displayed in the Aliyun console log is: SignatureDoesNotMatch.
These are Aliyun console logs

{
  "acsRegion": "cn-hangzhou",
  "additionalEventData": {
    "CallerBid": "26842"
  },
  "apiVersion": "2017-05-25",
  "errorCode": "SignatureDoesNotMatch",
  "errorMessage": "Specified signature is not matched with our calculation. server string to sign is:POST&%2F&AccessKeyId...(Hidden sensitive information)...status%2522%253A%2522%2522%252C%2522msg%2522%253A%2522Uptime-Kuma%2520AliyunSMSTesting%2522%257D%26Timestamp%3D2024-09-04T12%253A33%253A10.973Z%26Version%3D2017-05-25",
  "eventCategory": "Management",
  "eventId": "902554...(Hidden sensitive information)...07EE0BF",
  "eventName": "SendSms", // 事仢名称
  "eventRW": "Write",
  "eventSource": "dysmsapi.aliyuncs.com",
  "eventTime": "2024-09-04T12:33:10Z",
  "eventType": "ApiCall",
  "eventVersion": "1",
  "recipientAccountId": "10475...(Hidden sensitive information)...2281",
  "requestId": "902554...(Hidden sensitive information)...07EE0BF",
  "requestParameters": {
    "TemplateCode": "SMS_472...(Hidden sensitive information)...85",
    "PhoneNumbers": ...(Hidden sensitive information)...,
    "X-Acs-Public-Access": true,
    "AcsProduct": "Dysmsapi",
    "X-Acs-Ingress-Network": "internet",
    "ClientPort": 50334,
    "TemplateParam": {
      "msg": "Uptime-Kuma AliyunSMSTesting",
      "name": "",
      "time": "",
      "status": ""
    },
    "X-Acs-Account-Site-Type": "domestic",
    "SignName": "...(Hidden sensitive information)...",
    "X-Acs-Client-Request-Host": "dysmsapi.aliyuncs.com"
  }

πŸ‘Ÿ Reproduction steps

After configuring AliyunSMS according to the rules, click the test button

πŸ‘€ Expected behavior

Sending SMS correctly

πŸ˜“ Actual Behavior

image

🐻 Uptime-Kuma Version

1.23.13

πŸ’» Operating System and Arch

docker images

🌐 Browser

edge 121.0.2277.112

πŸ–₯️ Deployment Environment

  • Runtime: Docker version 20.10.10, build b485636
  • Database: /
  • Filesystem used to store the database on: /
  • number of monitors: 1

πŸ“ Relevant log output

No response

@ShiaBox ShiaBox added the bug Something isn't working label Sep 4, 2024
Repository owner deleted a comment Sep 4, 2024
@github-staff github-staff deleted a comment from ShiaBox Sep 4, 2024
@CommanderStorm
Copy link
Collaborator

CommanderStorm commented Sep 4, 2024

Maybe something changed, maybe part of your key is invalid.
It worked in #687

=> Could you please check that your fields are correctly setup, that the template is exactly as asked and such?

@CommanderStorm CommanderStorm added help area:monitor Everything related to monitors type:enhance-existing feature wants to enhance existing monitor and removed bug Something isn't working labels Sep 4, 2024
@ShiaBox
Copy link
Author

ShiaBox commented Sep 5, 2024

Yes, I confirm that the information entered is correct.
I can send SMS by using Aliyun console.
Aliyun console also need "PhoneNumbers""SignName""TemplateCode""TemplateParam".
The only difference is that there is no need to provide an AccessKey and Secret.
I tried to ask the engineers at Aliyun, and this is their response.

Hello, according to the provided RequestID 0FC878D, the error returned is SignatureDoesNotMatch, with API error code description : https://help.aliyun.com/zh/sms/developer-reference/api-error-codes ;
If there is an error when calling the SMS service API interface, such as SignatureDoesNotMatch, the signature generated by the client does not match the server, which is a signature encryption error. If using SDK to call the interface, please note that the AccessKey ID and AccessKey Secret strings are assigned correctly. If encrypting the signature yourself, please refer to the request signature check encryption logic https://help.aliyun.com/zh/sdk/product-overview/rpc-mechanism ; thank you !

@ShiaBox
Copy link
Author

ShiaBox commented Sep 9, 2024

It returned to normal without me doing anything.
I still don't know why. The reason may be that the soul of the machine is unhappy?
I will close this comment. Inspiration for others: If you are also using Aliyun SMS, you can wait a few days and try again.

@ShiaBox ShiaBox closed this as completed Sep 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:monitor Everything related to monitors help type:enhance-existing feature wants to enhance existing monitor
Projects
None yet
Development

No branches or pull requests

2 participants