AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

connection logs in server
 
 

Hello and happy new year,

I work on chatbot on linux (Debian 8). It’ works on local I reached to talk wit h my bot in command line.
So now I would like to use the server mode so I started to find code (nodejs) to connect to my Bot.
But unfortunately, I have some issue to communicate with the server. I setup firewall rules but I can’t communicate with my bot…
I wanted to see logs files I see nothing interesting except the “start logs server” not even a connection trace.

“======== Began EV server pid 28064 7.73 compiled Dec 7 2017 18:33:35 on host local port 1337 at Fri Jan 26 16:50:37 2018 serverlog:1 userlog: 1”
I try my nodejs code but I have no result or traces, same with linux toll like netcat.

So I wondered if I have to do something to activate trace/logs and I don’t talk about “trace” bot (:trace=all) that not what I’m looking for.

Thx
David.

 

 
  [ # 1 ]

cs does not communicate via nodejs / websockets.  You’d need to relay via an intermediary code/webpage

 

 
  [ # 2 ]

I found this :
https://www.chatbots.org/ai_zone/viewthread/3059/

And I used this:
https://github.com/kuzyn/nodejs-csclient. So I was thinking it worked without anything else.

If I understand I need to transcript socket <-> websocket through another webserver ? I don’t understand the diferrence

And maybe you are not a nodejs expert but I put the question : nodejs doesn’t support simple socket connection ?

Sorry but I did not really understand what I have to do.

thx,

David.

 

 
  [ # 3 ]

Sorry, it is my understanding that nodejs DOES NOT do simple socket connections. Or maybe its just that websockets cant do them

 

 
  [ # 4 ]

ok If I want to stay on nodejs I have to put a kind of relay serveur between nodejs and CS .

Thank you again .

 

 
  [ # 5 ]

I can help with that, David. I came to that same conclusion last year, so wrote a “bridge” to go between Node.js and CS. If you like, I can share how I did it, though I cannot share the exact code (that belongs to someone else now).

 

 
  [ # 6 ]

if you mean me, I dont consider myself as owning it. I can put it into open source CS if you want

 

 
  [ # 7 ]

If you mean me, I’ll buy you a beer.

 

 
  [ # 8 ]

David

This node.js app : https://github.com/addventa/ChatScriptSmooch make the bridge between node.js and a CS server, via sockets.
The actual useful code is here: https://github.com/addventa/ChatScriptSmooch/blob/master/chatscript.js

this is where the communication via sockets happens.

 

 
  [ # 9 ]

Thanks Ludan for the answer.

 

 
  [ # 10 ]

Dave, i’m interresting that you share me your solution and I would like to understand your problem of year ago.
Because I came to another conclusion than Dave because I find a way to connect directly CS to nodejs !!!
I used the “net package” to manage socket and it works well.

I am going to try to push my code on GIT.

 

 
  [ # 11 ]

Let me look through my files, and I, too, will push them to GitHub. It may take a few days, however. Sometimes my schedule isn’t my own. cheese

 

 
  login or register to react