Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Issue with ACME Certificates Refresh & Restarting HAProxy

    Scheduled Pinned Locked Moved ACME
    acmehaproxy
    3 Posts 2 Posters 1.1k Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      Maxpower
      last edited by

      Hello fellow pfSense users,

      I've encountered an issue that I hope some of you might have come across and can assist with. I'm currently utilizing ACME Certificates and I have set it up such that when a certificate is refreshed, HAProxy should restart with the new certificate. For this, I have configured the command /usr/local/etc/rc.d/haproxy.sh to restart HAProxy, as its described in the GUI

      However, it seems the restart is not working as intended. Whenever ACME refreshes a certificate and the aforementioned command is executed, I see the following error in the logs:

      /status_services.php: The command '/usr/local/etc/rc.d/haproxy.sh stop' returned exit code '1', the output was 'Stopping haproxy. Waiting for PIDS: 81463. Stopping haproxy. No matching processes were found'
      

      From the error, it appears that the script is trying to stop HAProxy, but then either it's not finding the process to stop or there's some other issue that's preventing it from stopping successfully.

      Some steps I have tried:

      Checking the permissions on the haproxy.sh script to ensure it's executable. Which looks good to me:

      -rwxr-xr-x  1 root  wheel  1533 Jul 30 08:52 /usr/local/etc/rc.d/haproxy.sh
      

      Ensuring that HAProxy is actually running before the script is executed.
      I would really appreciate any insights or suggestions on what might be going wrong here or if anyone has faced a similar issue. Any guidance on troubleshooting or resolving this would be a big help!

      Thanks in advance for your support!

      Best regards,
      Max

      F 1 Reply Last reply Reply Quote 1
      • M
        Maxpower
        last edited by

        oh wups, saw my mistake. Replying for anyone else who runs into this in the future.

        I had configured the shell command to run as:

        /usr/local/etc/rc.d/haproxy.sh
        

        But it needs to be

        /usr/local/etc/rc.d/haproxy.sh restart
        
        1 Reply Last reply Reply Quote 1
        • F
          fxandrei @Maxpower
          last edited by

          @Maxpower said in Issue with ACME Certificates Refresh & Restarting HAProxy:

          For this, I have configured the command /usr/local/etc/rc.d/haproxy.sh to restart HAProxy, as its described in the GUI

          What exactly did you do here ?
          Can you go into detail ?

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.