Question: Director vdir returned no backend #34

Closed
freekmurze opened this Issue Nov 3, 2016 · 3 comments

Projects

None yet

3 participants

@freekmurze

Hi,

first of all, thank you for putting this together.

I'm using the untouched template from this repo to set up a fresh Varnish 4.1 installation.

My webserver is running on port 80. When browsing to port 6081 I see this in the output of varnishlog

-   FetchError     Director vdir returned no backend
-   FetchError     No backend

Performing curl 127.0.0.1 on the terminal of the server does return the html I'm expecting.

Do you have any clue why the Director vdir returned no backend message is given and how it can be solved?

@freekmurze

Got it! The probe expect a 200 response. In my app / is a 301. So Varnish was thinking the backend was unhealty. Ah, the adventures of a Varnish noob.

@freekmurze freekmurze closed this Nov 3, 2016
@mattiasgeniar
Owner

This leads me to believe the default template, which includes a healthprobe, should also have sane handling if that probe returns "unhealthy" and some guides on how to fix that. You're not the first to run into that problem.

Consider this an improvement/feature request!

@clebuchegger
clebuchegger commented Nov 9, 2016 edited

addition from debugging a problem, using varnish before nginx + phpfpm + wordpress:

.request =
  "HEAD / HTTP/1.1"
  "Host: localhost"
  "Connection: close"
  "User-Agent: Varnish Health Probe";

this got me a 301, i solved this by changing the "Host: localhost" header of the request to my domain:

 .request =
   "HEAD / HTTP/1.1"
   "Host: mydomain.com"
   "Connection: close"
   "User-Agent: Varnish Health Probe";

see also:
http://serverfault.com/a/574580/384907

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment