Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal message log gives:
Error reaching the Node.js server at "nodejs/health/check": [-111] Connection refused.
Pretty sure there isn't enough in the documentation to get this working; plus going through issue queue i see many "answers" which contradict other answers (like where to install nodejs). So this is what i have; perhaps you can fill in the missing pieces.
- drupal-node.js installed using npm at account root (not drupal root, not drupal module folder)
- ~/node_modules/drupal-node.js/nodejs.config.js looks like this:
settings = {
scheme: 'http',
port: 8080,
host: 'localhost',
resource: '/socket.io',
serviceKey: 'XXXXX',
backend: {
port: 80,
host: 'athleteos.liquidcms.org',
scheme: 'http',
basePath: '/',
messagePath: '/nodejs/message'
},
debug: false,
sslKeyPath: '',
sslCertPath: '',
sslCAPath: '',
baseAuthPath: '/nodejs/',
extensions: [],
clientsCanWriteToChannels: false,
clientsCanWriteToClients: false,
transports: ['websocket', 'polling'],
jsMinification: true,
jsEtag: true,
logLevel: 1
};
config in Drupal looks like:
host: localhost
port: 8080
service key: XXXXX
Comments
Comment #2
dynahiol CreditAttribution: dynahiol commentedHaving the same issue with same node installation
Comment #3
glekli CreditAttribution: glekli commentedThe configuration seems reasonable. This could easily be related to your hosting setup.
Could you try opening the node.js server's url in the browser and see if it responds? In your case it should be http://athleteos.liquidcms.org:8080
Do you see any error when you start the node.js app?
Try setting 'debug' to true, and see if there is any output in the node.js log when you open the Drupal status page.
Comment #4
dynahiol CreditAttribution: dynahiol commentedI've tried https://mydomain.ltd:8080 and i get " Not Found. "
Here are my config:
backendSettings = {
"scheme":"https",
"host":"mydomain.ltd",
"port":8080,
"key":"/
/live/mydomain.ltd/privkey.pem",
"cert":"/
/live/mydomain.ltd/fullchain.pem",
"resource":"/socket.io",
"publishUrl":"publish",
"serviceKey":"xxxx",
"backend":{
"port":80,
"host":"mydomain.ltd",
"messagePath":"/nodejs/message"},
"clientsCanWriteToChannels":false,
"clientsCanWriteToClients":false,
"extensions":"",
"debug":true,
"transports":["websocket",
"polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1};
Drupal and google consol shows that nodejs is working.