I have a server running Varnish and nginx. The frontend website reports a 503 error:
Error 503 Service Unavailable
Service Unavailable
Guru Meditation:
XID: 317911182Varnish cache server
This is the content of /etc/varnish/foo.vcl:
backend default { .host = "127.0.0.1"; .port = "8080"; .connect_timeout = 1s; .first_byte_timeout = 90s; .between_bytes_timeout = 90s; } varnishlog apparently shows no issue:
0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1486463718 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1486463721 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1486463724 1.0 0 CLI - Rd ping 0 CLI - Wr 200 19 PONG 1486463727 1.0 However, there is no service running on port 8080 on localhost:
server# netstat -anp | grep 8080 server# telnet localhost 8080 Trying ::1... telnet: connect to address ::1: Connection refused Trying 127.0.0.1... telnet: connect to address 127.0.0.1: Connection refused and in fact the nginx log reports an error while trying to connect to it:
2017/02/07 11:51:11 [error] 2008#0: *188 connect() failed (111: Connection refused) while connecting to upstream, client: 10.2.3.4, server: _, request: "GET /mydir/ HTTP/1.1", upstream: "http://127.0.0.1:8080/mydir/", host: "myhost.example.com" What could I check to further troubleshoot the issue?
varnishlogdoesn't return an error? Does it just ping the server without probing the port?