Syslog-ng not running in TOS 5.0.0

I switched to HBT and after reboot, syslog-ng was not running and /var/log/messages didn’t exist.
(same after reboot).
after /etc/init.d/syslog-g start file is created and process running.
is there anything I should look for?

Unless it crashed somehow during boot it could be that the init script is (inadvertently) disabled. Can be checked though LuCI or alternatively from cli ls /etc/rc.d | grep syslog

yeah, forgot to mention this:

lrwxrwxrwx 1 root root 19 Jun 2 19:25 /etc/rc.d/S50syslog-ng -> …/init.d/syslog-ng

the link exists and points where it should. so it apparently crashed at boot.
maybe I could try a netconsole for booting TOS

Try, but if it crashes it is likely not turning up in the kernel logs, bit of a catch22 to log a crash of the syslog daemon.

Try to change that START order, just rename S50syslog-ng to something like S-1syslog-ng, see if that makes a change.


In Turris OS 5.0 thread, there are some steps which need to be followed, because in your post there isn’t anything helpful for us. For that, there are diagnostics, which you can generate in Foris/reForis.

I’d like to hear more details about why it crashed and if you were modifying syslog-ng config file and if it was enabled by default, which is. Was there an error during the update from HBS to HBT? Today I switched during the day at least 5 times from HBS to HBT and I haven’t experienced what you described. Even if you don’t have file /var/log/messages, there is a possibility to run syslog-ng manually, but you said that it works while using init script. There is output from dmesg, there you could see something related. If there’s created symlink obrazek it might not be correct (my case, when I removed syslog-ng) Even if it starts and then crashes, there is respawn.

Anyway, even it will help which syslog-ng version you have installed output of opkg list-installed | grep syslog-ng) then it might be helpful ubus call service list and so on, but these outputs are included in diagnostics.

yes, that mammoth thread… I’ll look a that (and I did before, but it’s a mammoth). Is there particular important dIagnostics module or any that can be avoided?

I can retry the switch hopefully on friday/weekend, no error remembered :frowning:
so far:

syslog-ng - 3.27.1-1.0
I don’t remember changing its configuration.

-rw-r–r-- 1 root root 2044 Jun 1 01:25 /etc/syslog-ng.conf

/etc/rc.d/S50syslog-ng is not a danging symlink.

Yes, it is quite long indeed, but you should very often read OP and if there is the first reply in that thread. Sometimes reserved for known bugs or something related.

For me, unfortunately, it seems that it affects just you. I don’t know why and what’s happened. There are no logs and it is hard to see and track it. Because nobody reported it that this happening. I could see that this affects your just router because of the configuration or something else. If you will be able to reproduce it, please gather as many details as you can and send it to the support department. If it happens for anyone else, we will try to look at it in fixup releases of major version.

In diagnostics, there are sensitive data and you can check it before sending it to us.

I guess it was caused by disabled ipv6. syslog-ng has this in config:

source net {
network(ip("::1") port(514) transport(udp) ip-protocol(6));

which fails if ipv6 isn’t available
… after enabling ipv6 on wan interface, syslogn-ng runs.


This happened again, with TOS 5.0.1 HBT. after reboot, syslog-ng does not run.
I have commented out network sources, works now.

The fix didn’t make it to Turris OS 5.0.1. It would be mentioned in the changelog and we will let you know if it is fixed or not. Forum is not a bug tracker and it is not suitable for reporting bugs. Syslog-ng comes from OpenWrt packages feed. This bug when syslog-ng is not starting is caused by a disabled IPv6 interface.

You might want to look into the issue, where are details included.

I should be able to get to review it soon.

did not know about this issue - thanks, I’ll look.

I wondered that the issue reappeared after I felt have fixed it.

I think I have not explicitly disabled ipv6, only removed some ipv6 interfaces (edit: removed wan6 as it looks when comparing backups)

unfortunately I have reset my router, and I’m sorry when I see that bug - I’d try to help.

I have tracked this problem down to hostname change.
When I set it to ‘gw’ (as I use on my lan), it does not start on boot.
When I set it back to “turris”, syslog-ng works properly and starts at boot.

I have retested thiw with TOS 5.0.1. changing hostname to “gw” causes syslog-ng not to start.
changing it to “turris” or “blah” makes syslog-ng start.

maybe some of startup scripts consider “gw” as a keyword

I think I got it. When my hostname is “gw” and I have following entry in /etc/hosts

192.168.X.1 gw.lan gw

(192.168.X.1 being my router’s LAN address) the syslog-ng doesn’t start.
The same happened when I set hostname to “blah” and the line in /etc/hosts was

192.168.X.1 blah.lan blah

when system hostname was set to something not in /etc/hosts, syslog-ng started properly.

I have just upgraded to 5.1.0 and seems that with hostname “gw” and “gw” being resolved in /etc/hosts syslog-ng starts after reboot.