Bug 1030641 - node-web-proxy crash on empty host header
Summary: node-web-proxy crash on empty host header
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: OpenShift Online
Classification: Red Hat
Component: Containers
Version: 2.x
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Vincent Batts
QA Contact: libra bugs
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-14 20:44 UTC by Andy Grimm
Modified: 2016-11-08 03:47 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-01-24 03:33:46 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description Andy Grimm 2013-11-14 20:44:46 UTC
Description of problem:

On some of our nodes, we are seeing frequent node-web-proxy restarts with this traceback in the log:

/usr/lib/node_modules/openshift-node-web-proxy/lib/plugins/ws-request-logger.js:134
    'host'      : req.headers.host.split(':')[0]  ||  '',
                                   ^
TypeError: Cannot call method 'split' of undefined
    at new PayloadInfo (/usr/lib/node_modules/openshift-node-web-proxy/lib/plugins/ws-request-logger.js:134:36)
    at ProxyServer.<anonymous> (/usr/lib/node_modules/openshift-node-web-proxy/lib/plugins/ws-request-logger.js:220:19)
    at ProxyServer.EventEmitter.emit (events.js:95:17)
    at finish_request (/usr/lib/node_modules/openshift-node-web-proxy/lib/proxy/ProxyServer.js:203:16)
    at _requestHandler (/usr/lib/node_modules/openshift-node-web-proxy/lib/proxy/ProxyServer.js:195:5)
    at Server.<anonymous> (/usr/lib/node_modules/openshift-node-web-proxy/lib/proxy/ProxyServer.js:913:7)
    at Server.EventEmitter.emit (events.js:98:17)
    at HTTPParser.parser.onIncoming (http.js:2027:12)
    at HTTPParser.parserOnHeadersComplete [as onHeadersComplete] (http.js:119:23)
    at Socket.socket.ondata (http.js:1917:22)
DEBUG: Program node /usr/lib/node_modules/openshift-node-web-proxy/bin/web-proxy.js --config /etc/openshift/web-proxy-config.json exited with code 8


Version-Release number of selected component (if applicable):

openshift-origin-node-proxy-1.16.1-1.el6oso.noarch

Comment 1 Vincent Batts 2013-11-22 18:39:24 UTC
https://github.com/openshift/origin-server/pull/4231

Comment 2 Meng Bo 2013-11-25 11:54:25 UTC
Tested on devenv_4067 with our websocket case, did not meet such error.

Move bug to verified.


Note You need to log in before you can comment on or make changes to this bug.