Closed fjrsama closed 7 years ago
pls paste out the ddns.conf here, it seems may be some invalid value specified for 'Type'/'RR'/'Line'/'Value', make sure there is no "''" for type value set in ddns.conf, e,g: A is good, 'A' is bad.
thanks for reply It works well in the past few months on my raspberry pi until yesterday, there's no changes to the ddns.conf at all.
From the error info, server returned 400 bad request error which indicate one of following parameters is invalid: RR, Type, Line, Value. As no changes had been done in client side recently, I think this may be server side issue. I suggest you capture the HTTP packet it send to server and compare with what works well on desktop, or just wait for sometime to see it become ok or not.
I've checked, There's no problem in HTTP packet. After further investigation, I found how to 100% reproduce this error:
I encountered this issue because yesterday I manually modify ip2 at console page, causing IP1==IP2!=IP3. So the solution is, modify ip3, make sure ip3 == ip2 and never, ever, ever manually modify ip2 again, then the problem resolved. But still I don't know why this is happening.
I tried to reproduce the similar issue as what you said, but failed. so I tried to add duplicate domain records in Aliyun via console, e,g:
The issue can be 100% reproduced, this kind of error reported by Aliyun server, sometimes it reported as "The specified value is not valid", sometimes it reported as "The domain record is duplicated". Basically, the root cause is ddns client send the unmatched record id when invoking updateDomainRecord().
I don't know how you triggered this issue, I suppose you accidentally added a duplicate entry in Aliyun console, then removed it later. in fact, the remote domain record id was changed after you doing above, but the local record id saved in /etc/ddns.conf is still the old one.
Anyway, the code logic need improved to avoid this corner case. I already patched the related codes, pls see if you can still reproduce it or not.
BTW: if you does some actions like add/remove some domain records in Aliyun console, it had better clear the corresponding domain record's value in /etc/ddns.conf, which can forcefully sync remote domain record id to local domain id. For performance purpose, normal syncing operation will not touch the saved locate record id.
Got the error returned from dns.aliyun.com:
The parameters:
Call stack: