title: Unable to reach Sentry log server: EOF occurred in violation of protocol
body: <p>I'm having trouble with setting up Sentry server in HTTPS mode. Every now and then, reasonably often while seemingly random, this error message gets written by Raven (Sentry client) into log files:</p>
  
  <pre><code>Unable to reach Sentry log server: &lt;urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol&gt; (url: https://$(valid_server)/)
  </code></pre>
  
  <p>Web UI works fine. Vast majority of the messages from Raven are received fine and Sentry processes them into usable output. However, due to these errors, something gets lost from time to time.</p>
  
  <p>I have tried to figure this one out, but dead ends seem to follow another. Basically it seems a lot like this:</p>
  
  <p><a href="https://stackoverflow.com/questions/14102416/python-requests-requests-exceptions-sslerror-errno-8-ssl-c504-eof-occurred">Python Requests requests.exceptions.SSLError: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol</a></p>
  
  <p>But when testing my Sentry server with similar s_client query using TLS 1.2, it leads to a valid session unlike with the example there.</p>
  
  <p>It's also not about this, since SNI isn't used:</p>
  
  <p><a href="https://stackoverflow.com/questions/19399975/python-requests-2-0-0-errno-8-ssl-c504-eof-occurred-in-violation-of-proto">python-requests 2.0.0 - [Errno 8] _ssl.c:504: EOF occurred in violation of protocol</a></p>
  
  <p>I'm not able to reproduce the error coherently. Raven's tests are passed and nothing is acutely wrong, until an error pops up in the log.</p>
  
  <p>My set up is: Raven 4.2.1 in Python 2.7.5, Nginx 1.6.0 as reverse proxy handling HTTPS, and finally Sentry 6.4.4 with default Gunicorn 0.17.4. Nginx configs are pretty much similar to official documentation (<a href="http://sentry.readthedocs.org/en/latest/quickstart/nginx.html" rel="nofollow noreferrer">http://sentry.readthedocs.org/en/latest/quickstart/nginx.html</a>) with a few alterations due to HTTPS.</p>