Mailing List Archive

config error
Hello,

I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.


backend stgncwrite {
.host = "stg.ncwrite.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}




backend stgpegwritingscholar {
.host = "stg.pegwritingscholar.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}



sub vcl_recv {
if(req.http.host == "stg.ncwrite.com"){
set req.backend_hint = stgncwrite;
} else if (req.http.host == "stg.pegwritingscholar.com"){
set req.backend_hint = stgpegwritingscholar;
return (hash);
}



#sub vcl_pass {





sub vcl_backend_response {
set beresp.grace = 6h;
set beresp.ttl = 5m;
}



This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
Probably your vcl_recv should look like this-

sub vcl_recv {
if (req.http.host == "stg.ncwrite.com") {
set req.backend_hint = stgncwrite;
}
if (req.http.host == "stg.pegwritingscholar.com"){
set req.backend_hint = stgpegwritingscholar;
}
return (hash);
}

Also in my humble opinion its dangerous to use DNS names for backends. If DNS is slow/down then your backends won't be reachable. Better to use IP address when defining host and send the Host header from client or set in VCL


On 08/21/2017 03:11 PM, Rodney Bizzell wrote:

Hello,

I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.


backend stgncwrite {
.host = "stg.ncwrite.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}




backend stgpegwritingscholar {
.host = "stg.pegwritingscholar.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}



sub vcl_recv {
if(req.http.host == "stg.ncwrite.com"){
set req.backend_hint = stgncwrite;
} else if (req.http.host == "stg.pegwritingscholar.com"){
set req.backend_hint = stgpegwritingscholar;
return (hash);
}



#sub vcl_pass {





sub vcl_backend_response {
set beresp.grace = 6h;
set beresp.ttl = 5m;
}



This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org<mailto:varnish-misc@varnish-cache.org>
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
When I made the change an error comes up and says backend stgpegwritingscholar {

________________________________
From: Bender, Charles <charles@beachcamera.com>
Sent: Monday, August 21, 2017 3:24 PM
To: Rodney Bizzell; varnish-misc
Subject: Re: config error


Probably your vcl_recv should look like this-

sub vcl_recv {
if (req.http.host == "stg.ncwrite.com") {
set req.backend_hint = stgncwrite;
}
if (req.http.host == "stg.pegwritingscholar.com"){
set req.backend_hint = stgpegwritingscholar;
}
return (hash);
}

Also in my humble opinion its dangerous to use DNS names for backends. If DNS is slow/down then your backends won't be reachable. Better to use IP address when defining host and send the Host header from client or set in VCL


On 08/21/2017 03:11 PM, Rodney Bizzell wrote:

Hello,

I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.


backend stgncwrite {
.host = "stg.ncwrite.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}




backend stgpegwritingscholar {
.host = "stg.pegwritingscholar.com";
.port = "80";
.connect_timeout = 5s;
.first_byte_timeout = 60s;
.between_bytes_timeout = 60s;
.probe = {
.url = "/";
.timeout = 5s;
.interval = 5s;
.window = 5;
.threshold = 3;
}



sub vcl_recv {
if(req.http.host == "stg.ncwrite.com"){
set req.backend_hint = stgncwrite;
} else if (req.http.host == "stg.pegwritingscholar.com"){
set req.backend_hint = stgpegwritingscholar;
return (hash);
}



#sub vcl_pass {





sub vcl_backend_response {
set beresp.grace = 6h;
set beresp.ttl = 5m;
}



This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org<mailto:varnish-misc@varnish-cache.org>
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc




_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
Which error are you getting?

Rodney Bizzell <rbizzell@measinc.com> wrote:

>Hello,
>
>I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.
>
>
>backend stgncwrite {
> .host = "stg.ncwrite.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>
>backend stgpegwritingscholar {
> .host = "stg.pegwritingscholar.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>sub vcl_recv {
> if(req.http.host == "stg.ncwrite.com"){
> set req.backend_hint = stgncwrite;
> } else if (req.http.host == "stg.pegwritingscholar.com"){
> set req.backend_hint = stgpegwritingscholar;
> return (hash);
> }
>
>
>
>#sub vcl_pass {
>
>
>
>
>
>sub vcl_backend_response {
> set beresp.grace = 6h;
> set beresp.ttl = 5m;
>}
>
>
>
>This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
>
>_______________________________________________
>varnish-misc mailing list
>varnish-misc@varnish-cache.org
>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
When I run varnishd -C -f /etc/varnish/default.vcl
Expected '.' got 'backend'
(program line 94), at
('/etc/varnish/default.vcl' Line 36 Pos 1)
backend stgpegwritingscholar {
#######-----------------------

________________________________________
From: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
Sent: Monday, August 21, 2017 3:36 PM
To: Rodney Bizzell; varnish-misc
Subject: Re: config error

Which error are you getting?

Rodney Bizzell <rbizzell@measinc.com> wrote:

>Hello,
>
>I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.
>
>
>backend stgncwrite {
> .host = "stg.ncwrite.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>
>backend stgpegwritingscholar {
> .host = "stg.pegwritingscholar.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>sub vcl_recv {
> if(req.http.host == "stg.ncwrite.com"){
> set req.backend_hint = stgncwrite;
> } else if (req.http.host == "stg.pegwritingscholar.com"){
> set req.backend_hint = stgpegwritingscholar;
> return (hash);
> }
>
>
>
>#sub vcl_pass {
>
>
>
>
>
>sub vcl_backend_response {
> set beresp.grace = 6h;
> set beresp.ttl = 5m;
>}
>
>
>
>This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
>
>_______________________________________________
>varnish-misc mailing list
>varnish-misc@varnish-cache.org
>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
Maybe this is just a copy/paste issue, but it looks like you are missing close brackets on a bunch of those statements: ‘}’


::Adam


On 8/21/17, 2:47 PM, "varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of Rodney Bizzell" <varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of rbizzell@measinc.com> wrote:

When I run varnishd -C -f /etc/varnish/default.vcl
Expected '.' got 'backend'
(program line 94), at
('/etc/varnish/default.vcl' Line 36 Pos 1)
backend stgpegwritingscholar {
#######-----------------------

________________________________________
From: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
Sent: Monday, August 21, 2017 3:36 PM
To: Rodney Bizzell; varnish-misc
Subject: Re: config error

Which error are you getting?

Rodney Bizzell <rbizzell@measinc.com> wrote:

>Hello,
>
>I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.
>
>
>backend stgncwrite {
> .host = "stg.ncwrite.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>
>backend stgpegwritingscholar {
> .host = "stg.pegwritingscholar.com";
> .port = "80";
> .connect_timeout = 5s;
> .first_byte_timeout = 60s;
> .between_bytes_timeout = 60s;
> .probe = {
> .url = "/";
> .timeout = 5s;
> .interval = 5s;
> .window = 5;
> .threshold = 3;
> }
>
>
>
>sub vcl_recv {
> if(req.http.host == "stg.ncwrite.com"){
> set req.backend_hint = stgncwrite;
> } else if (req.http.host == "stg.pegwritingscholar.com"){
> set req.backend_hint = stgpegwritingscholar;
> return (hash);
> }
>
>
>
>#sub vcl_pass {
>
>
>
>
>
>sub vcl_backend_response {
> set beresp.grace = 6h;
> set beresp.ttl = 5m;
>}
>
>
>
>This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
>
>_______________________________________________
>varnish-misc mailing list
>varnish-misc@varnish-cache.org
>https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc


_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
It looks like you are missing a closing bracket right before the second backend definition

    backend stgpegwritingscholar {
    #######-----------------------

Adam Schumacher <adam.schumacher@flightaware.com> wrote:

>Maybe this is just a copy/paste issue, but it looks like you are missing close brackets on a bunch of those statements: ‘}’
>
>
>::Adam
>
>
>On 8/21/17, 2:47 PM, "varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of Rodney Bizzell" <varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of rbizzell@measinc.com> wrote:
>
> When I run varnishd -C -f /etc/varnish/default.vcl
> Expected '.' got 'backend'
> (program line 94), at
> ('/etc/varnish/default.vcl' Line 36 Pos 1)
> backend stgpegwritingscholar {
> #######-----------------------
>
> ________________________________________
> From: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
> Sent: Monday, August 21, 2017 3:36 PM
> To: Rodney Bizzell; varnish-misc
> Subject: Re: config error
>
> Which error are you getting?
>
> Rodney Bizzell <rbizzell@measinc.com> wrote:
>
> >Hello,
> >
> >I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.
> >
> >
> >backend stgncwrite {
> > .host = "stg.ncwrite.com";
> > .port = "80";
> > .connect_timeout = 5s;
> > .first_byte_timeout = 60s;
> > .between_bytes_timeout = 60s;
> > .probe = {
> > .url = "/";
> > .timeout = 5s;
> > .interval = 5s;
> > .window = 5;
> > .threshold = 3;
> > }
> >
> >
> >
> >
> >backend stgpegwritingscholar {
> > .host = "stg.pegwritingscholar.com";
> > .port = "80";
> > .connect_timeout = 5s;
> > .first_byte_timeout = 60s;
> > .between_bytes_timeout = 60s;
> > .probe = {
> > .url = "/";
> > .timeout = 5s;
> > .interval = 5s;
> > .window = 5;
> > .threshold = 3;
> > }
> >
> >
> >
> >sub vcl_recv {
> > if(req.http.host == "stg.ncwrite.com"){
> > set req.backend_hint = stgncwrite;
> > } else if (req.http.host == "stg.pegwritingscholar.com"){
> > set req.backend_hint = stgpegwritingscholar;
> > return (hash);
> > }
> >
> >
> >
> >#sub vcl_pass {
> >
> >
> >
> >
> >
> >sub vcl_backend_response {
> > set beresp.grace = 6h;
> > set beresp.ttl = 5m;
> >}
> >
> >
> >
> >This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
> >
> >_______________________________________________
> >varnish-misc mailing list
> >varnish-misc@varnish-cache.org
> >https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
Re: config error [ In reply to ]
okay let me double check my config thanks!
________________________________________
From: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
Sent: Monday, August 21, 2017 5:37 PM
To: Adam Schumacher; Rodney Bizzell; varnish-misc
Subject: Re: config error

It looks like you are missing a closing bracket right before the second backend definition

backend stgpegwritingscholar {
#######-----------------------

Adam Schumacher <adam.schumacher@flightaware.com> wrote:

>Maybe this is just a copy/paste issue, but it looks like you are missing close brackets on a bunch of those statements: ?}?
>
>
>::Adam
>
>
>On 8/21/17, 2:47 PM, "varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of Rodney Bizzell" <varnish-misc-bounces+adam.schumacher=flightaware.com@varnish-cache.org on behalf of rbizzell@measinc.com> wrote:
>
> When I run varnishd -C -f /etc/varnish/default.vcl
> Expected '.' got 'backend'
> (program line 94), at
> ('/etc/varnish/default.vcl' Line 36 Pos 1)
> backend stgpegwritingscholar {
> #######-----------------------
>
> ________________________________________
> From: Miguel Gonzalez <miguel_3_gonzalez@yahoo.es>
> Sent: Monday, August 21, 2017 3:36 PM
> To: Rodney Bizzell; varnish-misc
> Subject: Re: config error
>
> Which error are you getting?
>
> Rodney Bizzell <rbizzell@measinc.com> wrote:
>
> >Hello,
> >
> >I am not sure why I am getting a config error can't see what I am missing here is a copy of my config.
> >
> >
> >backend stgncwrite {
> > .host = "stg.ncwrite.com";
> > .port = "80";
> > .connect_timeout = 5s;
> > .first_byte_timeout = 60s;
> > .between_bytes_timeout = 60s;
> > .probe = {
> > .url = "/";
> > .timeout = 5s;
> > .interval = 5s;
> > .window = 5;
> > .threshold = 3;
> > }
> >
> >
> >
> >
> >backend stgpegwritingscholar {
> > .host = "stg.pegwritingscholar.com";
> > .port = "80";
> > .connect_timeout = 5s;
> > .first_byte_timeout = 60s;
> > .between_bytes_timeout = 60s;
> > .probe = {
> > .url = "/";
> > .timeout = 5s;
> > .interval = 5s;
> > .window = 5;
> > .threshold = 3;
> > }
> >
> >
> >
> >sub vcl_recv {
> > if(req.http.host == "stg.ncwrite.com"){
> > set req.backend_hint = stgncwrite;
> > } else if (req.http.host == "stg.pegwritingscholar.com"){
> > set req.backend_hint = stgpegwritingscholar;
> > return (hash);
> > }
> >
> >
> >
> >#sub vcl_pass {
> >
> >
> >
> >
> >
> >sub vcl_backend_response {
> > set beresp.grace = 6h;
> > set beresp.ttl = 5m;
> >}
> >
> >
> >
> >This email (including any attachments) may contain confidential information intended solely for acknowledged recipients. If you think you have received this information in error, please reply to the sender and delete all copies from your system. Please note that unauthorized use, disclosure, or further distribution of this information is prohibited by the sender. Note also that we may monitor email directed to or originating from our network. Thank you for your consideration and assistance. |
> >
> >_______________________________________________
> >varnish-misc mailing list
> >varnish-misc@varnish-cache.org
> >https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc@varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>

_______________________________________________
varnish-misc mailing list
varnish-misc@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc