Already connected error coming from client

43 views
Skip to first unread message

Himanshu Srivastava

unread,
Jul 2, 2015, 2:05:04 AM7/2/15
to eas...@googlegroups.com
Hello ,

I am trying to configure turn for easyrtc.
I am run the below steps :

turnadmin -a --userdb "host=127.0.0.1 dbname=easyrtc user=turndbuser password=turndbpw connect_timeout=10" -u EasyRTC -r easyrtc.com -p EasyRTCPassword

PATH="./bin/:../bin/:../../bin/:${PATH}" turnserver --syslog  -L <public ip>  -L ::1 -E <public ip> -E ::1 --max-bps=3000000 -f -m 10 --min-port=32355 --max-port=65535 --cert=turn_server_cert.pem --pkey=turn_server_pkey.pem --log-file=stdout -v --cipher-list=ALL --db=var/db/turndb $@ -b turnuserdb.conf -p 4441 --no-udp

var http    = require("http");              // http server core module
var express = require("express");           // web framework external module
var io      = require("socket.io");         // web socket external module
var easyrtc = require("easyrtc");           // EasyRTC external module

// Setup and configure Express http server. Expect a subfolder called "static" to be the web root.
var httpApp = express();
httpApp.use(express.static(__dirname + "/static/"));

// Start Express http server on port 8080
var webServer = http.createServer(httpApp).listen(8989);

// Start Socket.io so it attaches itself to Express server
var socketServer = io.listen(webServer, {"log level":3});

var myIceServers=
[
  {"url":"turn:<public ip>","username":"EasyRTC","credential":"EasyRTCPassword"},
  {"url":"turn:<piblic ip>:4441?transport=tcp","username":"EasyRTC","credential":"EasyRTCPassword"},
  {"url":"turn:<public ip>2345?transport=udp","username":"EasyRTC","credential":"EasyRTCPassword"}
]

easyrtc.setOption("appIceServers", myIceServers);

But on running I am getting the below error on turn server side

// Start EasyRTC server
var rtc = easyrtc.listen(httpApp, socketServer);


32: IPv4. tcp or tls connected to: 182.69.243.186:49347
32: IPv4. Local relay addr: 182.71.28.83:54278
32: session 004000000000000001: new, realm=<>, username=<>, lifetime=600
32: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
32: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
32: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
32: IPv4. tcp or tls connected to: 182.69.243.186:49348
32: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
33: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
35: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
36: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
38: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
40: session 004000000000000001: realm <> user <>: incoming packet ALLOCATE processed, success
42: session 001000000000000001: TCP socket closed remotely 182.69.243.186:49348
42: session 001000000000000001: closed (2nd stage), user <> realm <> origin <>, local 182.71.28.83:4441, remote 182.69.243.186:49348, reason: TCP connection closed by client (callback)

Could anyone let me know what I am doing wrong.

Regards
Himanshu

Eric Davies

unread,
Jul 3, 2015, 10:41:49 AM7/3/15
to eas...@googlegroups.com
The one thing I see that looks suspicious is --db=var/db/turndb . This is a relative path and will depend on the current directory when you launched the turnserver. You probably want to put an absolute path there.

I would suggest as a first step trying with username and password in your configuration file. If you've already got that working, then it's really a question to ask the discussion group for the turn server because it's not a easyrtc configuration issue but turnserver configuration issue.
Reply all
Reply to author
Forward
0 new messages