Janus Logs,Custom Log location

722 views
Skip to first unread message

Kinsley Kajiva

unread,
Aug 8, 2022, 5:46:41 AM8/8/22
to meetecho-janus
Hi , so i have trying to set new custom path to record janus logs for example on ubuntu 
/home/januslogs/janus-new.log , as soon as i  set this in the janus.jcfg file and restart the server it fails to run or restart, yes i have uncommented. 
also can one create logs with time stamps to the file for example creating a new file for a new day to log 
 

Lorenzo Miniero

unread,
Aug 8, 2022, 6:02:44 AM8/8/22
to meetecho-janus
Just tested and it works as expected. The cause for the fail to start may be different, so check the console for errors. Also, make sure there are no permission errors trying to create the log file.

L.

Kinsley Kajiva

unread,
Aug 8, 2022, 6:30:05 AM8/8/22
to meetecho-janus
Ok thank you for the quick response : 
 so I have added more permission but it still failed , I have run this  command
1. sudo chmod -R 777  /home/variable-k/janus.log   
2. sudo chmod a+rwx /home/variable-k/janus.log
both still fail , I get this  : 
2022-08-08T12:26:13+02:00 janus-gateway.janus-gateway[78702]: Janus version: 1003 (1.0.3)
2022-08-08T12:26:13+02:00 janus-gateway.janus-gateway[78702]: Janus commit: 95bfcf35969894dd3361b6f2d65fd6a453139b11
2022-08-08T12:26:13+02:00 janus-gateway.janus-gateway[78702]: Compiled on:  Sat Jun 25 16:34:59 UTC 2022
2022-08-08T12:26:13+02:00 janus-gateway.janus-gateway[78702]: Error opening log file /home/variable-k/janus.log: Permission denied
2022-08-08T12:26:13+02:00 systemd[1]: snap.janus-gateway.janus-gateway.service: Main process exited, code=exited, status=1/FAILURE
2022-08-08T12:26:13+02:00 systemd[1]: snap.janus-gateway.janus-gateway.service: Failed with result 'exit-code'.
2022-08-08T12:26:13+02:00 systemd[1]: snap.janus-gateway.janus-gateway.service: Scheduled restart job, restart counter is at 5.
2022-08-08T12:26:13+02:00 systemd[1]: Stopped Service for snap application janus-gateway.janus-gateway.
2022-08-08T12:26:13+02:00 systemd[1]: snap.janus-gateway.janus-gateway.service: Start request repeated too quickly.
2022-08-08T12:26:13+02:00 systemd[1]: snap.janus-gateway.janus-gateway.service: Failed with result 'exit-code'.
2022-08-08T12:26:13+02:00 systemd[1]: Failed to start Service for snap application janus-gateway.janus-gateway.

Kinsley Kajiva

unread,
Aug 8, 2022, 6:34:49 AM8/8/22
to meetecho-janus
here is my config as well 
general: {
 debug_timestamps = true
 server_name = "localJanusx"
 #event_loops = 8
 #recordings_tmp_ext = "tmp"
 #reclaim_session_timeout = 0
 #candidates_timeout = 45
 events_folder = "/opt/janus/lib/janus/events"
 admin_secret = "janusoverlord"
 #interface = "1.2.3.4"
 protected_folders = ["/bin","/boot","/dev","/etc","/initrd","/lib","/lib32","/lib64","/proc","/sbin","/sys","/usr","/var","/opt/janus/bin","/opt/janus/etc","/opt/janus/include","/opt/janus/lib","/opt/janus/lib32","/opt/janus/lib64","/opt/janus/sbin"]
 loggers_folder = "/opt/janus/lib/janus/loggers"
 plugins_folder = "/opt/janus/lib/janus/plugins"
 debug_level = 4
 log_to_file = "/home/variable-k/janus.log"
 configs_folder = "/opt/janus/etc/janus"
 #log_to_stdout = false
 #daemonize = true
 transports_folder = "/opt/janus/lib/janus/transports"
 #token_auth_secret = "janus"
 #log_prefix = "[janus]"
 #token_auth = true
 #no_webrtc_encryption = true
 #pid_file = "/path/to/janus.pid"
 #debug_locks = true
 #hide_dependencies = true
 #opaqueid_in_api = 8
 #api_secret = "janusrocks"
 #session_timeout = 60

}

Lorenzo Miniero

unread,
Aug 8, 2022, 9:58:35 AM8/8/22
to meetecho-janus
Il giorno lunedì 8 agosto 2022 alle 12:30:05 UTC+2 kajiva...@gmail.com ha scritto:
2022-08-08T12:26:13+02:00 janus-gateway.janus-gateway[78702]: Error opening log file /home/variable-k/janus.log: Permission denied

The error seems pretty obvious to me. As I said in my previous reply, make sure it's not a permission error.

L.

Mirko Brankovic

unread,
Aug 8, 2022, 10:34:56 AM8/8/22
to meetecho-janus
It is problem with a user that runs janus and dirs you try to write to, not the mods.
So you have to use chown on that dir

--
You received this message because you are subscribed to the Google Groups "meetecho-janus" group.
To unsubscribe from this group and stop receiving emails from it, send an email to meetecho-janu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/meetecho-janus/cbf2a897-b30c-43c6-afc0-edc9d0f1e74en%40googlegroups.com.

Kinsley Kajiva

unread,
Aug 8, 2022, 2:30:20 PM8/8/22
to meetecho-janus
ok noted , thank you issue closed.
Reply all
Reply to author
Forward
0 new messages