Error: connect ECONNREFUSED with npm install in TEAMCITY
hi,
when i want to run my tests with grunt, previously i have to install grunt with the NPM installs buildstep and this installation always fail. I saw that i have to configure the proxy with :npm config set proxy http://login:password@127.0.0.1:8888 but i get the same error.
Here you have the Build Log :
[14:39:29]Checking for changes
[14:39:29]Publishing internal artifacts
[14:39:29]Clearing temporary directory: /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/temp/buildTmp
[14:39:29]Checkout directory: /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/work/5b5cb05526c77b1a
[14:39:29]Updating sources: agent side checkout (2s)
[14:39:31]Step 1/3: PHPUnit Official Runner (PHP - PHPUnit)
[14:39:31]Step 2/3: NPM installs (Node.js NPM) (1m:11s)
[14:39:31][Step 2/3] npm config set proxy http://login:password@127.0.0.1:8888
[14:39:32][Step 2/3] npm config set https-proxy https://login:password@127.0.0.1:8888
[14:39:32][Step 2/3] npm config set registry "http://registry.npmjs.org/"
[14:39:32][Step 2/3] npm install -g yo grunt -cli bower (1m:10s)
[14:39:32][npm install -g yo grunt -cli bower] Executing npm via wrapping shell script
[14:39:32][npm install -g yo grunt -cli bower] Starting: /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/temp/agentTmp/wrapper4224997727552752328.sh install -g yo grunt -cli bower
[14:39:32][npm install -g yo grunt -cli bower] in directory: /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/work/5b5cb05526c77b1a/git-www/sites/webapp-euml
[14:39:33][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/yo
[14:39:33][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/grunt
[14:39:33][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/bower
[14:39:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/yo
[14:39:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/bower
[14:39:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/grunt
[14:40:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/yo
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! Error: connect ECONNREFUSED
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! at errnoException (net.js:901:11)
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! at Object.afterConnect [as oncomplete] (net.js:892:19)
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! { [Error: connect ECONNREFUSED]
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! code: 'ECONNREFUSED',
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! errno: 'ECONNREFUSED',
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! syscall: 'connect' }
[14:40:43][npm install -g yo grunt -cli bower] npm ERR!
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! If you are behind a proxy, please make sure that the
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! 'proxy' config is set properly. See: 'npm help config'
[14:40:43][npm install -g yo grunt -cli bower]
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! System Linux 2.6.18-164.11.1.el5
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! command "/sg/inst2dev1/home/bin/node" "/sg/inst2dev1/home/bin/npm" "install" "-g" "yo" "grunt" "-cli" "bower"
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! cwd /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/work/5b5cb05526c77b1a/git-www/sites/webapp-euml
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! node -v v0.10.17
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! npm -v 1.3.8
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! syscall connect
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! code ECONNREFUSED
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! errno ECONNREFUSED
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! stack Error: connect ECONNREFUSED
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! stack at errnoException (net.js:901:11)
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! stack at Object.afterConnect [as oncomplete] (net.js:892:19)
[14:40:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/bower
[14:40:43][npm install -g yo grunt -cli bower] npm http GET http://registry.npmjs.org/grunt
[14:40:43][npm install -g yo grunt -cli bower] npm ERR!
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! Additional logging details can be found in:
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! /sg/inst2dev1/home/agile/TeamCity-8.1.2/buildAgent/work/5b5cb05526c77b1a/git-www/sites/webapp-euml/npm-debug.log
[14:40:43][npm install -g yo grunt -cli bower] npm ERR! not ok code 0
[14:40:43][npm install -g yo grunt -cli bower] Process exited with code 1
[14:40:43][Step 2/3] Step NPM installs (Node.js NPM) failed
[14:40:43]Step 3/3: Grunt
[14:40:43]Publishing internal artifacts
[14:40:43]Build finished
Please sign in to leave a comment.
Hi,
Can you please try to run the same npm commands in the agent work directory under the same user as the one running TeamCity agent (for more details see http://confluence.jetbrains.com/display/TCD8/Common+Problems#CommonProblems-BuildfailsorbehavesdifferentlyinTeamCitybutnotlocally). Does it work?