user3066341
user3066341

Reputation: 43

Varnish error : no backend connection

I tried to install Varnish on my debian 7 with apache2.

But when i type www.mydomain.com:6081 to test the connection, i got a 503 error service unavaible.

Varnish log says :

 12 Hash         c www.mywebsite.com:6081
 12 VCL_return   c hash
 12 VCL_call     c pass pass
 12 FetchError   c no backend connection
 12 VCL_call     c error deliver
 12 VCL_call     c deliver deliver
 12 TxProtocol   c HTTP/1.1
 12 TxStatus     c 503

My etc/varnish/default.vcl file : (only one backend for now)

 backend site1 {
  .host = "92.243.5.12"; // ip adress for www.mydomain.com
  .port = "8080";
  .connect_timeout = 6000s;
  .first_byte_timeout = 6000s;
  .between_bytes_timeout = 6000s;
 }

# Default backend is set to site1
 set req.backend = site1;

My etc/default/varnish file :

   DAEMON_OPTS="-a :80
   -T localhost:6082
   -f /etc/varnish/default.vcl
   -S /etc/varnish/secret
   -p thread_pool_add_delay=2
   -p thread_pools=4
   -p thread_pool_min=200
   -p thread_pool_max=4000
   -p cli_timeout=25
   -p session_linger=100
   -s file,/var/lib/varnish/$INSTANCE/varnish_storage.bin,1G"

Thank you very much

Upvotes: 0

Views: 2460

Answers (1)

mghh
mghh

Reputation: 47

In your conf file, you are making varnish listen to port 80 and you are sending requests to port 6081, that may be a reason.

Upvotes: -1

Related Questions