Gentoo Archives: gentoo-user

From: Helmut Jarausch <jarausch@××××××.be>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Syslog-ng "Failed to seek to the Cursor"
Date: Thu, 17 Sep 2015 10:26:30
Message-Id: 9drqqGyc66TA0/eP80FpSe@5/o9zF5Yg111g+bxB3fvM
In Reply to: Re: [gentoo-user] Syslog-ng "Failed to seek to the Cursor" by Fernando Rodriguez
1 On 09/16/2015 09:19:58 PM, Fernando Rodriguez wrote:
2 > On Wednesday, September 16, 2015 3:05:55 PM Fernando Rodriguez wrote:
3 > > On Wednesday, September 16, 2015 8:52:21 PM Helmut Jarausch wrote:
4 > > > On 09/16/2015 06:55:00 PM, Alan McKinnon wrote:
5 > > > > On 16/09/2015 17:57, Helmut Jarausch wrote:
6 > > > > > I have syslog-ng-3.7.1 installed here.
7 > > > > > Syslog-ng fails to start with the message:
8 > > > > > Failed to seek to the Cursor cursor='', error='Success (0)'
9 > > > > >
10 > > > > > Does anybody know what's happening?
11 > > > > >
12 > > > > > Many thanks for a hint,
13 > > > > > Helmut
14 > > > > >
15 > > > > >
16 > > > >
17 > > > >
18 > > > > It has something to do with systemd's log thingy.
19 > > > >
20 > > > > The error only appears in one place in the syslog-ng source,
21 > > > > in modules/systemd-journal/journal-reader.c:
22 > > > >
23 > > > > static inline gboolean
24 > > > > __seek_to_saved_state(JournalReader *self)
25 > > > > {
26 > > > > JournalReaderState *state =
27 > > > > persist_state_map_entry(self->persist_state,
28 > self->persist_handle);
29 > > > > gint rc = journald_seek_cursor(self->journal, state->cursor);
30 > > > > persist_state_unmap_entry(self->persist_state,
31 > > > > self->persist_handle);
32 > > > > if (rc != 0)
33 > > > > {
34 > > > > msg_warning("Failed to seek to the cursor",
35 > > > > evt_tag_str("cursor", state->cursor),
36 > > > > evt_tag_errno("error", errno),
37 > > > > NULL);
38 > > > > return __seek_to_head(self);
39 > > > > }
40 > > > > journald_next(self->journal);
41 > > > > return TRUE;
42 > > > > }
43 > > > >
44 > > > >
45 > > > > First step would appear to be to check systemd's built-in log
46 > thingy
47 > > > >
48 > > >
49 > > > Thanks Alan,
50 > > >
51 > > > but how to do that. I have systemd installed here but I haven't
52 > ever used
53 > it
54 > > since I'm using openrc.
55 > > > So, what can I do?
56 > > >
57 > > > Thanks,
58 > > > Helmut
59 > > >
60 > > >
61 > >
62 > > Look for file named syslog-ng.persist somewhere in /var and delete
63 > it, then
64 > try
65 > > restarting syslog-ng.
66 > >
67 > > I also recommend you start playing with journalctl. I hated it for a
68 > while
69 > but
70 > > mostly because I didn't knew how to use it. Now I love it and got
71 > rid of
72 > > syslog-ng.
73 >
74 > Ops, I missed the part about not using systemd. If deleting that file
75 > doesn't
76 > fix it check if you have the systemd use flag enabled for syslog-ng
77 > and disable
78 > it. Are you using a systemd profile?
79 >
80
81 Many thanks, Fernando,
82 the systemd use-flag of syslog-ng was the culprit.
83 (no, I don't use a systemd profile)
84
85 Helmut.