Bug 991647

Summary: rsyslogd: db error (1054): Unknown column 'invld' in 'field list' (100% CPU utilization)
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: rsyslogAssignee: Tomas Heinrich <theinric>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: lkundrak, mah.darade, pvrabec, theinric
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-02-17 16:32:13 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Reindl 2013-08-03 09:29:15 UTC
ommysql - rsyslog-mysql-7.2.6-1.fc19.x86_64

Aug  3 11:17:33 testserver rsyslogd: db error (1054): Unknown column 'invld' in 'field list'

http://kb.monitorware.com/100-cpu-utilization-t10230.html
http://kb.monitorware.com/100-cpu-utilization-t10230.html#p18605

> ummm... it's even worse than I thought: rsyslog is completely right! 
> the facility is invalid, 198 is NOT a valid PRI value (it has facility 
> 24, which does not exist (see the old definition in 
> http://www.ietf.org/rfc/rfc3164.txt, as well as in current RFC5424). 
> I have to admit I do not know how to proceed from here on. 
> Probably filing a bug against sysklogd is the only right thing to do...

> get's even worse: I checked sysklogd code, and it intentionally has a 
> code LOG_MARK, with that non-existing facility of 24. Even more puzzled 
> now...

Comment 1 Harald Reindl 2013-08-03 10:20:10 UTC
a workaround is not to write the column to the mysql-database

since i do not need ReceivedAt, Facility, Priority, InfoUnitID in
my web-based backends for which the database exists i will stay at it

$template tpl,"insert into systemevents (Message, FromHost, DeviceReportedTime, SysLogTag) values ('%msg%', '%HOSTNAME%', '%timereported:::date-mysql%', '%syslogtag%')",SQL 
________________________________________________________

what i do not understand is that the error goes away but rsyslog insists to write the non listed fields with default values and so the great option reduce the database size is not really useable :-(

Aug  3 12:18:19 testserver rsyslogd: db error (1054): Unknown column 'Facility' in 'field list'

Comment 2 Harald Reindl 2013-08-03 11:10:41 UTC
ERRATA:

that the error stopped was only luck
the way below only the wanted fields are proceeded
_________________________________________________________________

template(name="stdSQLformat" type="string" option.sql="on"
 string="insert into SystemEvents (Message, FromHost, DeviceReportedTime, SysLogTag) values ('%msg%', '%HOSTNAME%', '%timereported:::date-mysql%', '%syslogtag%')"
)

*.info;mail.none;authpriv.none;cron.none            action(type="ommysql" server="192.168.196.1" serverport="3306" db="rsyslog" uid="syslog_insert" pwd="*****" template="stdSQLformat")

mail.*                                              action(type="ommysql" server="127.0.0.1" serverport="3307" db="rsyslog" uid="syslog_insert" pwd="*****" template="stdSQLformat")

Comment 3 Tomas Heinrich 2014-10-20 15:49:52 UTC
Harald, I can reproduce the issue partially by using this template:

$template tpl,"insert into SystemEvents (Message, Facility, FromHost, Priority, DeviceReportedTime, ReceivedAt, InfoUnitID, SysLogTag) values ('%msg%', foo, '%HOSTNAME%', %syslogpriority%, '%timereported:::date-mysql%', '%timegenerated:::date-mysql%', %iut%, '%syslogtag%')",SQL

I see the error message

"Oct 20 17:23:05 hn rsyslogd: db error (1054): Unknown column 'foo' in 'field list'

but I don't get a busy-loop. Could you confirm that this configuration should produce the symptoms?

Comment 4 Harald Reindl 2014-10-20 15:56:24 UTC
i have fixed that on all machine with my template above

i quoted the other things because i feel rsyslog introudces way too much changes the last 2 years with a ton of regressions - frankly using rsyslog-mysql still blocks a reboot forever until i tell systemd kill it after 1 second at stop and so on

Comment 5 Fedora End Of Life 2015-01-09 19:15:06 UTC
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Fedora End Of Life 2015-02-17 16:32:13 UTC
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.