• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS.

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