Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1366491

Summary: nodejs-4-rhel7 image cannot work behind http proxy
Product: Red Hat Software Collections Reporter: Wang Haoran <haowang>
Component: rh-nodejs4-containerAssignee: Zuzana Svetlikova <zsvetlik>
Status: CLOSED ERRATA QA Contact: Lukáš Zachar <lzachar>
Severity: high Docs Contact:
Priority: high    
Version: rh-nodejs4CC: aos-bugs, bparees, jkaur, jokerman, kanderso, lzachar, mmccomas, sfroemer, trogers, zsvetlik
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
The rh-nodejs4 Software Collection previously contained an outdated package rh-nodejs4-nodejs-tunnel-agent. Consequently, users were unable to use this Software Collection or its associated S2I image from behind an HTTP proxy. The rh-nodejs4-nodejs-tunnel-agent package has been updated to the latest version, and the rh-nodejs4 Software Collection and the associated S2I image are now fully usable.
Story Points: ---
Clone Of:
: 1368114 (view as bug list) Environment:
Last Closed: 2016-09-01 12:20:22 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:
Bug Depends On:    
Bug Blocks: 1368114    

Description Wang Haoran 2016-08-12 06:38:03 UTC
Description of problem:
nodejs-4-rhel7 image cannot work behind http proxy , nodejs-010-rhel7 works, but have Error log .

Version-Release number of selected component (if applicable):
openshift v3.3.0.18
kubernetes v1.3.0+507d3a7
etcd 2.3.0+git

brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhscl/nodejs-4-rhel7             latest              e6bc445bbb9c        2 weeks ago         449.4 MB
brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/openshift3/nodejs-010-rhel7      latest              c2ed886f2b79        2 weeks ago         439.3 MB


How reproducible:
always

Steps to Reproduce:
1. install env with http_proxy enable in the buildDefaults admission plugin 
BuildDefaults:
        configuration:
          apiVersion: v1
          env:
          - name: HTTP_PROXY
            value: http://file.rdu.redhat.com:3128
          - name: HTTPS_PROXY
            value: http://file.rdu.redhat.com:3128
          - name: NO_PROXY
            value: .cluster.local,169.254.169.254,openshift-205.lab.sjc.redhat.com,openshift-206.lab.sjc.redhat.com,openshift-207.lab.sjc.redhat.com,openshift-220.lab.sjc.redhat.com
          - name: http_proxy
            value: http://file.rdu.redhat.com:3128
          - name: https_proxy
            value: http://file.rdu.redhat.com:3128
          - name: no_proxy
            value: .cluster.local,169.254.169.254,openshift-205.lab.sjc.redhat.com,openshift-206.lab.sjc.redhat.com,openshift-207.lab.sjc.redhat.com,openshift-220.lab.sjc.redhat.com
          gitHTTPProxy: http://file.rdu.redhat.com:3128
          gitHTTPSProxy: http://file.rdu.redhat.com:3128
          kind: BuildDefaultsConfig

2.oc new-app https://github.com/openshift/nodejs-ex
3.check the logs
[root@openshift-220 ~]# oc logs -f build/nodejs-ex-1
Using HTTP proxy http://file.rdu.redhat.com:3128 and HTTPS proxy http://file.rdu.redhat.com:3128 for script download
Downloading "https://github.com/openshift/nodejs-ex" ...

---> Installing application source ...
---> Setting npm http proxy to http://file.rdu.redhat.com:3128
---> Setting npm http proxy to http://file.rdu.redhat.com:3128
---> Setting npm https proxy to http://file.rdu.redhat.com:3128
---> Setting npm https proxy to http://file.rdu.redhat.com:3128
---> Building your Node application from source
ERROR: npm info it worked if it ends with ok
ERROR: npm info using npm.1
ERROR: npm info using node.2
ERROR: npm info preinstall nodejs-ex.1
ERROR: npm info attempt registry request try #1 at 02:22:05
ERROR: npm http request GET https://registry.npmjs.org/ejs
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/express
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/mocha
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/mongodb
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/morgan
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/object-assign
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/chai
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: npm info attempt registry request try #1 at 02:22:08
ERROR: npm http request GET https://registry.npmjs.org/chai-http
ERROR: npm ERR! Linux 3.10.0-327.22.2.el7.x86_64
ERROR: npm ERR! argv "/opt/rh/rh-nodejs4/root/usr/bin/node" "/opt/rh/rh-nodejs4/root/usr/bin/npm" "install" "-d"
ERROR: npm ERR! node v4.4.2
ERROR: npm ERR! npm  v2.15.1
ERROR: 
ERROR: npm ERR! Request path contains unescaped characters.
ERROR: npm ERR! 
ERROR: npm ERR! If you need help, you may report this error at:
ERROR: npm ERR!     <https://github.com/npm/npm/issues>
ERROR: 
ERROR: npm ERR! Please include the following file with any support request:
ERROR: npm ERR!     /opt/app-root/src/npm-debug.log
error: build error: non-zero (13) exit code from brew-pulp-docker01.web.prod.ext.phx2.redhat.com:8888/rhscl/nodejs-4-rhel7:latest

3. update the bc to use nodejs:010 and triger a build
4. check the logs:
ERROR: npm info attempt registry request try #1 at 02:24:35
ERROR: npm http fetch GET https://registry.npmjs.org/semver/-/semver-5.3.0.tgz
ERROR: npm http fetch 200 https://registry.npmjs.org/resolve-from/-/resolve-from-2.0.0.tgz
ERROR: npm http fetch 200 https://registry.npmjs.org/semver/-/semver-5.3.0.tgz
ERROR: npm info install resolve-from.0 into /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional
ERROR: npm info install semver.0 into /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional
ERROR: npm info installOne resolve-from.0
ERROR: npm info installOne semver.0
ERROR: npm info preinstall resolve-from.0
ERROR: npm info build /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/resolve-from
ERROR: npm info linkStuff resolve-from.0
ERROR: npm info install resolve-from.0
ERROR: npm info postinstall resolve-from.0
ERROR: npm info preinstall semver.0
ERROR: npm info build /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional/node_modules/semver
ERROR: npm info linkStuff semver.0
ERROR: npm info install semver.0
ERROR: npm info postinstall semver.0
ERROR: npm info build /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core/node_modules/require_optional
ERROR: npm info linkStuff require_optional.0
ERROR: npm info install require_optional.0
ERROR: npm info postinstall require_optional.0
ERROR: npm info build /opt/app-root/src/node_modules/mongodb/node_modules/mongodb-core
ERROR: npm info linkStuff mongodb-core.7
ERROR: npm info install mongodb-core.7
ERROR: npm info postinstall mongodb-core.7
ERROR: npm info build /opt/app-root/src/node_modules/mongodb
ERROR: npm info linkStuff mongodb.5
ERROR: npm info install mongodb.5
ERROR: npm info postinstall mongodb.5
ERROR: npm info build /opt/app-root/src
ERROR: npm info linkStuff nodejs-ex.1
ERROR: npm info install nodejs-ex.1
ERROR: npm info postinstall nodejs-ex.1
ERROR: npm info prepublish nodejs-ex.1
object-assign.0 node_modules/object-assign

ejs.1 node_modules/ejs

morgan.0 node_modules/morgan
├── on-headers.1
├── basic-auth.4
├── depd.0
├── on-finished.0 (ee-first.1)
└── debug.0 (ms.1)

chai.0 node_modules/chai
├── assertion-error.2
├── type-detect.0
└── deep-eql.3 (type-detect.1)

express.0 node_modules/express
├── escape-html.3
├── array-flatten.1
├── utils-merge.0
├── cookie-signature.6
├── merge-descriptors.1
├── fresh.0
├── methods.2
├── vary.0
├── path-to-regexp.7
├── encodeurl.1
├── range-parser.0
├── parseurl.1
├── content-type.2
├── cookie.1
├── etag.0
├── content-disposition.1
├── serve-static.1
├── depd.0
├── on-finished.0 (ee-first.1)
├── qs.0
├── debug.0 (ms.1)
├── finalhandler.0 (unpipe.0, statuses.0)
├── proxy-addr.2 (forwarded.0, ipaddr.js.1)
├── send.1 (destroy.4, ms.1, statuses.0, mime.4, http-errors.0)
├── type-is.13 (media-typer.0, mime-types.11)
└── accepts.3 (negotiator.1, mime-types.11)

chai-http.1 node_modules/chai-http
├── methods.1
├── cookiejar.6
├── qs.0
├── is-ip.0 (ip-regex.3)
└── superagent.0 (extend.1, methods.1, cookiejar.1, component-emitter.2, reduce-component.1, mime.4, qs.3, debug.0, formidable.14, readable-stream.27-1, form-data.0)

mocha.3 node_modules/mocha
├── escape-string-regexp.2
├── supports-color.0
├── growl.2
├── to-iso-string.2
├── commander.0
├── diff.0
├── debug.0 (ms.1)
├── mkdirp.1 (minimist.8)
├── jade.3 (commander.1, mkdirp.0)
└── glob.11 (inherits.1, minimatch.0)

mongodb.5 node_modules/mongodb
├── es6-promise.2
├── readable-stream.31 (inherits.1, isarray.1, string_decoder.31, core-util-is.2)
└── mongodb-core.7 (bson.2, require_optional.0)
ERROR: npm info ok 


Pushing image 172.30.211.221:5000/haowang/nodejs-ex:latest ...
Pushed 0/4 layers, 3% complete
Pushed 1/4 layers, 31% complete
Pushed 1/4 layers, 55% complete
Pushed 2/4 layers, 75% complete
Pushed 2/4 layers, 92% complete
Pushed 3/4 layers, 100% complete
Pushed 4/4 layers, 100% complete
Push successful

Actual results:
nodejs-4-rhel7 build failed
nodejs-010-rhel7 build success but have error log
Expected results:
the two image build should success without error log

Additional info:

Comment 1 Ben Parees 2016-08-12 19:17:13 UTC
the "ERROR:" prefix indicates that output came from stderr from the assemble script.  We've removed that prefix in s2i and will make the change in origin soon, but it's benign and not reflective of a real error, it's just a symptom of npm not using stderr correctly.

checking on the nodejs4 issue.

Comment 2 Ben Parees 2016-08-12 19:43:24 UTC
the proxy issue appears to be a known bug in the tunnel-agent package, we need SCL to update it:
https://github.com/npm/npm/issues/4569#issuecomment-62051308

Comment 3 Ben Parees 2016-08-12 19:44:57 UTC
(Current package is rh-nodejs4-nodejs-tunnel-agent-0.3.0-4.el7.noarch)

Comment 4 Ben Parees 2016-08-24 14:26:49 UTC
Were centos packages also updated?

Comment 5 Zuzana Svetlikova 2016-08-24 15:40:55 UTC
Not yet, I'll rebuild them when RHEL packages will be tested and released.

Comment 11 errata-xmlrpc 2016-09-01 12:20:22 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-1796.html