vrtmrz / self-hosted-livesync-server

120 stars 25 forks source link

Caddy Timeout #4

Closed trayanr closed 1 year ago

trayanr commented 1 year ago

I tried to set it up but there seems to be something wrong with my setup. I am not sure what are the steps to reproduce.

caddy          | {"level":"warn","ts":1665956012.1612883,"logger":"http.acme_client","msg":"HTTP request failed; retrying","url":"https://acme-staging-v02.api.letsencrypt.org/directory","error":"performing request: Get \"https://acme-staging-v02.api.letsencrypt.org/directory\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
caddy          | {"level":"error","ts":1665956012.1613786,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"%%MY_DOMAIN%%","issuer":"acme-v02.api.letsencrypt.org-directory","error":"registering account [] with server: provisioning client: performing request: Get \"https://acme-staging-v02.api.letsencrypt.org/directory\": context deadline exceeded (Client.Timeout exceeded while awaiting headers)"}
caddy          | {"level":"warn","ts":1665956012.1617622,"logger":"http","msg":"missing email address for ZeroSSL; it is strongly recommended to set one for next time"}
caddy          | {"level":"error","ts":1665956042.1630282,"logger":"tls.obtain","msg":"could not get certificate from issuer","identifier":"%%MY_DOMAIN%%","issuer":"acme.zerossl.com-v2-DV90","error":"account pre-registration callback: performing EAB credentials request: Post \"https://api.zerossl.com/acme/eab-credentials-email\": dial tcp 52.20.126.123:443: i/o timeout"}
caddy          | {"level":"error","ts":1665956042.163131,"logger":"tls.obtain","msg":"will retry","error":"[%%MY_DOMAIN%%] Obtain: account pre-registration callback: performing EAB credentials request: Post \"https://api.zerossl.com/acme/eab-credentials-email\": dial tcp 52.20.126.123:443: i/o timeout","attempt":3,"retrying_in":120,"elapsed":541.517983873,"max_duration":2592000}

It is running on a fresh installation of ubuntu 22.04. I tired to find what is causing it. If I run sudo nc -l 0.0.0.0 80 on the machine and try to access it trough my domain it connects. Same for port 443. While nc is active when I run nmap -P0 my_domain it shows

PORT     STATE  SERVICE
80/tcp   open   http
443/tcp  closed https

When the up script is active no ports are seen (again ran with the domain not ip). If I try to run nmap with the local ip(from a machine on the same network) the ports are shown but the state is "filtered" Does anybody have an idea what is happening? Can't think of anything.

trayanr commented 1 year ago

The fix here seems to be to update the kernel of Ubuntu. I updated from 5.15.56 to 6.0.0. https://linuxhint.com/install-upgrade-latest-kernel-ubuntu-22-04/ This is a good guide as to how to do it.