how to get the logs in log file? of telnet localhost 5677

221 views
Skip to first unread message

Sprogrammer

unread,
Feb 14, 2014, 7:48:08 AM2/14/14
to turn-server-project...@googlegroups.com
How to get all the turn client connection logs in a file? (instead of doing a manual telnet localhost 5766 and do >ps.  -l , -vV does not seems to do anything is it normal! )

$ turnserver -vV -l /var/tmp/t.log
0:
RFC
3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Citrix-3.2.2.6 'Marshal West'
0:
Max number of open files/sockets allowed for this process: 4096
0:
Due to the open files/sockets limitation,
max supported number of TURN
Sessions possible is: 2000 (approximately)
0:


==== Show him the instruments, Practical Frost: ====


0: TLS supported
0: DTLS supported
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: OpenSSL version: fresh enough
0: Default Net Engine version: 3 (UDP thread per CPU core)


=====================================================


0: Config file found: /etc/turnserver/turnserver.conf


Made several calls but i cant see real-time logs here and in file (telnet localhost 5677 works but i wanted those results in a log file)

Thank you
Reg
/sham


Oleg Moskalenko

unread,
Feb 14, 2014, 9:36:33 AM2/14/14
to turn-server-project...@googlegroups.com
First, do not use -V option - use just -v.

Second, you have to locate where the log file is. That's possible that it cannot create a file in /var/tmp/ because of permission restrictions.

I suppose that in the turnserver.conf you have the daemon option set, this is why you do not see the output on the screen. But it must be in the file.

Oleg

Sprogrammer

unread,
Feb 14, 2014, 10:47:45 AM2/14/14
to turn-server-project...@googlegroups.com
$ chkconfig turnserver off

$ init
6

-------- reboot -----

$ service turnserver stop
$ cat
>> /etc/turnserver/turnserver.conf <\EOF
user
=root:root
realm
=IP
no-tls
no-dtls
no-stdout-log
syslog
EOF

-------------- not running temporary as daemon -----

$ turnserver -v -l /tmp/test.log
0:
RFC
3489/5389/5766/5780/6062/6156 STUN/TURN Server
Version Citrix-3.2.2.6 'Marshal West'
0:
Max number of open files/sockets allowed for this process: 4096
0:
Due to the open files/sockets limitation,
max supported number of TURN
Sessions possible is: 2000 (approximately)
0:


==== Show him the instruments, Practical Frost: ====


0: TLS supported
0: DTLS supported
0: Redis supported
0: PostgreSQL supported
0: MySQL supported
0: OpenSSL version: fresh enough
0: Default Net Engine version: 3 (UDP thread per CPU core)


=====================================================


0: Config file found: /etc/turnserver/turnserver.conf
^C


$ cat
/tmp/test.log
cat
: /tmp/test.log: No such file or directory


i failed to make that log file. Am i doing something wrong still?

Thank you
Reg
/Sham

Sprogrammer

unread,
Feb 14, 2014, 11:02:46 AM2/14/14
to turn-server-project...@googlegroups.com
Just tried with below, i can see the verbose details in my terminal but, i do not see anything is getting saved in /tmp/turn.log file

$ grep ^[^#] /etc/turnserver/turnserver.conf
user
=root:root
realm
=I...
no-tls
no-dtls
verbose
log
-file=/tmp/turn.log


it seems like log-file do not work and -l do not work. Is there any other way i can save it to a file if log-file/-l not working?

Oleg Moskalenko

unread,
Feb 14, 2014, 2:07:32 PM2/14/14
to turn-server-project...@googlegroups.com
You may be missing several points:

1) In your original setup, you used the --syslog option - that option forces all log into the syslog (in your case, that would be /var/log/syslog) and the log-file is ignored.

2) Without --syslog option, everything is going to the log file, I re-tested it and it works correctly. But the name of the log file is not "turn.log" or "test.log"; the real name is "turn_<date>.log" or "test_<date>.log". The parameter in the --log-file option is just a file name pattern, that is not the exact file name. Do the command:

$ ls -l /var/tmp/

and you will see your files.

Regards,
Oleg
Reply all
Reply to author
Forward
0 new messages