You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried for some time debug this issue but I can't seem to figure out the problem. I have searched this repo issues and found #62. I already use in my ENV the DEPLOY_HOOK, but still my script fails execution.
My issue is that I have created a script that automates the installation on a server. If I execute this in within docker' shell (docker exec -it dnsrobocert /bin/sh OR docker exec -it dnsrobocert /bin/bash) they work well.
However, the renewal process seems to have problems with it. For example, this is the failed log:
2022-03-10 23:32:01,391:INFO:certbot.compat.misc:Running deploy-hook command: /usr/local/bin/python3 -m dnsrobocert.core.hooks -t deploy -c "/tmp/tmp_9znxpiu/dnsrobocert-runtime.yml" -l "__REDACTED__"
2022-03-10 23:32:01,686:DEBUG:certbot._internal.display.obj:Notifying user: Hook 'deploy-hook' ran with output:
uploading certificate cert.pem
Uploading key privkey.pem
updating certificate on NS for wildcard.__REDACTED__
Done
2022-03-10 23:32:01,687:WARNING:certbot.display.ops:Hook 'deploy-hook' ran with error output:
/home/root/deploy-hook.sh: 3: apk: not found
/home/root/deploy-hook.sh: 4: apk: not found
/home/root/deploy-hook.sh: 5: apk: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 192.168.1.150 port 80: Connection refused
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 192.168.1.150 port 80: Connection refused
/home/root/deploy-hook.sh: 29: ssh: not found
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
curl: (7) Failed to connect to 192.168.1.150 port 80: Connection refused
/home/root/deploy-hook.sh: 36: ssh: not found
2022-03-10 23:32:01,687:DEBUG:certbot._internal.display.obj:Notifying user:
Successfully received certificate.
Certificate is saved at: /etc/letsencrypt/live/__REDACTED__/fullchain.pem
Key is saved at: /etc/letsencrypt/live/__REDACTED__/privkey.pem
This certificate expires on 2022-06-08.
These files will be updated when the certificate renews.
If I run the script directly from docker's shell:
# ./deploy-hook.sh
./deploy-hook.sh: 1: !/bin/bash: not found
Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
Hit:2 http://deb.debian.org/debian bullseye InRelease
Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
Get:4 https://download.docker.com/linux/debian bullseye InRelease [43.3 kB]
Fetched 43.3 kB in 0s (170 kB/s)
Reading package lists... Done
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
curl is already the newest version (7.74.0-1.3+deb11u1).
openssh-client is already the newest version (1:8.4p1-5).
0 upgraded, 0 newly installed, 0 to remove and 39 not upgraded.
whoami= root
whoami
root
uploading certificate cert.pem
Uploading key privkey.pem
adding NS pub key to known_hosts
# 192.168.1.150:22 SSH-2.0-OpenSSH_8.6
# 192.168.1.150:22 SSH-2.0-OpenSSH_8.6
# 192.168.1.150:22 SSH-2.0-OpenSSH_8.6
# 192.168.1.150:22 SSH-2.0-OpenSSH_8.6
# 192.168.1.150:22 SSH-2.0-OpenSSH_8.6
convert key to rsa
###############################################################################
# #
# WARNING: Access to this system is for authorized users only #
# Disconnect IMMEDIATELY if you are not an authorized user! #
# #
###############################################################################
Done
writing RSA key
Done
updating certificate on NS for wildcard.__REDACTED__
{ "errorcode": 0, "message": "Done", "severity": "NONE" }
saving config
###############################################################################
# #
# WARNING: Access to this system is for authorized users only #
# Disconnect IMMEDIATELY if you are not an authorized user! #
# #
###############################################################################
Done
Done
Finished upload process
#
You can clearly see the errors in the log files and the success when ran from shell. I even have tried adding the "whoami" command to see who is running this. I also have tried checking bot dnsrobocert and certbot docs but I can't figure out what is happening, maybe you can give me some pointers?
Hi
I have tried for some time debug this issue but I can't seem to figure out the problem. I have searched this repo issues and found #62. I already use in my ENV the DEPLOY_HOOK, but still my script fails execution.
My issue is that I have created a script that automates the installation on a server. If I execute this in within docker' shell (docker exec -it dnsrobocert /bin/sh OR docker exec -it dnsrobocert /bin/bash) they work well.
However, the renewal process seems to have problems with it. For example, this is the failed log:
If I run the script directly from docker's shell:
You can clearly see the errors in the log files and the success when ran from shell. I even have tried adding the "whoami" command to see who is running this. I also have tried checking bot dnsrobocert and certbot docs but I can't figure out what is happening, maybe you can give me some pointers?
For reference, my script is below, redacted:
The text was updated successfully, but these errors were encountered: