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

Broken logging in 20.1 (FreeBSD 12.1) #49

Closed
dgktkr opened this issue Dec 11, 2019 · 9 comments
Closed

Broken logging in 20.1 (FreeBSD 12.1) #49

dgktkr opened this issue Dec 11, 2019 · 9 comments
Assignees
Labels
bug Production bug

Comments

@dgktkr
Copy link

dgktkr commented Dec 11, 2019

For FreeBSD 12.1 and HardenedBSD that is based on it, syslogd is partially broken. The same goes for OPNsense 20.1.

Entries in syslog.conf that rely on LogTag (or program name), e.g.

!filterlog
*.* %/var/log/filterlog

don't put any messages in the log files even though plenty are being sent by the filterlog program using the syslog() call. And, of course, since no messages are in those log files, OPNsense doesn't show them.

Entries in syslog.conf that use one of the 24 standard facilities (e.g. local7) allow messages to be forwarded by syslogd as expected. WebGUI/Firewall/Log Files/Plain View shows messages. However, messages that require parsing by OPNsense, like WebGUI/Firewall/Log Files/Live View or WebGUI/Firewall/Log Files/Overview show nothing.

Is the cause a change in syslog.c for FreeBSD 12.X (see the entry in /UPDATING dated 20180406)?

Apparently, syslogd and OPNsense haven't caught up to that change yet.

@fichtner fichtner added the support Community support label Dec 11, 2019
@rene-bayer
Copy link

Correct me if i am wrong, but this should also be the reason, why the firewall live view isnt working in 20.1?

Greets,
René

@fichtner
Copy link
Member

I guess so.

@dgktkr
Copy link
Author

dgktkr commented Dec 17, 2019

To confirm my understanding of the problem, I started with a fresh update of OPNsense src.git from GitHub. I then replaced /usr/src/lib/libc/gen/syslog.c with the previous version (see https://reviews.freebsd.org/D14951. Then a build of base, kernel, packages and arm provided an image where the firewall Live View, Overview and Plain View work as expected.

Given the above solution to the problem, I haven't investigated why syslogd didn't work properly with the 12.1 version of syslog.c, even though some effort has been made along those lines (see https://reviews.freebsd.org/D15011

@fichtner
Copy link
Member

Can you try this?

# opnsense-code tools ports
# cd /usr/ports/opnsense/syslogd-devel
# make
# cp /usr/obj/usr/ports/opnsense/syslogd-devel/work/stage/usr/local/sbin/syslogd /usr/local/sbin/syslogd

@dgktkr
Copy link
Author

dgktkr commented Dec 18, 2019

Hi Franco,

Sure. As near as I can tell, you're requesting that the above commands be executed on the target device running OPNsense.

Doing that, the first line resulted in an error:

root@OPNsense:~ # opnsense-code tools ports
Updating OPNsense repository catalogue...
pkg: https://pkg.opnsense.org/FreeBSD:12:armv7/20.1/latest/meta.txz: Not Found
repository OPNsense has no meta file, using default settings
pkg: https://pkg.opnsense.org/FreeBSD:12:armv7/20.1/latest/packagesite.txz: Not Found
Unable to update repository OPNsense
Error updating repositories!

@fichtner
Copy link
Member

Err, sorry, opnsense-code depends on nonexistent package repository.

Meanwhile I tested the patch and there's still an issue with CLOG support. Have to sort that out first.

@fichtner fichtner added bug Production bug and removed support Community support labels Dec 19, 2019
@fichtner fichtner self-assigned this Dec 19, 2019
@nekoprog
Copy link
Member

If i'm not mistaken, @DarkSunOne hosted opnsense pkg repo right? Maybe he can upload armv7 packages and point update server to his repo and run again opnsense-code tools ports.

Or since @dgktkr build his own pkg, he can upload it locally to web server and point update server to local address.

@rene-bayer
Copy link

rene-bayer commented Dec 26, 2019 via email

@fichtner
Copy link
Member

This was fixed by @AdSchellevis for the upcoming 20.7-BETA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Production bug
Development

No branches or pull requests

4 participants