From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 54CE91393F1 for ; Wed, 16 Sep 2015 19:58:17 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1844721C027; Wed, 16 Sep 2015 19:58:11 +0000 (UTC) Received: from mail-wi0-f177.google.com (mail-wi0-f177.google.com [209.85.212.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BE202E0882 for ; Wed, 16 Sep 2015 19:58:09 +0000 (UTC) Received: by wicfx3 with SMTP id fx3so221465wic.0 for ; Wed, 16 Sep 2015 12:58:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-type:content-transfer-encoding; bh=yzG7SL955u6+UOKmsv08WNAzIRr5VjuHq5TtIJQgkGg=; b=aP5yVuuWq/xnjeVMRceYQLN16ofaUY6kBJB6mkLq20Xq6M88mUNx5pOjdgyLNx+4xH EISrNLG+BTbasxqeXEaU+r5GAVBKxiulHR6mHAklvkaq27qlJM2TXU7rPJ9BWwK/4Wb2 vPxm5qy49TxdkIDHxDgt3leoJT0IV28/CkvglSYIYx7qfYvlU5H/mGonEZnUPWQQmHRZ vJ61YwWt7phaMxrO0rokuX/7Bi9Q4Nah20nhQUksuJQvWtagD8Fyj5Wbr30QYZ433nnv Hw5FYWgqiBREzX/btEQ7CXl+SPOPRvp8ZSDZ+lrskVE+1G4OnPCgsuA2nJUvb0jag+WT LAsQ== X-Received: by 10.180.88.4 with SMTP id bc4mr37879wib.68.1442433488665; Wed, 16 Sep 2015 12:58:08 -0700 (PDT) Received: from [172.20.0.41] ([105.210.58.210]) by smtp.googlemail.com with ESMTPSA id mc18sm6094304wic.23.2015.09.16.12.58.07 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2015 12:58:08 -0700 (PDT) Subject: Re: [gentoo-user] Syslog-ng "Failed to seek to the Cursor" To: gentoo-user@lists.gentoo.org References: <55F99EE4.6000902@gmail.com> From: Alan McKinnon Message-ID: <55F9C9BD.202@gmail.com> Date: Wed, 16 Sep 2015 21:57:49 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-user@lists.gentoo.org Reply-to: gentoo-user@lists.gentoo.org MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Archives-Salt: ebd10e45-3a23-4810-9a3d-7cc44f2cea90 X-Archives-Hash: 482bb907a1a0a4c059cd56140f56eb1c On 16/09/2015 21:42, Rich Freeman wrote: > On Wed, Sep 16, 2015 at 12:55 PM, Alan McKinnon 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