Timeout when waiting for file

Hi, I'm having an issue with trying to renew/aquire a certificate using an nginx server. The process is automated from what I was told and left with, but when running the command that should complete the process - I run into a timeout issue. The ip can be reached and it seems to be able to even see that a directory is deleted on one of our servers. It just seems like when trying to create the actual cert directory and append the certificate files it cannot be done or is getting hung up? All the information I could find is below, any help would be much appreicated!

Domain is: https://staging.advadocs.com/

Command run: ansible-playbook -u DOMAIN_USERNAME --key-file=/home/user/.ssh/rsa_public_key -vvvv -i utility/ansible/inventories/production.ini utility/ansible/staging_letsencrypt.yml

Output:

No config file found; using defaults

PLAY [staging] 

TASK [Gathering Facts] 
************************************************************************************************************************************************************************************
ok: [***]

TASK [letsencrypt : Delete old ssl certificates] ************************************************************************************************************************************************************************************
ok: [***] => {"changed": false, "path": "/opt/letsencrypt/volumes/proxy/certs", "state": "absent"}

TASK [letsencrypt : Clone Let's encrypt nginx proxy repo] ***************************************************************************************************************************************************************************
changed: [***] => {"after": "03d20fdb9bc5df77470e0e4296fd344700c96820", "before": "03d20fdb9bc5df77470e0e4296fd344700c96820", "changed": true, "msg": "Local modifications exist.", "remote_url_changed": false}

TASK [letsencrypt : Modify virtual host] ********************************************************************************************************************************************************************************************
changed: [***] => {"backup": "", "changed": true, "msg": "line replaced"}

TASK [letsencrypt : Modify host] ****************************************************************************************************************************************************************************************************
changed: [***] => {"backup": "", "changed": true, "msg": "line replaced"}

TASK [letsencrypt : Modify email] ***************************************************************************************************************************************************************************************************
changed: [***] => {"backup": "", "changed": true, "msg": "line replaced"}

TASK [letsencrypt : Start Let's encrypt nginx proxy] ********************************************************************************************************************************************************************************
changed: [***] => {"changed": true, "cmd": ["docker-compose", "-f", "/opt/letsencrypt/docker-compose/v1/simple-site/docker-compose.yml", "up", "-d", "--build"], "delta": "0:00:00.917993", "end": "2022-10-13 18:02:58.071283", "rc": 0, "start": "2022-10-13 18:02:57.153290", "stderr": "nginx is up-to-date\nsimple-site is up-to-date\nletsencrypt-nginx-proxy-companion is up-to-date\nnginx-gen is up-to-date", "stderr_lines": ["nginx is up-to-date", "simple-site is up-to-date", "letsencrypt-nginx-proxy-companion is up-to-date", "nginx-gen is up-to-date"], "stdout": "", "stdout_lines": []}

TASK [letsencrypt : Wait until the fullchain.pem is present before continuing] ******************************************************************************************************************************************************
fatal: [***]: FAILED! => {"changed": false, "elapsed": 200, "msg": **"Timeout when waiting for file /opt/letsencrypt/volumes/proxy/certs/staging.advadocs.com/fullchain.pem"**}

PLAY RECAP **************************************************************************************************************************************************************************************************************************
IP_ADDRESS: ok=7    changed=5    unreachable=0    failed=1    skipped=0    rescued=0    ignored=0

My web server is (include version): nginx (Version 1.23.1)

The operating system my web server runs on is (include version): Debian 11

My hosting provider, if applicable, is: N/A

I can login to a root shell on my machine (yes or no, or I don't know): Yes

I'm using a control panel to manage my site (no, or provide the name and version of the control panel): no

Additional output from the nginx-proxy companion:

mkdir: cannot create directory ‘/etc/nginx/certs/staging.advadocs.com’: No such file or directory

10/13/2022 9:12:34 AMWarning: /etc/nginx/certs/staging.advadocs.com does not exist. Skipping ownership and permissions check.

10/13/2022 9:12:34 AMCreating/renewal staging.advadocs.com certificates... (staging.advadocs.com)

10/13/2022 9:12:35 AM[Thu Oct 13 13:12:35 UTC 2022] Using CA: https://acme-v02.api.letsencrypt.org/directory

10/13/2022 9:12:35 AM[Thu Oct 13 13:12:35 UTC 2022] Creating domain key

10/13/2022 9:12:35 AM[Thu Oct 13 13:12:35 UTC 2022] The domain key is here: ***

10/13/2022 9:12:35 AM[Thu Oct 13 13:12:35 UTC 2022] Single domain='staging.advadocs.com'

10/13/2022 9:12:35 AM[Thu Oct 13 13:12:35 UTC 2022] Getting domain auth token for each domain

10/13/2022 9:12:37 AM[Thu Oct 13 13:12:37 UTC 2022] Getting webroot for domain='staging.advadocs.com'

10/13/2022 9:12:37 AM[Thu Oct 13 13:12:37 UTC 2022] Verifying: staging.advadocs.com

10/13/2022 9:12:39 AM[Thu Oct 13 13:12:39 UTC 2022] staging.advadocs.com:Verify error:147.135.16.155: Invalid response from https://staging.advadocs.com/.well-known/acme-challenge/k3drglG_26BVn6ppNwvQCgs4xksy92AIhymtzGFIAeQ: 404

10/13/2022 9:12:39 AM[Thu Oct 13 13:12:39 UTC 2022] Please check log file for more details: /dev/null

Hi @Gsoetan, and welcome to the LE community forum :slight_smile:

This seems likely to become a problem:

Please show:
ls -l /etc/nginx/certs

That shows HTTPS, which means that the HTTP challenge request was heard and redirected.
It would be simpler to accept and handle the challenge requests in HTTP.
Please show the HTTP vhost server block.

3 Likes

Hi, thanks for the quick reply. I was actually able to figure out the issue. I was using rancher to host the containers and it would see one of the services needed to be disabled in order for the creation to be successful. Afterwards it was fine!

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.