title: Prerender does not return a page response
body: <p>Long story short:</p>
  
  <ol>
  <li>Server OS got updated, which broke my virtualenv's. Before this everything worked just fine.</li>
  <li>Reinstalled the environment.</li>
  <li>Tried to fire up Prerender.io middleware with the following env variables (usually run by supervisor, now tried manually):</li>
  </ol>
  
  <p>`</p>
  
  <pre><code>export PORT=35292
  export PRERENDER_SERVICE_URL='http://localhost:35292/'
  export PHANTOMJS_PORT=35294
  export PHANTOM_CLUSTER_NUM_WORKERS=5
  export PHANTOM_WORKER_ITERATIONS=10
  export CACHE_ROOT_DIR="/home/users/jz/snapshot-env/prerender/filecache/"
  export CACHE_LIVE_TIME=7200
  PHANTOM_CLUSTER_MESSAGE_TIMEOUT=800
  </code></pre>
  
  <p>`</p>
  
  <ol start="4">
  <li>Set up the demo server <code>demoserver.js</code>:</li>
  </ol>
  
  <p>`</p>
  
  <pre><code>#!/usr/bin/env node
  var prerender = require('./lib');
  
  var server = prerender({
      workers: process.env.PRERENDER_NUM_WORKERS,
      iterations: process.env.PRERENDER_NUM_ITERATIONS
  });
  
  
  //server.use(prerender.sendPrerenderHeader());
  // server.use(prerender.basicAuth());
  // server.use(prerender.whitelist());
  server.use(prerender.blacklist());
  // server.use(prerender.logger());
  server.use(prerender.removeScriptTags());
  server.use(prerender.httpHeaders());
  // server.use(prerender.inMemoryHtmlCache());
  // server.use(prerender.s3HtmlCache());
  
  server.start();
  </code></pre>
  
  <p>`</p>
  
  <ol start="5">
  <li>Server starts:</li>
  </ol>
  
  <p>`</p>
  
  <pre><code>$ node demoserver.js 
  2016-05-24T01:41:35.814Z starting worker thread #0
  2016-05-24T01:41:35.832Z starting worker thread #1
  2016-05-24T01:41:35.839Z starting worker thread #2
  2016-05-24T01:41:35.842Z starting worker thread #3
  2016-05-24T01:41:35.844Z starting worker thread #4
  2016-05-24T01:41:36.120Z starting phantom...
  2016-05-24T01:41:36.132Z Server running on port 35292
  2016-05-24T01:41:36.135Z starting phantom...
  2016-05-24T01:41:36.146Z starting phantom...
  2016-05-24T01:41:36.152Z Server running on port 35292
  2016-05-24T01:41:36.153Z starting phantom...
  2016-05-24T01:41:36.160Z Server running on port 35292
  2016-05-24T01:41:36.170Z Server running on port 35292
  2016-05-24T01:41:36.176Z starting phantom...
  2016-05-24T01:41:36.190Z Server running on port 35292
  Fontconfig warning: ignoring UTF-8: not a valid region tag
  Fontconfig warning: ignoring UTF-8: not a valid region tag
  Fontconfig warning: ignoring UTF-8: not a valid region tag
  Fontconfig warning: ignoring UTF-8: not a valid region tag
  Fontconfig warning: ignoring UTF-8: not a valid region tag
  </code></pre>
  
  <p>`</p>
  
  <ol start="6">
  <li>Try to access the server locally:</li>
  </ol>
  
  <p><code>$ lynx http://localhost:35292/http://google.com</code></p>
  
  <p>I see it tries to fetch the page, but no response:
  HTTP request sent; waiting for response.</p>
  
  <p>On the server log I see it has received the request:</p>
  
  <p><code>2016-05-24T01:53:42.449Z getting http://google.com/</code></p>
  
  <p>After that no entries and no action. I see prerender has indeed spawned several phantomjs processes, but for some reason nothing happens. </p>
  
  <p>Any ideas how to debug this further to see why phantomjs is not processing or returning the request?</p>
  
  <p>Edit: npm install output <a href="https://gist.github.com/amergin/abe2c31e385e03521cc8c5792c90c41b" rel="nofollow">here</a> - don't see anything fishy.</p>
  
  <pre><code>(snapshot-env)jz@lakka:~/snapshot-env/prerender$ uname -a
  Linux lakka 3.14.66-grbfs-kapsi #1 SMP Sat Apr 16 10:30:24 EEST 2016 x86_64 GNU/Linux
  
  
  (snapshot-env)jz@lakka:~/snapshot-env/prerender$ cat /etc/*release
  PRETTY_NAME="Debian GNU/Linux 8 (jessie)"
  NAME="Debian GNU/Linux"
  VERSION_ID="8"
  VERSION="8 (jessie)"
  ID=debian
  HOME_URL="http://www.debian.org/"
  SUPPORT_URL="http://www.debian.org/support"
  BUG_REPORT_URL="https://bugs.debian.org/"
  </code></pre>
  
  <p>Node version:</p>
  
  <pre><code>jz@lakka:~$ cd snapshot-env;source bin/activate
  (snapshot-env)jz@lakka:~/snapshot-env$ node -v
  v6.2.0
  </code></pre>