1 |
On 16/09/2015 21:42, Rich Freeman wrote: |
2 |
> On Wed, Sep 16, 2015 at 12:55 PM, Alan McKinnon <alan.mckinnon@×××××.com> wrote: |
3 |
>> |
4 |
>> It has something to do with systemd's log thingy. |
5 |
>> |
6 |
>> The error only appears in one place in the syslog-ng source, |
7 |
>> in modules/systemd-journal/journal-reader.c: |
8 |
>> |
9 |
>> static inline gboolean |
10 |
>> __seek_to_saved_state(JournalReader *self) |
11 |
>> { |
12 |
>> JournalReaderState *state = |
13 |
>> persist_state_map_entry(self->persist_state, self->persist_handle); |
14 |
>> gint rc = journald_seek_cursor(self->journal, state->cursor); |
15 |
>> persist_state_unmap_entry(self->persist_state, self->persist_handle); |
16 |
>> if (rc != 0) |
17 |
>> { |
18 |
>> msg_warning("Failed to seek to the cursor", |
19 |
>> evt_tag_str("cursor", state->cursor), |
20 |
>> evt_tag_errno("error", errno), |
21 |
>> NULL); |
22 |
>> return __seek_to_head(self); |
23 |
>> } |
24 |
>> journald_next(self->journal); |
25 |
>> return TRUE; |
26 |
>> } |
27 |
>> |
28 |
> |
29 |
> The other posts are getting at the solution - disable journal support |
30 |
> if you're not actually using systemd. |
31 |
> |
32 |
> However, does syslog-ng actually READ logs? My understanding is that |
33 |
> journal cursors are used to read logs, not to write them, and I |
34 |
> associate syslog-ng more with writing logs. |
35 |
> |
36 |
> The concept is that when you query the journal every record gets |
37 |
> returned with a cursor, which is just a guid of some sort. Then you |
38 |
> can run a later query and pass the last cursor you saw back and just |
39 |
> get a list of new records since the last one you read. The use case |
40 |
> is for log monitors and such so that they can periodically poll the |
41 |
> log without having to read the entire thing from the beginning each |
42 |
> time. |
43 |
> |
44 |
|
45 |
|
46 |
Digging up ancient memory from other people's posts long ago: |
47 |
|
48 |
Doesn't syslog-ng read systemd's log from early userspace startup |
49 |
(before syslog-ng starts) and write those entries to syslog-ng? |
50 |
|
51 |
-- |
52 |
Alan McKinnon |
53 |
alan.mckinnon@×××××.com |