Author Topic: Problem with VARNISH config files .... and CWP update to new version  (Read 8689 times)

0 Members and 1 Guest are viewing this topic.

Offline
*
Hi friends ...

We have had some problems with varnish ...
----------------------------------------------------
Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: 1279924
----------------------------------------------------

we use webserver configuration nginx-varnish-apache-php-fpm...
after some study/investigation of internet we found recomendations some changes in config files ...

we have added them to the files in: /etc/varnish/default.vcl
and we have added them have updated files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl


then we have updated all domains in CWP > WebServers Domain Conf
And all changes  from default.vcl or default.tpl were updated in files in all fomain files: /etc/varnish/conf.d/vhosts

After this was everything OK and Error 503 Backend fetch failed .... they came only very rarely ....


But the biggest that after some time (may be after CWP update) the config files were rewrited to old ones ...
files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl
and
all fomain files: /etc/varnish/conf.d/vhosts

all our changes were lost ...

Please why ???

we think that it is very BAD!!!

CAn you do something with this ???

Thank

Juraj

Offline
***
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #1 on: January 26, 2022, 08:17:51 PM »
This is an intended and normal behavior. CWP devs has constantly said  NOT edit the default templates (tpl and stpl). You need to clone a template, give it a new name and then edit it, then use the new template that you have made.

https://wiki.centos-webpanel.com/webservers-vhost-templates
« Last Edit: January 26, 2022, 08:49:45 PM by iraqiboy90 »

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #2 on: January 26, 2022, 09:58:00 PM »
Hi friends ...

We have had some problems with varnish ...
----------------------------------------------------
Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: 1279924
----------------------------------------------------

we use webserver configuration nginx-varnish-apache-php-fpm...
after some study/investigation of internet we found recomendations some changes in config files ...

we have added them to the files in: /etc/varnish/default.vcl
and we have added them have updated files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl


then we have updated all domains in CWP > WebServers Domain Conf
And all changes  from default.vcl or default.tpl were updated in files in all fomain files: /etc/varnish/conf.d/vhosts

After this was everything OK and Error 503 Backend fetch failed .... they came only very rarely ....


But the biggest that after some time (may be after CWP update) the config files were rewrited to old ones ...
files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl
and
all fomain files: /etc/varnish/conf.d/vhosts

all our changes were lost ...

Please why ???

we think that it is very BAD!!!

CAn you do something with this ???

Thank

Juraj
I have the same problem with varnish, can I ask for information what should be changed in these templates?

Offline
***
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #3 on: January 28, 2022, 02:51:00 AM »
I just right now installed a new CWP server, and had this problem too. (503 backend error)

For some reason, the CWP install script didn't install the correct file '/etc/varnish/default.vcl'.
The content of the installed file is the original file from the varnish distribution, without any modification, and is proxying to 127.0.0.1 on port 8080, which does not exist.

So, to fix the problem, just change the '/etc/varnish/default.vcl' file, removing its content and replacing it with the following content:
Code: [Select]
vcl 4.0;
backend default { .host = "107.191.125.119"; .port = "8181";}
include "/etc/varnish/conf.d/vhosts.conf";

Regards,
Netino

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #4 on: February 03, 2022, 09:57:05 PM »
This is an intended and normal behavior. CWP devs has constantly said  NOT edit the default templates (tpl and stpl). You need to clone a template, give it a new name and then edit it, then use the new template that you have made.

https://wiki.centos-webpanel.com/webservers-vhost-templates

Hi friends,

I know this normal behavior ...
1. I have created my own default-XX.vcl
2. rewrited all domains in /etc/varnish/conf.d/vhosts....

but all changes were deleted after CWP wersion ubdate ...

And this seems to be very bad ...

Nobody can edit changes every CWP version update ...

!!!!!!! PLEASE Do something with this .... !!!!!!!

Juraj

Offline
***
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #5 on: February 03, 2022, 11:53:25 PM »
1. I have created my own default-XX.vcl
2. rewrited all domains in /etc/varnish/conf.d/vhosts....


I don't understand why you repeat the same error. Are you directly modifying the files in /etc/varnish/conf.d/vhosts ??

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #6 on: February 05, 2022, 11:22:27 PM »
Hi I have changed it using CWP GUI > Webservers Conf Editor > Tab:varnish > SubTab>/etc/varnish/conf.d/vhosts where are conf files for each of my domains ....

/etc/varnish/conf.d/vhosts/my-domain1.sk.conf
/etc/varnish/conf.d/vhosts/my-domain2.sk.conf
/etc/varnish/conf.d/vhosts/my-domain3.sk.conf
...
/etc/varnish/conf.d/vhosts/my-domainXXX.sk.conf

I assume that these files are generated for each domain when it is created-inserted into the system ...
I have no idea why they should change with every CWP upgrade?

Juraj



Offline
****
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #7 on: February 06, 2022, 01:38:01 AM »
Copy /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl to /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/custom.tpl

Make your modifications for the port there.

In CWP, goto WebServer Settings -> WebServers Main Config

Set the template to custom.tpl

On Update, the sites should rebuild using your custom.tpl file
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #8 on: February 06, 2022, 10:55:26 PM »
Copy /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl to /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/custom.tpl

Make your modifications for the port there.

In CWP, goto WebServer Settings -> WebServers Main Config

Set the template to custom.tpl

On Update, the sites should rebuild using your custom.tpl file


HI rcschaff,
If you will read all my posts in this article, you will be able to see that this was done almost at the beginning.

After this change I have used this CUSTOM.tpl in CWP GUI > Webservers Domains Conf Editor > for each domain ....
in place ...
See picture ...https://cimborka.sk/Varnish_Screenshot_LI.jpg
But after CWP sw update all changes created in formular are lost ....  see pisture...

WHY??

Thanks
Juraj





Offline
****
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #9 on: February 07, 2022, 12:14:11 AM »
The only thing I can think of, is not name it default.  Being as the code is encrypted, I can't really see what's going on, but if it's not rebuilding from your custom file each update, there's definitely a bug.  I have Nginx with custom configs for wordpress, and they don't behave this way.
Google Hangouts:  rcschaff82@gmail.com

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #10 on: February 08, 2022, 12:04:32 PM »
Hi rcschaff,
thank you ..

I will wait how it will behave next updates of CWP.
Thank you for you answers :-)

Juraj

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #11 on: February 08, 2022, 08:38:58 PM »
maybe your template has some issue since it works fine when switching per domain between default/wordpress template.

try to check webservers rebuild logs to know the issue.
Code: [Select]
/var/log/cwp/webservers.log
VPS & Dedicated server provider with included FREE Managed support for CWP.
http://www.studio4host.com/

*** Don't allow that your server or website is down, choose hosting provider with included expert managed support for your CWP.

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #12 on: August 20, 2022, 06:54:54 AM »
I am facing the same problem.
Have you got the solustion?

Error 503 Backend fetch failed
Backend fetch failed

Guru Meditation:
XID: 4522142

Varnish cache server

Hi friends ...

We have had some problems with varnish ...
----------------------------------------------------
Error 503 Backend fetch failed

Backend fetch failed
Guru Meditation:

XID: 1279924
----------------------------------------------------

we use webserver configuration nginx-varnish-apache-php-fpm...
after some study/investigation of internet we found recomendations some changes in config files ...

we have added them to the files in: /etc/varnish/default.vcl
and we have added them have updated files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl


then we have updated all domains in CWP > WebServers Domain Conf
And all changes  from default.vcl or default.tpl were updated in files in all fomain files: /etc/varnish/conf.d/vhosts

After this was everything OK and Error 503 Backend fetch failed .... they came only very rarely ....


But the biggest that after some time (may be after CWP update) the config files were rewrited to old ones ...
files in : /usr/local/cwpsrv/htdocs/resources/conf/web_servers/vhosts/varnish/default.tpl
and
all fomain files: /etc/varnish/conf.d/vhosts

all our changes were lost ...

Please why ???

we think that it is very BAD!!!

CAn you do something with this ???

Thank

Juraj

Offline
***
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #13 on: August 20, 2022, 03:47:10 PM »
happen to me too


but...
i use wordpress and run rss fetch...
via free cloudflare with proxy on and flexible mode.
cwp varnish config webserver using wordpress template ( better, than  using default)

if i bypass the Cloudflare proxy (disable/gray) everything run well

Offline
*
Re: Problem with VARNISH config files .... and CWP update to new version
« Reply #14 on: January 05, 2023, 12:02:53 PM »
Hello guys!

I've been experimenting with CWP for a while now. We already have several servers in production using it and we like it.

Most errors are resolved by doing a "rebuild".

I solved this problem on one of the servers by doing the following:

Select WebServers -> Save & Rebuild Configuration

I understand that many days have passed, but I hope this information can help someone in the future.

André Bastos
ISBrasil Hospedagem de Site