while having this up and running since quite a time, I recently took over this setup in our corporation.
For us it seemed, that the ddns-client.sh quitted with the following output (redacted)
route53-ddns-client.sh: Updating subdomain.domain.tld. to IP 111.111.111.111
route53-ddns-client.sh: Request failed:
It worked for quite a while, but I don't know when it stopped working exactly.
I checked config and codebase, no changes or adaptions notified.
Then I took a look into the CloudWatch logs for the lambda and found the following stacktrace:
Unicode-objects must be encoded before hashing: TypeError
Traceback (most recent call last):
File "/var/task/lambda_function.py", line 258, in lambda_handler
return_dict = run_set_mode(set_hostname, validation_hash, source_ip, internal_ip)
File "/var/task/lambda_function.py", line 168, in run_set_mode
source_ip + set_hostname + shared_secret).hexdigest()
TypeError: Unicode-objects must be encoded before hashing
I then went ahead and patched line 167/168 by changing it to
calculated_hash = hashlib.sha256(( source_ip + set_hostname + shared_secret).encode()).hexdigest() resulting in working updates again.
We don't have any special characters in our hostname btw.
Anybody else, who encountered this issue?
Thanks a lot 👍
Hi there,
while having this up and running since quite a time, I recently took over this setup in our corporation. For us it seemed, that the ddns-client.sh quitted with the following output (redacted)
It worked for quite a while, but I don't know when it stopped working exactly.
I checked config and codebase, no changes or adaptions notified.
Then I took a look into the CloudWatch logs for the lambda and found the following stacktrace:
I then went ahead and patched line 167/168 by changing it to
calculated_hash = hashlib.sha256(( source_ip + set_hostname + shared_secret).encode()).hexdigest()
resulting in working updates again.We don't have any special characters in our hostname btw.
Anybody else, who encountered this issue? Thanks a lot 👍