Fail to verify when renew Letsencrypt SSL

Hi all

I attempted to renew letsencrypt ssl and I found that, the verification challenge file can be created and updated but then it was deleted and resulting in verification fail due to 404 error. Could anyone help me on this?

Log trace:

Recipe: letsencrypt::enable

  • ruby_block[http external-url] action run (skipped due to only_if)
  • directory[/etc/gitlab/ssl] action create (up to date)
  • directory[/var/log/gitlab/lets-encrypt] action create (up to date)
  • acme_selfsigned[gitlab.gamesquare.co.th] action create
    • file[gitlab.gamesquare.co.th SSL selfsigned key] action create_if_missing (up to date)
    • file[gitlab.gamesquare.co.th SSL selfsigned crt] action create_if_missing (up to date)
    • file[gitlab.gamesquare.co.th SSL selfsigned chain] action create_if_missing (skipped due to not_if)
      (up to date)
      Recipe: letsencrypt::http_authorization
  • letsencrypt_certificate[gitlab.gamesquare.co.th] action create
    • acme_certificate[staging] action create
      • file[gitlab.gamesquare.co.th SSL key] action nothing (skipped due to action :nothing)

      • file[gitlab.gamesquare.co.th SSL key] action create_if_missing (up to date)

      • directory[/var/opt/gitlab/nginx/www/.well-known/acme-challenge] action nothing (skipped due to action :nothing)

      • directory[/var/opt/gitlab/nginx/www/.well-known/acme-challenge] action create (up to date)

      • file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] action nothing (skipped due to action :nothing)

      • file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] action create[2023-12-27T02:43:53+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] created file /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM

        • create new file /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM[2023-12-27T02:43:53+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] updated file contents /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM

        • update content in file /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM from none to 8e5c9d
          — /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM 2023-12-27 02:43:53.396160881 +0000
          +++ /var/opt/gitlab/nginx/www/.well-known/acme-challenge/.chef-2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM20231227-1532-89y9hm 2023-12-27 02:43:53.396160881 +0000
          @@ -1 +1,2 @@
          +2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM.Np1e1jFTx1qJLzl6sZBXBqTXv-FPDOiPwQz0zXsPUys[2023-12-27T02:43:53+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] owner changed to 0
          [2023-12-27T02:43:53+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] group changed to 0
          [2023-12-27T02:43:53+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] mode changed to 644

        • change mode from ‘’ to ‘0644’

        • change owner from ‘’ to ‘root’

        • change group from ‘’ to ‘root’

      • file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] action delete[2023-12-27T02:43:57+00:00] INFO: file[/var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM] deleted file at /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM

        • delete file /var/opt/gitlab/nginx/www/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM
      • ruby_block[create certificate for gitlab.gamesquare.co.th] action run

        ================================================================================
        Error executing action run on resource ‘ruby_block[create certificate for gitlab.gamesquare.co.th]’

        RuntimeError

        [gitlab.gamesquare.co.th] Validation failed, unable to request certificate, Errors: [{url: https://acme-staging-v02.api.letsencrypt.org/acme/chall-v3/10271680054/Vpau9Q, status: invalid, error: {“type”=>“urn:ietf:params:acme:error:unauthorized”, “detail”=>“49.0.196.90: Invalid response from http://gitlab.gamesquare.co.th/.well-known/acme-challenge/2trwDb85AfZ_jRogP-cA64Pd3Qx2t-Bfns9qAfLeZoM: 404”, “status”=>403}} ]