danb35/deploy-freenas

Getting 401 error on renewal after deploy-freenas again

myriad007 opened this issue · 2 comments

Any clues as to why I get the following error after successfully renewing my cert:
/root/deploy-freenas/deploy_freenas.py Error importing certificate! 401: Unauthorized

The only changes I have made were to change the cert ca to zerossl:
.acme.sh/acme.sh --register-account -m xx@xxx.ca --server zerossl
.acme.sh/acme.sh --set-default-ca --server zerossl
I have used this same email address successfully on another server, but I am using AWS route53 to verify, not email with zerossl so the duplicate email shouldn't be the cause of this issue.

This is the command for renewal:
.acme.sh/acme.sh --issue --force -d tnas2.xxx.com --dns dns_aws --reloadcmd "/root/deploy-freenas/deploy_freenas.py"

I am out of clues. I have restarted the NAS but it made no difference and I have updated your script to the latest version. When I run the command:
.acme.sh/acme.sh --install-cert -d tnas2.sxxx.com --reloadcmd /root/deploy-freenas/deploy_freenas.py
I get the message listed above. Any ideas Dan?

The 401 error would indicate that you're using invalid credentials to authenticate to the TrueNAS server. Are you sure the api_key (or password) in deploy_config is correct?

That fixed it!. I set up the api_key but I obviously messed it up somehow. I have reverted back to the password for now. It did throw the error on reload:
Error reloading WebUI! null
But it works regardless. Thanks for pointing me in the right direction and thanks for the prompt reply!