typicode / hotel

🏩 A simple process manager for developers. Start apps from your browser and access them using local domains
MIT License
9.98k stars 422 forks source link

Crashing - not sure of the cause #180

Open pebcakerror opened 7 years ago

pebcakerror commented 7 years ago

I'm trying to use hotel for some NodeBB development. I've added the server via hotel add 'node app.js' --port 4567

A couple of seconds after starting hotel crashes.

I've pasted the full ~/.hotel/daemon.log

7 Mar 14:03:02 - Watching /Users/me/.hotel/servers
7 Mar 14:03:02 - /Users/me/.hotel/servers/nodebb.json added
7 Mar 14:03:02 - Add server nodebb
create /Users/me/.hotel/daemon.pid 66917
7 Mar 14:03:02 - Server listening on port 127.0.0.1:2000
7 Mar 14:03:02 - /Users/me/.hotel/servers/nodebb.json added
7 Mar 14:03:02 - Add server nodebb
7 Mar 14:03:23 - Resolve nodebb
7 Mar 14:03:23 - nodebb has started
7 Mar 14:03:31 - Resolve nodebb
7 Mar 14:03:31 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:31 - Resolve nodebb
7 Mar 14:03:31 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:31 - Resolve nodebb
7 Mar 14:03:31 - Resolve nodebb
7 Mar 14:03:31 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:31 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
(node:66917) Warning: Possible EventEmitter memory leak detected. 11 stop listeners added. Use emitter.setMaxListeners() to increase limit
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:32 - Resolve nodebb
7 Mar 14:03:32 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:33 - Proxy http://nodebb.dev to http://localhost:4567
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - Resolve nodebb
7 Mar 14:03:33 - Proxy error - connect ECONNREFUSED 127.0.0.1:80
Exiting
Stop daemon
Remove pid file
/Users/me/.nvm/versions/node/v6.9.1/lib/node_modules/hotel/lib/daemon/group.js:277
      var msg = errorMsg(err, req.hotel.item);
                                       ^

TypeError: Cannot read property 'item' of undefined
    at ProxyServer.handleProxyError (/Users/me/.nvm/versions/node/v6.9.1/lib/node_modules/hotel/lib/daemon/group.js:277:40)
    at ProxyServer.emit (/Users/me/.nvm/versions/node/v6.9.1/lib/node_modules/hotel/node_modules/eventemitter3/index.js:144:27)
    at ClientRequest.onOutgoingError (/Users/me/.nvm/versions/node/v6.9.1/lib/node_modules/hotel/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:151:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketErrorListener (_http_client.js:310:9)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at emitErrorNT (net.js:1276:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
pebcakerror commented 7 years ago

With a little more digging this appears to only be happening with https.

I did a clean install of hotel and added nodebb back in. I started it up and navigated around for a bit. Then flipped to https and it immediately crashed.

typicode commented 7 years ago

Thank you for the research :+1:

There's an unhandled case. It should be easy to prevent hotel daemon from crashing again, thanks to the stacktrace, but it won't solve the root cause.

I would have a few questions to try to reproduce locally:

pebcakerror commented 7 years ago

Yes, the server is opening several websockets.

For the .dev I originally had Laravel Valet for some php projects. I first stopped valet with valet stop. Then I installed and started hotel. I'm on Mac 10.11.6 El Capitan. I went into System Preferences > Network > Advanced > Proxies > Automatic Proxy Configuration and pasted http://localhost:2000/proxy.pac

Mac 10.11.6 El Capitan Version 56.0.2924.87 (64-bit)

typicode commented 7 years ago

Thanks a lot for the details! To install Laraval, should I use https://laravel.com/docs/5.4/installation#installing-laravel Composer?

pebcakerror commented 7 years ago

I was using Valet as a general purpose tool for php development with .dev domains. In this particular case I was using CraftCMS which is actually based on Symphony. https://craftcms.com/docs/installing https://3redkites.com/blog/entry/craft-cms-with-laravel-valet-how-to-setup-local-web-development-environment-on-a-mac/

That said, I just ran a quick install with Composer using that documentation and it worked fine with valet.

productiveme commented 7 years ago

Hi there, I'm attempting to reach my app via https with similar results. Any help would be greatly appreciated. The app relies on the Asana API which is now requiring an SSL endpoint for the OAuth callback.

See the ~/.hotel/daemon.log below:

11 Mar 14:23:54 - Watching /Users/jacoswarts/.hotel/servers 11 Mar 14:24:01 - Resolve timesheets 11 Mar 14:24:02 - timesheets has started 11 Mar 14:24:05 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:22 - Resolve timesheets 11 Mar 14:24:22 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:22 - Resolve timesheets 11 Mar 14:24:22 - Connect - proxy socket to 55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets (node) warning: possible EventEmitter memory leak detected. 11 stop listeners added. Use emitter.setMaxListeners() to increase limit. Trace at addListener (events.js:239:17) at once (events.js:265:8) at Group.proxy (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:389:14) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:25:15 at Group.start (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:314:11) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:24:13 at Group.exists (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:303:7) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:23:11 at Layer.handle [as handle_request] (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/express/lib/router/index.js:317:13) 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:28 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - Proxy http://timesheets.dev to http://localhost:55000 11 Mar 14:24:29 - Resolve timesheets 11 Mar 14:24:29 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined 11 Mar 14:24:29 - Proxy error - connect ECONNREFUSED 127.0.0.1:80 Exiting Stop daemon Remove pid file /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:277 var msg = errorMsg(err, req.hotel.item); ^

TypeError: Cannot read property 'item' of undefined at ProxyServer.handleProxyError (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:277:40) at ProxyServer.emit (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/http-proxy/node_modules/eventemitter3/index.js:144:27) at ClientRequest.onOutgoingError (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:151:16) at emitOne (events.js:77:13) at ClientRequest.emit (events.js:169:7) at Socket.socketErrorListener (_http_client.js:269:9) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at emitErrorNT (net.js:1269:8) at nextTickCallbackWith2Args (node.js:442:9)

typicode commented 7 years ago

Just published v0.7.1, it should prevent daemon from crashing but I've not yet figured out why there's this error. Logs with v0.7.1 are welcome.

productiveme commented 7 years ago

I installed v0.7.1 and I'm attaching the log for my app below if that can help:

13 Mar 08:48:42 - Watching /Users/jacoswarts/.hotel/servers 13 Mar 08:48:42 - /Users/jacoswarts/.hotel/servers/timesheets.json added 13 Mar 08:48:42 - Add server timesheets create /Users/jacoswarts/.hotel/daemon.pid 40761 13 Mar 08:48:42 - Server listening on port 127.0.0.1:2000 13 Mar 08:48:42 - /Users/jacoswarts/.hotel/servers/timesheets.json added 13 Mar 08:48:42 - Add server timesheets 13 Mar 08:48:51 - Serve proxy.pac 13 Mar 08:48:59 - Resolve timesheets 13 Mar 08:48:59 - timesheets has started 13 Mar 08:49:04 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:04 - Proxy error - connect ECONNREFUSED 127.0.0.1:55000 13 Mar 08:49:05 - Resolve timesheets 13 Mar 08:49:05 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:27 - Resolve timesheets 13 Mar 08:49:27 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets (node) warning: possible EventEmitter memory leak detected. 11 stop listeners added. Use emitter.setMaxListeners() to increase limit. Trace at addListener (events.js:239:17) at once (events.js:265:8) at Group.proxy (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:389:14) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:25:15 at Group.start (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:314:11) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:24:13 at Group.exists (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:303:7) at /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/vhosts/tld.js:23:11 at Layer.handle [as handle_request] (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/express/lib/router/layer.js:95:5) at trim_prefix (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/express/lib/router/index.js:317:13) 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:31 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:32 - Resolve timesheets 13 Mar 08:49:32 - Proxy http://timesheets.dev to http://localhost:55000 13 Mar 08:49:33 - Resolve timesheets 13 Mar 08:49:33 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined 13 Mar 08:49:33 - Proxy error - connect ECONNREFUSED 127.0.0.1:80 Exiting Stop daemon Remove pid file /Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:278 res.status(502).send(msg); ^

TypeError: res.status is not a function at ProxyServer.handleProxyError (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/lib/daemon/group.js:278:11) at ProxyServer.emit (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/http-proxy/node_modules/eventemitter3/index.js:144:27) at ClientRequest.onOutgoingError (/Users/jacoswarts/.nvm/versions/node/v4.6.1/lib/node_modules/hotel/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:151:16) at emitOne (events.js:77:13) at ClientRequest.emit (events.js:169:7) at Socket.socketErrorListener (_http_client.js:269:9) at emitOne (events.js:77:13) at Socket.emit (events.js:169:7) at emitErrorNT (net.js:1269:8) at nextTickCallbackWith2Args (node.js:442:9)

JanStevens commented 7 years ago

I'm trying to get mailhog working which uses websockets. I have setup my nginx to allow websocket connection but I receive the following crash when mailhog tries to open the websocket

4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - Proxy http://mailhog.dev to http://localhost:8025
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Resolve mailhog
4 Apr 11:46:59 - WebSocket - proxy WebSocket to ws://127.0.0.1:undefined
4 Apr 11:46:59 - Proxy error - socket hang up
Exiting
Stop daemon
Remove pid file
/Users/fritz/.asdf/installs/nodejs/6.9.2/.npm/lib/node_modules/hotel/lib/daemon/group.js:278
      res.status(502).send(msg);
          ^

TypeError: res.status is not a function
    at ProxyServer.handleProxyError (/Users/fritz/.asdf/installs/nodejs/6.9.2/.npm/lib/node_modules/hotel/lib/daemon/group.js:278:11)
    at ProxyServer.emit (/Users/fritz/.asdf/installs/nodejs/6.9.2/.npm/lib/node_modules/hotel/node_modules/eventemitter3/index.js:144:27)
    at ClientRequest.onOutgoingError (/Users/fritz/.asdf/installs/nodejs/6.9.2/.npm/lib/node_modules/hotel/node_modules/http-proxy/lib/http-proxy/passes/ws-incoming.js:151:16)
    at emitOne (events.js:96:13)
    at ClientRequest.emit (events.js:188:7)
    at Socket.socketOnEnd (_http_client.js:346:9)
    at emitNone (events.js:91:20)
    at Socket.emit (events.js:185:7)
    at endReadableNT (_stream_readable.js:974:12)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)

The following is in my console log of mailhog

controllers.js:128 WebSocket connection to 'ws://mailhog.dev/api/v2/websocket' failed: Error during WebSocket handshake: Unexpected response code: 502

It seems related?

typicode commented 7 years ago

Yes, it seems so. Would you be aware of a Node package that fails?

Setting up a PHP or Go environment is kind of complicated to just reproduce this issue.

JanStevens commented 7 years ago

maybe you can try any node package that uses a websocket? will probably be the same

typicode commented 7 years ago

Also in master, there's a fix to prevent daemon from crashing (it doesn't solve the root cause though). It's blocked by the fact that I would like to migrate ejs files to pug.

If anyone wants to do the migration, let me know, this way the new version may be published earlier. I'll try to do it by the end of the week.

maybe you can try any node package that uses a websocket? will probably be the same

Good suggestion.

I've tested hotel + websocket by cloning this code and adding it to hotel with hotel add https://github.com/websockets/ws/tree/master/examples/serverstats

It worked a few months ago, there may have been a regression.

I'll give it another try.

pierlon commented 7 years ago

Having an issue with websockets as well when proxying, daemon.log (redacted):

20:47:57 - Connect - test.dev:80 → PUBLIC_IP:PUBLIC_PORT
20:47:57 - TCP Proxy - Error { Error: connect ECONNREFUSED 127.0.0.1:PUBLIC_PORT
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: PUBLIC_PORT }
20:48:57 - Resolve test
20:48:57 - Connect - test.dev:80 → PUBLIC_IP:PUBLIC_PORT
20:48:57 - TCP Proxy - Error { Error: connect ECONNREFUSED 127.0.0.1:PUBLIC_PORT
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: PUBLIC_PORT }
20:49:58 - Resolve test
20:49:58 - Connect - test.dev:80 → PUBLIC_IP:PUBLIC_PORT
20:49:58 - TCP Proxy - Error { Error: connect ECONNREFUSED 127.0.0.1:PUBLIC_PORT
    at Object.exports._errnoException (util.js:1020:11)
    at exports._exceptionWithHostPort (util.js:1043:20)
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14)
  code: 'ECONNREFUSED',
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: PUBLIC_PORT }