For few days i am dealing with nodejs integration... First i had some config problems but right now everything seems ok except one problem; ı could not get it working :)

when i try to figure out what is the problem i saw my safari activity window saying "cancelled" for the token process;

safari activity window screenshot

Also My config is below... I will be happy if someone can help.

backendSettings = {
"scheme":"http",
"host":"192.168.1.60",
"port":8080,
"key":"/path/to/key/file",
"cert":"/path/to/cert/file",
"resource":"/sites/all/modules/nodejs/node_modules/socket.io/lib",
"publishUrl":"publish",
"serviceKey":"",
"backend":{
"port":80,
"host":"192.168.1.60",
"messagePath":"realtime"},
"clientsCanWriteToChannels":false,
"clientsCanWriteToClients":false,
"extensions":["nodejs.server.extension.js"],
"debug":true,
"transports":["websocket",
"flashsocket",
"htmlfile",
"xhr-polling",
"jsonp-polling"],
"jsMinification":true,
"jsEtag":true,
"logLevel":1};

Comments

kiova’s picture

Issue summary: View changes

url change

kiova’s picture

I just realised i have a log for the situtation;

Error sending content token "5DsujYd_Pc_GR9hBQ1UEm-SXIZXTpO6M2T3UMChUC3Q" to the Node.js server: [-111] Connection refused

kiova’s picture

I think I have figured out something about my problem. After i run the command "node server.js" i see the messege "socket.io started"

But when i try to reach http://192.168.1.60:8080 via my browser i see the message "Not Found."

When can be the problem? Anybody have an idea for this?

mobonobomo’s picture

It might be your ports, is 8080 in use by another service, maybe Tomcat?

debra-v’s picture

Your socket.io path is incorrect and I'm not sure why you have "realtime" for "messagePath".

Try using this config and make sure your client config settings match your nodes.config.js settings.

settings = {
scheme: 'http',
port: 8080,
host: '192.168.1.60',
resource: '/socket.io',
serviceKey: '',
backend: {
port: 80,
host: '192.168.1.60',
scheme: 'http',
basePath: '',
messagePath: '/nodejs/message'
},
debug: true,
sslKeyPath: '',
sslCertPath: '',
baseAuthPath: '/nodejs/',
publishUrl: 'publish',
extensions: [],
clientsCanWriteToChannels: false,
clientsCanWriteToClients: false,
transports: ['websocket', 'htmlfile', 'xhr-polling', 'jsonp-polling'], //'flashsocket',
jsMinification: true,
jsEtag: true,
logLevel: 1
};

debra-v’s picture

Issue summary: View changes

url change