Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improper logrotate behaviour – or incorrect configuration. #1503

Open
krecik82 opened this issue Dec 29, 2021 · 2 comments
Open

Improper logrotate behaviour – or incorrect configuration. #1503

krecik82 opened this issue Dec 29, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@krecik82
Copy link

Describe the bug
Base on documentation timestamp suffix should be added to rotated log file:
The current log file is named freeswitch.log. Rotated log files are named freeswitch.log.YYYY-MM-DD-hh-mm-ss.s.

https://freeswitch.org/confluence/display/FREESWITCH/mod_logfile

However in our case, there is always .1 .2 suffix added (it was this way in the past in old freeswitch versions). It makes also another problem, whenever we want to clean up or compress files, we do get such error in freeswitch.log

2021-12-24 19:54:55.444486 [CRIT] mod_logfile.c:164 Error renaming log from /opt/fs_cc_gw/log/instance1/freeswitch.log.1 to /opt/fs_cc_gw/log/instance1/freeswitch.log.2 [No such file or directory]

We do always take all rotated files, to new location where gzip is being performed. As a consequence rotate process fails, and freeswitch.log increase rapidly.

To Reproduce

Expected behavior
Timestamp is being added and file can be deleted/moved without any problem.

Package version or git hash

  • Version 1.10.6

Trace logs
Will provide If you confirm, that’s bug, bot configuration issue

backtrace from core file
Will provide If you confirm, that’s bug, bot configuration issue

@krecik82 krecik82 added the bug Something isn't working label Dec 29, 2021
@krecik82
Copy link
Author

After I stopped moving files all is being fine - except suffix value:

-rw-r--r-- 1 freeswitch freeswitch 1048576076 Jan 13 09:22 freeswitch.log.1
-rw-r--r-- 1 freeswitch freeswitch 1048576027 Jan 10 12:49 freeswitch.log.2
-rw-r--r-- 1 freeswitch freeswitch 1048576122 Jan  8 11:20 freeswitch.log.3
-rw-r--r-- 1 freeswitch freeswitch 1048576236 Jan  6 12:45 freeswitch.log.4
-rw-r--r-- 1 freeswitch freeswitch 1048576156 Dec 29 13:04 freeswitch.log.5
-rw-r--r-- 1 freeswitch freeswitch          0 Dec 29 11:06 freeswitch.log.6

freeswitch.log.6 (originally it was freeswitch.log.1) - was created manually to retrigger log rotating mechanism, without this file, Critical error was found in fresswitch log, and no rotation was performed.

So now when I manually delete one of these files it will stop rotating again. The same behaviour can be met on several our servers (deployed with ansible, so could be that the same configuration issue performs this problem), but it looks rather like a soft bug.

@krecik82
Copy link
Author

krecik82 commented Sep 2, 2022

I think that issue can be related to this bug:

freeswitch log rotation bug #1738

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant