help-guix
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem with Shepherd after `guix home reconfigure`


From: Hilton Chain
Subject: Re: Problem with Shepherd after `guix home reconfigure`
Date: Fri, 25 Aug 2023 15:34:09 +0800

Hello,

On Fri, 25 Aug 2023 14:59:03 +0800,
Tanguy LE CARROUR wrote:
>
> Hi,
>
> Quoting nils@landt.email (2023-08-23 10:09:06)
> > Tanguy LE CARROUR <tanguy@bioneland.org> hat am 22.08.2023 18:56 CEST 
> > geschrieben:
> > > I now have a slightly different error message:
> > >
> > > ```
> > > $ guix home reconfigure
> > > # […]
> > > SSLoading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > > herd: error: exception caught while executing 'load' on service 'root':
> > > In procedure fport_write: Broken pipe
> > > ```
> > > […]
> > > Even though `mpd` is reported as "starting" it actually works.
> > > `herd stop mcron` still hangs forever, but `herd status` keeps on
> > > working and reporting "starting" services.
> > >
> > > Thoughts? 🤔
> >
> > I had a similar issue about 2 months ago. I was using XDG_LOG_HOME in
> > a shepherd service definition, and it was not available anymore.
> > The error message I got was different, but the result was the same -
> > some services shown as "starting" and working, but herd <command> not
> > working for one particular broken service.
> >
> > I suggest to check your
> > /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf file for the
> > log path of the mcron job. Maybe your XDG_STATE_HOME points to a
> > non-writable directory?
>
> ```
> $ cat /gnu/store/l1463gh71pm62404rxpwbzhwmz8dakl2-shepherd-mcron.scm
> # […]
> #:log-file (string-append %user-log-dir "/mcron.log")
>
> $ env | grep XDG
> # […]
> XDG_STATE_HOME=/home/tanguy/.local/state
>
> $ ls /home/tanguy/.local/state
> log  nvim  shepherd  wireplumber
>
> $ ls /home/tanguy/.local/state/log/
> dbus.log  mcron.log  shepherd.log
> ```
>
> I have no XDG "log" variable, but the `shepherd.log` in `~/.local/state/log/`
> contains today's log, so… I guess it can write to the log folder.
> The strange thing is that today mcron's log is in
> `~/.local/state/shepherd/`?! 🤔


From the definition in (shepherd support), the location is expected:
--8<---------------cut here---------------start------------->8---
(define %user-log-dir
  ;; Default log directory if shepherd is run as a normal user.
  (string-append (or (getenv "XDG_STATE_HOME")
                     (string-append user-homedir "/.local/state"))
                 "/shepherd"))
--8<---------------cut here---------------end--------------->8---


And ~/.local/state/log/mcron.log was used before changing to
%user-log-dir:
--8<---------------cut here---------------start------------->8---
#:log-file (string-append
            (or (getenv "XDG_STATE_HOME")
                (format #f "~a/.local/state"
                        (getenv "HOME")))
            "/log/mcron.log")
--8<---------------cut here---------------end--------------->8---



reply via email to

[Prev in Thread] Current Thread [Next in Thread]