• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Docker + Varnish - Reboot Mystery

pr0tax

New Pleskian
Hello,

I followed the Plesk/Varnish tutorial on here with Docker and it works a charm. I continued to apply some other updates to the server afterwards, then I did a reboot and everything went horribly wrong. Luckily I had a snapshot available, but I didn't need it in the end.

The conclusion is (TLDR), when I reboot the server, it just throws up a whole load of 503 backend errors.

The fix was for me to run the last couple of steps everytime I reboot the server:

docker ps | grep varnish | awk {'print $1'} | xargs -i docker exec -t {} sed -i '/.port/c\ .port = "7080";' /etc/varnish/default.vcl

and

docker ps | grep varnish | awk {'print $1'} | xargs -i docker exec -t {} sed -i '/.host/c\ .host = "203.0.113.2";' /etc/varnish/default.vcl

With my server IP in the second command. After this, I reboot the container and all works again perfectly.

It seems as though something is missing when rebooting the server, as I have to repeat this process everytime... am I best just installing and configuring Varnish on the actual server or is there something I'm missing?

N.B - I have tried it with both "Automatic start after system reboot" on and off...
 
Back
Top