certbot-dns-ispconfig
certbot-dns-ispconfig copied to clipboard
Error 111
Port correct? Localhost correct? HTTPS activated for localhost and the port?
looks like correct. Is it possible that problem with ssl cert? I mean that my ssl cert not for local host.
# curl -L -k https://localhost:8078
<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='utf-8' />
<title>ISPConfig</title>
...
my script:
docker run --rm \
-v /opt/certbot2/var_lib_letsencrypt:/var/lib/letsencrypt \
-v /opt/certbot2/etc_letsencrypt:/etc/letsencrypt \
-v /opt/certbot2/var_log_letsencrypt:/var/log/letsencrypt \
--cap-drop=all \
certbot/dns-ispconfig certonly \
--authenticator certbot-dns-ispconfig:dns-ispconfig \
--certbot-dns-ispconfig:dns-ispconfig-propagation-seconds 900 \
--certbot-dns-ispconfig:dns-ispconfig-credentials \
/etc/letsencrypt/creds.ini \
--no-self-upgrade \
--keep-until-expiring --non-interactive --expand \
--server https://acme-v02.api.letsencrypt.org/directory \
--agree-tos --email '[email protected]' \
-d 'site.in' -d '*.site.in'
creds.ini:
# cat ./etc_letsencrypt/creds.ini
certbot_dns_ispconfig:dns_ispconfig_username = user
certbot_dns_ispconfig:dns_ispconfig_password = password
certbot_dns_ispconfig:dns_ispconfig_endpoint = https://localhost:8078/remote/json.php
Doesn't matter what protocol or domain name. All of the time same error
So even if you use the host name the cert is for?
Yes. Even without ssl. But I can login to ispconfig remote api by curl
# curl --header "Content-Type: application/json" --insecure --request POST --data '{"username":"user","password":"password"}' http://real.domain.com:8078/remote/json.php?login
{"code":"ok","message":"","response":"cc6b174d10f6fb40568071c9c994f605"}
Localhost would for sure not work from within docker. Could you share a log from real domain? You could send it to [email protected] if you do not want to post it here
In the log you sent me you get an error 500. You may want to check the ispconfig server/http logs for that. Is remote access enabled?
At first I found an error in ispconfig
After small var_dump I receive:
Incorrect datetime value: '' for column `dbispconfig`.`dns_rr`.`stamp` at row 1 INSERT INTO `dns_rr` (`server_id`, `zone`, `name`, `type`, `data`, `ttl`, `active`, `stamp`, `serial`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`) VALUES ('1', '5', '_acme-challenge', 'TXT', 'Eh4US3DYfHurtZ3yMQ5tPVbBHZ5wvqiIW8XcWXYPx4Y', '60', 'Y', '7/3/2021', '0', '', '', 'riud', 'riud', '')
and:
Incorrect integer value: '' for column `dbispconfig`.`dns_rr`.`sys_userid` at row 1 INSERT INTO `dns_rr` (`server_id`, `zone`, `name`, `type`, `data`, `ttl`, `active`, `stamp`, `serial`, `sys_userid`, `sys_groupid`, `sys_perm_user`, `sys_perm_group`, `sys_perm_other`) VALUES ('1', '5', '_acme-challenge', 'TXT', 'Eh4US3DYfHurtZ3yMQ5tPVbBHZ5wvqiIW8XcWXYPx4Y', '60', 'Y', '2021-07-03 08:45:40', '0', '', '', 'riud', 'riud', '')
For current ispconfig version (3.2.5) request should contain additional filed sys_userid (from dns_zone_get) and stamp in params with current time stamp (ex.: '2021-07-03 08:45:40')
Example request:
{
session_id: "sdflkjhnm345",
sys_userid: "100500",
params: {
stamp: '2021-07-03 08:45:40',
server_id: 1,
name: '_acme-challenge',
active: 'Y',
type: 'TXT',
data: 'dfglkfdglkjsdfglkjsdfg',
zone: 574,
ttl: 60,
update_serial: false
}
}