Active
Project:
Node.js integration
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Jul 2011 at 00:24 UTC
Updated:
7 Nov 2011 at 11:35 UTC
Jump to comment: Most recent
when I launch nodejs module with drupal that version is 7.4, first issue is
1. the method "get" is undefined. server.js line 626.
I changed to
server.all('/nodejs/*', checkServiceKeyCallback)
.post(backendSettings.publishUrl, publishMessage);
server.get(backendSettings.serverStatsUrl, returnServerStats)
server.get(backendSettings.getActiveChannelsUrl, getActiveChannels);
server.get(backendSettings.kickUserUrl, kickUser);
server.get(backendSettings.addUserToChannelUrl, addUserToChannel);
server.get(backendSettings.removeUserFromChannelUrl, removeUserFromChannel);
server.get(backendSettings.toggleDebugUrl, toggleDebug);
server.get('*', send404);
server.listen(backendSettings.port, backendSettings.host);
and it can work now.
2. the "length" property is undefined. server.js line 307 when I check the nodejs stats. I add init the client with empty array at line 639
if (socket.clients == undefined) socket.clients = {};
3. When I add user to channel with "/nodejs/user/channel/add" path, the nodejs tell me "No active sessions for uid: 2" the "2" is uid.
How to fix the latest BUG ? Or I miss some config ??
below is my nodejs.config.js file that created with default config.
backendSettings = {
'scheme': 'http',
'host': '127.0.0.1',
'port': 8081,
'resource': '/node.js/realtime',
'publishUrl': '/nodejs/publish',
'serviceKey': '',
'backend': {
'port': 80,
'host': '127.0.0.1',
'authPath': '/nodejs/auth/'
},
'extensions': [],
'clientsCanWriteToChannels': false,
'clientsCanWriteToClients': false
};
Comments
Comment #1
Anonymous (not verified) commentedComment #2
jziwenchen commentedDo you have any ideas ? :)
Comment #3
Gray Fox commentedI had your #1 issue while using an older version of socket.io, so you might want to install the latest versions of nodejs/express/socket.io. So far I had no issues with the nodejs-dev build on my Windows machine.
Comment #4
jziwenchen commentedwhat is the version of socket.io, express you used ?
Comment #5
Gray Fox commentedI'm not sure since I updated everything. I was using Windows binaries of node.js 0.4.7, so I switched to cygwin and compiled the latest version (at the time 0.4.9) from source. What OS are you using?
Comment #6
jziwenchen commentedhi,
I am on ubuntu 10.04. It is ok now when upgrade version of node.js module express, socket.io
Comment #7
Anonymous (not verified) commentedthanks for the feedback, closing for now, please reopen if you need to.
Comment #8
carnau commentedI'm dealing with this issue, so instead of creating another one I'll will use this.
I'm trying to port the nodejs functionality of drupalchat D7 into D6 version. So I'm using a custom drupalchat D6 dev version, and nodejs 6 dev.
I have 2 machines, one that has nodejs server and the other one with my drupal site. Both servers can communicate through 80 and 8080 port.
I've also done some test with wget / telnet to be sure, for example, that from the drupal site, socket.io.js is accessible. Website is also accesible.
My socket.io version is 0.8.6, and it's running on CentOs.
Everytime I write something into the chat, the nodejs side(server.js) shows:
My nodejs.config.js file:
(*) The 'host' option is blank to listen any ip. I've tried to put my drupal server ip but not works (see next error). Just works with blank, localhost or the server ip, so I can't restrict it to my other server.
In my drupal site, in the nodejs configuration form, host option points to nodejs.example.com, because it's used to construct some urls.
I've noticed that the table nodejs_presence is empty, also if I logout / login on my website. Don't know if it is related to this issue.
Is there any tests I can follow to be sure that socket.io is well configured? Or what I have to check?