Page MenuHomePhabricator

Error when installing notification server
Closed, InvalidPublic

Description

I've been trying to setup the notification server following the instructions posted here: https://secure.phabricator.com/book/phabricator/article/notifications/, but cannot get past this error. Google-ing turns up very little and every suggesting I could find didn't fix the problem. Ignoring this and continuing with the setup yields no further errors, but the notification status is "Disabled" in my notifications drop down.

sparker@cricket:/var/www/phabricator/phabricator/support/aphlict/server$ sudo npm install ws

> utf-8-validate@1.0.1 install /var/www/phabricator/phabricator/support/aphlict/server/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild


> bufferutil@1.0.1 install /var/www/phabricator/phabricator/support/aphlict/server/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.18.5-x86_64-linode52
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/phabricator/phabricator/support/aphlict/server/node_modules/ws/node_modules/utf-8-validate
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm WARN optional dep failed, continuing utf-8-validate@1.0.1
gyp: Call to 'node -e "require('nan')"' returned exit status 1. while trying to load binding.gyp
gyp ERR! configure error 
gyp ERR! stack Error: `gyp` failed with exit code: 1
gyp ERR! stack     at ChildProcess.onCpExit (/usr/share/node-gyp/lib/configure.js:431:16)
gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17)
gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12)
gyp ERR! System Linux 3.18.5-x86_64-linode52
gyp ERR! command "nodejs" "/usr/bin/node-gyp" "rebuild"
gyp ERR! cwd /var/www/phabricator/phabricator/support/aphlict/server/node_modules/ws/node_modules/bufferutil
gyp ERR! node -v v0.10.25
gyp ERR! node-gyp -v v0.10.10
gyp ERR! not ok 
npm WARN This failure might be due to the use of legacy binary "node"
npm WARN For further explanations, please read
/usr/share/doc/nodejs/README.Debian
 
npm WARN optional dep failed, continuing bufferutil@1.0.1
ws@0.7.1 node_modules/ws
├── options@0.0.6
└── ultron@1.0.1

Event Timeline

scp raised the priority of this task from to Needs Triage.
scp updated the task description. (Show Details)
scp added a project: Notifications.
scp added a subscriber: scp.

We haven't seen this problem with npm before, so I can only offer vague advice -- are your node and npm up to date? Does installing other modules with npm work? You may have better luck filing against npm.

I'm turning up some similar-ish issues by Googling, but also nothing particularly useful. Here's the output I get on one of our servers:

[ec2-user@ip-10-161-81-110 tmp]$ npm -v
1.2.11
[ec2-user@ip-10-161-81-110 tmp]$ node -v
v0.8.21
[ec2-user@ip-10-161-81-110 tmp]$ npm install ws
npm http GET https://registry.npmjs.org/ws
npm http 200 https://registry.npmjs.org/ws
npm http GET https://registry.npmjs.org/ws/-/ws-0.7.1.tgz
npm http 200 https://registry.npmjs.org/ws/-/ws-0.7.1.tgz
npm http GET https://registry.npmjs.org/bufferutil
npm http GET https://registry.npmjs.org/utf-8-validate
npm http GET https://registry.npmjs.org/options
npm http GET https://registry.npmjs.org/ultron
npm http 200 https://registry.npmjs.org/options
npm http 200 https://registry.npmjs.org/ultron
npm http 200 https://registry.npmjs.org/utf-8-validate
npm http GET https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-1.0.1.tgz
npm http 200 https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-1.0.1.tgz
npm WARN package.json utf-8-validate@1.0.1 No README.md file found!
npm http 200 https://registry.npmjs.org/bufferutil
npm http GET https://registry.npmjs.org/bufferutil/-/bufferutil-1.0.1.tgz
npm http 200 https://registry.npmjs.org/bufferutil/-/bufferutil-1.0.1.tgz
npm WARN package.json bufferutil@1.0.1 No README.md file found!
npm http GET https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/nan
npm http 200 https://registry.npmjs.org/bindings
npm http GET https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz
npm http 200 https://registry.npmjs.org/bindings/-/bindings-1.2.1.tgz
npm http 200 https://registry.npmjs.org/nan
npm http GET https://registry.npmjs.org/nan/-/nan-1.6.2.tgz
npm http 200 https://registry.npmjs.org/nan/-/nan-1.6.2.tgz
npm WARN package.json nan@1.6.2 No README.md file found!

> utf-8-validate@1.0.1 install /tmp/node_modules/ws/node_modules/utf-8-validate
> node-gyp rebuild


> bufferutil@1.0.1 install /tmp/node_modules/ws/node_modules/bufferutil
> node-gyp rebuild

make: Entering directory `/tmp/node_modules/ws/node_modules/utf-8-validate/build'
make: Entering directory `/tmp/node_modules/ws/node_modules/bufferutil/build'
  CXX(target) Release/obj.target/validation/src/validation.o
  CXX(target) Release/obj.target/bufferutil/src/bufferutil.o
  SOLINK_MODULE(target) Release/obj.target/validation.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node
  SOLINK_MODULE(target) Release/obj.target/bufferutil.node: Finished
  SOLINK_MODULE(target) Release/obj.target/validation.node: Finished
  COPY Release/bufferutil.node
  COPY Release/validation.node
make: Leaving directory `/tmp/node_modules/ws/node_modules/bufferutil/build'
make: Leaving directory `/tmp/node_modules/ws/node_modules/utf-8-validate/build'
ws@0.7.1 node_modules/ws
├── options@0.0.6
├── ultron@1.0.1
├── bufferutil@1.0.1 (bindings@1.2.1, nan@1.6.2)
└── utf-8-validate@1.0.1 (bindings@1.2.1, nan@1.6.2)

Hmmmm, is there a difference between node and nodejs? I can't seem to get a version from node.

sparker@cricket:/var/www/phabricator/phabricator$ npm -v
1.3.10
sparker@cricket:/var/www/phabricator/phabricator$ node -v
sparker@cricket:/var/www/phabricator/phabricator$ nodejs -v
v0.10.25

Ok, so I just removed node, and then added a symlink from nodejs to node and it installed correctly. Not entirely sure what node was or why it was there. Perhaps in your script you might look to use nodejs first and then node if not there? Or maybe I just have a screwed up system.

Well, it still says disconnected in my notification panel even though I see the notifications being added to the log and I don't have an unresolved setup issue, but at least it installed correctly. I'll keep debugging around and see if I can figure out why. Thanks for the help.

Boom. Firewall. I'll stop spamming you now.

burnittotheground

scp claimed this task.