Config for Drupal nodejs integration module?

nodejs
drupal

#1

Hi,

I’ve been working on a Drupal 7.54 site on c9 and I’m having issues using modules that use the Drupal nodejs (7.x-1.13) integration.

For example when I enable the nodejs_watchdog (7.x-1.13) for test purposes the CPU usage hits 100% with a long list of 404 errors from /nodejs/health/check

The module config requires:

  • Protocol: http or https
  • Node.js server host: localhost (I’ve also tried 127.0.0.1)
  • Node.js server port: 8080
  • Node.js service key

Is there a way to get this to work?

Many thanks in advance.

UPDATE: I’ve tried several options between ports, ssl, localhost and 127.0.0.1 but overall I’m still getting the following variation errors:

Error reaching the Node.js server at “nodejs/health/check”: [0] Error opening socket ssl://127.0.0.1:8080.
Error reaching the Node.js server at “nodejs/health/check”: [0] Error opening socket ssl://localhost:8080.
Error reaching the Node.js server at “nodejs/health/check”: [-111] Connection refused.
Error reaching the Node.js server at “nodejs/health/check”: [0] Error opening socket ssl://0.0.0.0:8080.

Which is a step forward from:
Error reaching the Node.js server at “nodejs/health/check”: [404] Not Found.


#2

Ok I’ve managed to spend a little more time on this and managed to get it up and running by following the documentation on https://www.drupal.org/node/1713530

My nodejs.config.js now includes:

host: process.env.IP
port: 8081
port: process.env.PORT
scheme: 'http'

I’ve installed:

sudo npm install forever -g

And ran:

forever start app.js