This may have already been addressed, and I apologize if it has, but here is my issue. I have separated the TINCD log from syslog to isolate the VPN activity. By starting with daemon with the --logfile= switch It seems to work fine except that once log rotation takes place, the daemon does not recreate the log, nor will it write to the new log even if an empty file is put into place. The only way to re-establish the log writing is to restart the tincd service. Any help on this issue would be greatly appreciated. David M. Kassemos ___________________________ This e-mail transmission contains information intended only for the use of the recipient(s) named above. Further, it contains information that may be privileged and confidential. If you are not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this message (including any attachments) is strictly prohibited. If you have received this e-mail in error, please notify the sender by reply e-mail and then delete this message from your mail system. Thank you for your compliance. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20121129/b66d7599/attachment.html>
On Thu, Nov 29, 2012 at 12:58:40PM +0000, Kassemos, David wrote:> This may have already been addressed, and I apologize if it has, but here is my issue. > > I have separated the TINCD log from syslog to isolate the VPN activity. > By starting with daemon with the --logfile= switch > > It seems to work fine except that once log rotation takes place, the daemon does not recreate the log, nor will it write to the new log even if an empty file is put into place. > > The only way to re-establish the log writing is to restart the tincd service. > > Any help on this issue would be greatly appreciated.You should send a HUP signal to the tinc daemon after you have rotated the logs, otherwise tinc keeps writing to the old log file. For example, if you use logrotate, and want daily rotation up to one week, then add this to logrotate.conf: /var/log/tinc.netname.log { rotate 7 daily postrotate /usr/sbin/tincd -n netname -kHUP endscript } Or if you are using tinc 1.1, use "/usr/sbin/tincctl -n netname reload" instead. If that still doesn't work, let me know. -- Met vriendelijke groet / with kind regards, Guus Sliepen <guus at tinc-vpn.org> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: Digital signature URL: <http://www.tinc-vpn.org/pipermail/tinc/attachments/20121129/055d32d2/attachment.pgp>
> It seems to work fine except that once log rotation takes place, the daemon > does not recreate the log, nor will it write to the new log even if an empty > file is put into place. > > The only way to re-establish the log writing is to restart the tincd service.That's pretty normal behaviour. Most daemons behave similarly (look at the logrotate config for Apache). Even though logrotate renames the file, the daemon still retains a file handle to the old log's inode. To fix it, add a "postrotate" clause to your config: postrotate /etc/init.d/tinc restart > /dev/null endscript Cheers, Peter