Hi all,
I'm trying to track down an error (one of a few that is prevalent in my
logs on one of my central NXLOG instances).
ERROR procedure 'parse_json' failed at line 110, character 25 in
/etc/nxlog.conf. *statement execution has been aborted;map key name not
found*
Here it is as part of a sequence of logs (whether there are relationships
between this entries, I don't know; it is a busy log server).
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid string in json text.;
function 'replace' failed at li; (right here) ------^;
[function 'replace' failed at line 104, character 152 in C:\Program Files
(x86)\nxlog\conf\nxlog.conf. expression evaluation has been aborted]
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid char in json text.; 'unknown'
type argument is inva; (right here) ------^; ['unknown'
type argument is invalid for argument 'subject', string required]
2014-08-26 12:24:55 ERROR procedure 'parse_json' failed at line 110,
character 25 in /etc/nxlog.conf. statement execution has been aborted;map
key name not found
2014-08-26 12:24:55 ERROR procedure 'parse_json' failed at line 110,
character 25 in /etc/nxlog.conf. statement execution has been aborted;map
key name not found
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid string in json text.;
function 'replace' failed at li; (right here) ------^;
[function 'replace' failed at line 104, character 152 in C:\Program Files
(x86)\nxlog\conf\nxlog.conf. expression evaluation has been aborted]
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid char in json text.; 'unknown'
type argument is inva; (right here) ------^; ['unknown'
type argument is invalid for argument 'subject', string required]
2014-08-26 12:24:55 ERROR procedure 'parse_json' failed at line 110,
character 25 in /etc/nxlog.conf. statement execution has been aborted;map
key name not found
2014-08-26 12:24:55 ERROR procedure 'parse_json' failed at line 110,
character 25 in /etc/nxlog.conf. statement execution has been aborted;map
key name not found
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid string in json text.;
function 'replace' failed at li; (right here) ------^;
[function 'replace' failed at line 104, character 152 in C:\Program Files
(x86)\nxlog\conf\nxlog.conf. expression evaluation has been aborted]
2014-08-26 12:24:55 ERROR failed to parse json string, lexical error:
invalid char in json text.; 'unknown'
type argument is inva; (right here) ------^; ['unknown'
type argument is invalid for argument 'subject', string required]
2014-08-26 12:24:55 ERROR procedure 'parse_json' failed at line 110,
character 25 in /etc/nxlog.conf. statement execution has been aborted;map
key name not found
I think that's talking about this particular invocation (line 110 is the
last line of this Exec statement.
<Input in_json_tls>
Module im_ssl
Port 10514
Host 0.0.0.0
CertKeyFile /etc/pki/tls/private/logs.MYSITE.key
CertFile /etc/pki/tls/certs/logs.MYSITE.crt
CAFile /etc/pki/tls/certs/logs.MYSITE.ca-bundle
RequireCert FALSE
Exec parse_json(); \
if $MY_application_stack == undef \
{ \
$MY_application_stack = "common"; \
} \
if $MY_log_type == undef \
{ \
$MY_log_type = "unknown"; \
} \
if $MY_environment == undef \
{ \
$MY_environment = "prod"; \
}
</Input>
I would like some insight into what the "map key name not found" means, so
I can look for what logs might be causing that.
I see in the source code that "map key name not found" is always associated
with a handful of call-sites in the JSON module, and always like the
following:
if ( ctx->key == NULL )
{
throw_msg("map key name not found");
}
In particular, I see that it is potentially called inside the the callbacks
for all of the various JSON datatypes (ie. in yajl_parse_*_cb). Looking in
the code, it seems that this sort of thing is never expected, and is
perhaps symptomatic of a bug.
It would be better if throw_msg included __FILE__, __LINE__ and
__FUNCTION__, then I would know exactly which call-site to look at.
Cheers,
Cameron
--
Cameron Kerr <cameron.kerr...@gmail.com>
See my blog at http://distracted-it.blogspot.co.nz/ (previously
http://humbledown.org/)
Skype me on cameron.kerr.nz
------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds. Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
nxlog-ce-users mailing list
nxlog-ce-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nxlog-ce-users