From: Alan McKinnon <alan.mckinnon@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] Syslog-ng "Failed to seek to the Cursor"
Date: Wed, 16 Sep 2015 21:57:49 +0200 [thread overview]
Message-ID: <55F9C9BD.202@gmail.com> (raw)
In-Reply-To: <CAGfcS_kN5vX0aZ5thFOPkft1DoVRsWMJ4aLqrT=4ZPeo9e-dTQ@mail.gmail.com>
On 16/09/2015 21:42, Rich Freeman wrote:
> On Wed, Sep 16, 2015 at 12:55 PM, Alan McKinnon <alan.mckinnon@gmail.com> wrote:
>>
>> It has something to do with systemd's log thingy.
>>
>> The error only appears in one place in the syslog-ng source,
>> in modules/systemd-journal/journal-reader.c:
>>
>> static inline gboolean
>> __seek_to_saved_state(JournalReader *self)
>> {
>> JournalReaderState *state =
>> persist_state_map_entry(self->persist_state, self->persist_handle);
>> gint rc = journald_seek_cursor(self->journal, state->cursor);
>> persist_state_unmap_entry(self->persist_state, self->persist_handle);
>> if (rc != 0)
>> {
>> msg_warning("Failed to seek to the cursor",
>> evt_tag_str("cursor", state->cursor),
>> evt_tag_errno("error", errno),
>> NULL);
>> return __seek_to_head(self);
>> }
>> journald_next(self->journal);
>> return TRUE;
>> }
>>
>
> The other posts are getting at the solution - disable journal support
> if you're not actually using systemd.
>
> However, does syslog-ng actually READ logs? My understanding is that
> journal cursors are used to read logs, not to write them, and I
> associate syslog-ng more with writing logs.
>
> The concept is that when you query the journal every record gets
> returned with a cursor, which is just a guid of some sort. Then you
> can run a later query and pass the last cursor you saw back and just
> get a list of new records since the last one you read. The use case
> is for log monitors and such so that they can periodically poll the
> log without having to read the entire thing from the beginning each
> time.
>
Digging up ancient memory from other people's posts long ago:
Doesn't syslog-ng read systemd's log from early userspace startup
(before syslog-ng starts) and write those entries to syslog-ng?
--
Alan McKinnon
alan.mckinnon@gmail.com
next prev parent reply other threads:[~2015-09-16 19:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 15:57 [gentoo-user] Syslog-ng "Failed to seek to the Cursor" Helmut Jarausch
2015-09-16 16:55 ` Alan McKinnon
2015-09-16 18:52 ` Helmut Jarausch
2015-09-16 18:58 ` Alan McKinnon
2015-09-16 19:05 ` Fernando Rodriguez
2015-09-16 19:19 ` Fernando Rodriguez
2015-09-17 10:26 ` Helmut Jarausch
2015-09-16 19:42 ` Rich Freeman
2015-09-16 19:57 ` Alan McKinnon [this message]
2015-09-16 20:03 ` Rich Freeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55F9C9BD.202@gmail.com \
--to=alan.mckinnon@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox