Bug 1030641

Summary: node-web-proxy crash on empty host header
Product: OpenShift Online Reporter: Andy Grimm <agrimm>
Component: ContainersAssignee: Vincent Batts <vbatts>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 2.xCC: bmeng, jgoulding, vbatts
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-01-24 03:33:46 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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.