Dienstag, 22. April 2014

NodeJs socket hang up

events.js:72

        throw er; // Unhandled 'error' event
              ^
Error: socket hang up
    at createHangUpError (http.js:1472:15)
    at Socket.socketOnEnd [as onend] (http.js:1568:23)
    at Socket.g (events.js:180:16)
    at Socket.EventEmitter.emit (events.js:117:20)
    at _stream_readable.js:920:16
    at process._tickCallback (node.js:415:13)


This error happens even with the latest nodejs version if you're using a ssl certificate whose domain cannot be resolved by your dns.

Let's say your SSL certificate is issued to www.your-domain.com make sure a dns lookup can resolve this domain.

Simply add your domain to your /etc/hosts file
127.0.0.1 www.your-domain.com

If your using a wildcard certificate *.your-domain.com you can simply add this domain to your /etc/hosts file:

127.0.0.1 *.your-domain.com

5 Kommentare:

  1. Awesome article. It is so detailed and well formatted that i enjoyed reading it as well as get some new information too.
    online Python certification course | python training in OMR | Python training course in Chennai

    AntwortenLöschen
  2. Nice information, valuable and excellent design, as share good stuff with good ideas and concepts, lots of great information and inspiration, both of which I need, thanks to offer such a helpful information here.
    Data Science Course in Indira nagar | Data Science Course in btm layout

    Python course in Kalyan nagar | Data Science course in Indira nagar

    Data Science Course in Marathahalli | Data Science Course in BTM Layout

    AntwortenLöschen