* Problem with Sheperd after `guix home reconfigure`
@ 2023-08-22 10:33 Tanguy LE CARROUR
2023-08-22 12:40 ` Hilton Chain
0 siblings, 1 reply; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-22 10:33 UTC (permalink / raw)
To: help-guix
Hi Guix,
This morning I `guix pull` and `guix system reconfigure` my system
and everything seemed to be OK. But, when I `guix home reconfigure`,
I got an error message:
```
Loading /gnu/store/x103955zkwzkbmb9hji0dxc5fk7l8c3q-shepherd.conf.
herd: error: exception caught while executing 'load' on service 'root':
Unbound variable: %user-log-dir
```
The config contains the following:
```
$ cat /gnu/store/x103955zkwzkbmb9hji0dxc5fk7l8c3q-shepherd.conf
(begin (use-modules (srfi srfi-34) (system repl error-handling)) (apply register-services (map (lambda (file) (load file)) (quote ("/gnu/store/xz6amxpc572hirdysivd4gmvivfibzkh-shepherd-transmission.scm" "/gnu/store/wwkmsgbi8jc0nysgflgg10sqmqmxs8dm-shepherd-tor.scm" "/gnu/store/kzlmpjlbzz7fmvb32f96qd7wnw0rx4nn-shepherd-mpd.scm" "/gnu/store/7qa23wxmmqf50iybpd86qyg64977mdzm-shepherd-mcron.scm")))) (action (quote root) (quote daemonize)) (format #t "Starting services...~%") (let ((services-to-start (quote (mpd mcron)))) (if (defined? (quote start-in-the-background)) (start-in-the-background services-to-start) (for-each start services-to-start)) (redirect-port (open-input-file "/dev/null") (current-input-port))))
```
The only mention to `%user-log-dir` seems to be in `...-shepherd-mcron.scm`:
```
$ cat /gnu/store/7qa23wxmmqf50iybpd86qyg64977mdzm-shepherd-mcron.scm
(eval-when (expand load eval) (let ((extensions (quote ())) (prepend (lambda (items lst) (let loop ((items items) (lst lst)) (if (null? items) lst (loop (cdr items) (cons (car items) (delete (car items) lst)))))))) (set! %load-path (prepend (cons "/gnu/store/5bgqil67vfaymb4q3pxp2xb5lqvki81x-module-import" (map (lambda (extension) (string-append extension "/share/guile/site/" (effective-version))) extensions)) %load-path)) (set! %load-compiled-path (prepend (cons "/gnu/store/gknigc86qbb433gp83jg7nd1pzksswir-module-import-compiled" (map (lambda (extension) (string-append extension "/lib/guile/" (effective-version) "/site-ccache")) extensions)) %load-compiled-path))))(begin (use-modules (srfi srfi-1) (srfi srfi-26) (ice-9 popen) (ice-9 rdelim) (ice-9 match) (shepherd service) (oop goops) ((guix build utils) #:hide (delete)) (guix build syscalls)) (make <service> #:docstring (quote "[No documentation.]") #:provides (quote (mcron)) #:requires (quote ()) #:one-shot? (quote #f) #:respawn? (quote #t) #:start (make-forkexec-constructor (list "/gnu/store/mxjkd7644pzs00sq8x47s9k9kcmlr5ib-mcron-1.2.1-0.5fd0ccd/bin/mcron" "--log" "--log-format" "~1@*~a ~a: ~a~%" "/gnu/store/wynnrkgj67rc7s20mv122vlkzvkpm3gh-mcron-job" "/gnu/store/cgbn0dgfwx09hfpqjs5raz8gw99m0lbq-mcron-job") #:environment-variables (cons* "GUILE_AUTO_COMPILE=0" "PATH=/run/current-system/profile/bin" (remove (cut string-prefix? "PATH=" <>) (environ))) #:log-file (string-append %user-log-dir "/mcron.log")) #:stop (make-kill-destructor) #:actions (make-actions (schedule "Display jobs that are going to be scheduled." (lambda* (_ #:optional (n "5")) (setenv "GUILE_AUTO_COMPILE" "0") (let ((pipe (open-pipe* OPEN_READ "/gnu/store/mxjkd7644pzs00sq8x47s9k9kcmlr5ib-mcron-1.2.1-0.5fd0ccd/bin/mcron" (string-append "--schedule=" n) "/gnu/store/wynnrkgj67rc7s20mv122vlkzvkpm3gh-mcron-job" "/gnu/store/cgbn0dgfwx09hfpqjs5raz8gw99m0lbq-mcron-job"))) (let loop () (match (read-line pipe (quote concat)) ((? eof-object?) (catch (quote system-error) (lambda () (zero? (close-pipe pipe))) (lambda args (or (= ECHILD (system-error-errno args)) (apply throw args))))) (line (display line) (loop))))))))))
```
Any idea what might be going wrong?!
Regards,
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Sheperd after `guix home reconfigure`
2023-08-22 10:33 Problem with Sheperd after `guix home reconfigure` Tanguy LE CARROUR
@ 2023-08-22 12:40 ` Hilton Chain
2023-08-22 13:23 ` Andreas Enge
2023-08-22 13:51 ` Problem with Shepherd " Tanguy LE CARROUR
0 siblings, 2 replies; 13+ messages in thread
From: Hilton Chain @ 2023-08-22 12:40 UTC (permalink / raw)
To: Tanguy LE CARROUR; +Cc: help-guix
Hi Tanguy,
On Tue, 22 Aug 2023 18:33:05 +0800,
Tanguy LE CARROUR wrote:
>
> Hi Guix,
>
> This morning I `guix pull` and `guix system reconfigure` my system
> and everything seemed to be OK. But, when I `guix home reconfigure`,
> I got an error message:
>
> ```
> Loading /gnu/store/x103955zkwzkbmb9hji0dxc5fk7l8c3q-shepherd.conf.
> herd: error: exception caught while executing 'load' on service 'root':
> Unbound variable: %user-log-dir
> ```
Thank you for reporting the issue!
This is caused by a missing module in mcron's service definition, and
now it should be fixed in 552d0703776c532f25498d5cb852c3c497cb9252.
Please run `guix pull', then reconfigure the home environment.
Thanks
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Sheperd after `guix home reconfigure`
2023-08-22 12:40 ` Hilton Chain
@ 2023-08-22 13:23 ` Andreas Enge
2023-08-22 14:44 ` Hilton Chain
2023-08-22 13:51 ` Problem with Shepherd " Tanguy LE CARROUR
1 sibling, 1 reply; 13+ messages in thread
From: Andreas Enge @ 2023-08-22 13:23 UTC (permalink / raw)
To: Hilton Chain; +Cc: Tanguy LE CARROUR, help-guix
Hello,
Am Tue, Aug 22, 2023 at 08:40:57PM +0800 schrieb Hilton Chain:
> This is caused by a missing module in mcron's service definition, and
> now it should be fixed in 552d0703776c532f25498d5cb852c3c497cb9252.
> Please run `guix pull', then reconfigure the home environment.
Now someone on IRC reports the converse problem:
<Altadil>Did a recent commit broke guix ? I juste did guix pull but can reconfigure the system anymore. Seems sheperd-mcron fails to build.
<Altadil>*cannot
<andreas-e>Altadil: This sounds like a bug just was just repaired in the most recent commit. Can you try to pull once more?
<Altadil>andreas-e: still no luck. I am on 552d070, acording to guix describe
<andreas-e>Altadil: Sorry to hear this, then I do not know.
<Altadil>andreas-e: that’s fine, thanks for your help
<jpoiret>Altadil: maybe it's that very commit that broke it, you could try pulling from a commit earlier
<Altadil>jpoiret: going back to one commit before worked, thanks !
Could you maybe have another look?
Andreas
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Sheperd after `guix home reconfigure`
2023-08-22 13:23 ` Andreas Enge
@ 2023-08-22 14:44 ` Hilton Chain
0 siblings, 0 replies; 13+ messages in thread
From: Hilton Chain @ 2023-08-22 14:44 UTC (permalink / raw)
To: Andreas Enge; +Cc: Tanguy LE CARROUR, help-guix
Hi Andreas,
On Tue, 22 Aug 2023 21:23:56 +0800,
Andreas Enge wrote:
>
> Hello,
>
> Am Tue, Aug 22, 2023 at 08:40:57PM +0800 schrieb Hilton Chain:
> > This is caused by a missing module in mcron's service definition, and
> > now it should be fixed in 552d0703776c532f25498d5cb852c3c497cb9252.
> > Please run `guix pull', then reconfigure the home environment.
>
> Now someone on IRC reports the converse problem:
>
> <Altadil>Did a recent commit broke guix ? I juste did guix pull but can reconfigure the system anymore. Seems sheperd-mcron fails to build.
> <Altadil>*cannot
> <andreas-e>Altadil: This sounds like a bug just was just repaired in the most recent commit. Can you try to pull once more?
> <Altadil>andreas-e: still no luck. I am on 552d070, acording to guix describe
> <andreas-e>Altadil: Sorry to hear this, then I do not know.
> <Altadil>andreas-e: that’s fine, thanks for your help
> <jpoiret>Altadil: maybe it's that very commit that broke it, you could try pulling from a commit earlier
> <Altadil>jpoiret: going back to one commit before worked, thanks !
>
> Could you maybe have another look?
Thank you for notifying me!! The issue should be addressed in
0c4fb8f43f8aba2dcabe1bc97a8f6d8d41057704 now.
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-22 12:40 ` Hilton Chain
2023-08-22 13:23 ` Andreas Enge
@ 2023-08-22 13:51 ` Tanguy LE CARROUR
2023-08-22 15:18 ` Hilton Chain
1 sibling, 1 reply; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-22 13:51 UTC (permalink / raw)
To: Hilton Chain; +Cc: help-guix
Hi Hilton,
First of, I have to apologize to Shep[H]erd for the typo! Soooorry! 😅
I've just fixed it in the subject.
Quoting Hilton Chain (2023-08-22 14:40:57)
> On Tue, 22 Aug 2023 18:33:05 +0800,
> Tanguy LE CARROUR wrote:
> >
> > Hi Guix,
> >
> > This morning I `guix pull` and `guix system reconfigure` my system
> > and everything seemed to be OK. But, when I `guix home reconfigure`,
> > I got an error message:
> >
> > ```
> > Loading /gnu/store/x103955zkwzkbmb9hji0dxc5fk7l8c3q-shepherd.conf.
> > herd: error: exception caught while executing 'load' on service 'root':
> > Unbound variable: %user-log-dir
> > ```
>
> Thank you for reporting the issue!
>
> This is caused by a missing module in mcron's service definition, and
> now it should be fixed in 552d0703776c532f25498d5cb852c3c497cb9252.
>
> Please run `guix pull', then reconfigure the home environment.
Much better! Thanks! 👍
I still have an error message, though:
```
$ guix home reconfigure
# […]
Loading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
herd: error: exception caught while executing 'load' on service 'root':
In procedure fport_write: Input/output error
```
I've just tried something that, as weird as it sounds, I had never done before:
`herd stop mcron`! And… it just hangs forever!? I guess it not the
expected behaviour?! 🤔
I `ctrl+c`-ed it and, now, `herd status` also hangs forever!? 😞
I'll see if everything goes back to normal after the next reboot…
Cheers,
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-22 13:51 ` Problem with Shepherd " Tanguy LE CARROUR
@ 2023-08-22 15:18 ` Hilton Chain
2023-08-22 16:56 ` Tanguy LE CARROUR
0 siblings, 1 reply; 13+ messages in thread
From: Hilton Chain @ 2023-08-22 15:18 UTC (permalink / raw)
To: Tanguy LE CARROUR; +Cc: help-guix
On Tue, 22 Aug 2023 21:51:07 +0800,
Tanguy LE CARROUR wrote:
>
> Hi Hilton,
>
> First of, I have to apologize to Shep[H]erd for the typo! Soooorry! 😅
> I've just fixed it in the subject.
>
>
No worry :)
> > Thank you for reporting the issue!
> >
> > This is caused by a missing module in mcron's service definition, and
> > now it should be fixed in 552d0703776c532f25498d5cb852c3c497cb9252.
> >
> > Please run `guix pull', then reconfigure the home environment.
>
> Much better! Thanks! 👍
>
> I still have an error message, though:
If you happen to use the system mcron service as well, please pull to
the latest commit again, my bad :(
> ```
> $ guix home reconfigure
> # […]
> Loading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> herd: error: exception caught while executing 'load' on service 'root':
> In procedure fport_write: Input/output error
> ```
>
> I've just tried something that, as weird as it sounds, I had never done before:
> `herd stop mcron`! And… it just hangs forever!? I guess it not the
> expected behaviour?! 🤔
> I `ctrl+c`-ed it and, now, `herd status` also hangs forever!? 😞
> I'll see if everything goes back to normal after the next reboot…
I don't know much about Shepherd but rebooting seems to be the only
solution when it hangs...
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-22 15:18 ` Hilton Chain
@ 2023-08-22 16:56 ` Tanguy LE CARROUR
2023-08-23 3:19 ` Hilton Chain
2023-08-23 8:09 ` nils
0 siblings, 2 replies; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-22 16:56 UTC (permalink / raw)
To: Hilton Chain; +Cc: help-guix
Hi Hilton,
Quoting Hilton Chain (2023-08-22 17:18:15)
> If you happen to use the system mcron service as well, please pull to
> the latest commit again, my bad :(
Done!
Reboot and…
> > ```
> > $ guix home reconfigure
> > # […]
> > Loading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > herd: error: exception caught while executing 'load' on service 'root':
> > In procedure fport_write: Input/output error
> > ```
> >
> > I've just tried something that, as weird as it sounds, I had never done before:
> > `herd stop mcron`! And… it just hangs forever!? I guess it not the
> > expected behaviour?! 🤔
> > I `ctrl+c`-ed it and, now, `herd status` also hangs forever!? 😞
> > I'll see if everything goes back to normal after the next reboot…
>
> I don't know much about Shepherd but rebooting seems to be the only
> solution when it hangs...
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
```
```
# herd status
Started:
+ root
Starting:
^ mcron
^ mpd
Stopped:
- tor
- transmission
```
I usually have:
```
# herd status
Started:
+ mcron
+ mpd
+ root
Stopped:
- tor
- transmission
```
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? 🤔
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-22 16:56 ` Tanguy LE CARROUR
@ 2023-08-23 3:19 ` Hilton Chain
2023-08-23 6:29 ` Tanguy LE CARROUR
2023-08-23 8:09 ` nils
1 sibling, 1 reply; 13+ messages in thread
From: Hilton Chain @ 2023-08-23 3:19 UTC (permalink / raw)
To: Tanguy LE CARROUR; +Cc: help-guix
Hi Tanguy,
On Wed, 23 Aug 2023 00:56:41 +0800,
Tanguy LE CARROUR wrote:
>
[...]
> > > ```
> > > $ guix home reconfigure
> > > # […]
> > > Loading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > > herd: error: exception caught while executing 'load' on service 'root':
> > > In procedure fport_write: Input/output error
> > > ```
> > >
> > > I've just tried something that, as weird as it sounds, I had never done before:
> > > `herd stop mcron`! And… it just hangs forever!? I guess it not the
> > > expected behaviour?! 🤔
> > > I `ctrl+c`-ed it and, now, `herd status` also hangs forever!? 😞
> > > I'll see if everything goes back to normal after the next reboot…
> >
> > I don't know much about Shepherd but rebooting seems to be the only
> > solution when it hangs...
>
> 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
> ```
Seems to be an issue in Shepherd itself, it hung during loading the
configuration.
> ```
> # herd status
> Started:
> + root
> Starting:
> ^ mcron
> ^ mpd
> Stopped:
> - tor
> - transmission
> ```
>
> I usually have:
>
> ```
> # herd status
> Started:
> + mcron
> + mpd
> + root
> Stopped:
> - tor
> - transmission
> ```
>
> 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? 🤔
From my own experience, such issue can be "solved" by rebooting (to
spawn new Shepherd daemons). I don't know how to debug Shepherd and
there's no enough information for me to find the real cause.
So maybe sending a Shepherd bug report to bug-guix@gnu.org ?
Thanks
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-23 3:19 ` Hilton Chain
@ 2023-08-23 6:29 ` Tanguy LE CARROUR
0 siblings, 0 replies; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-23 6:29 UTC (permalink / raw)
To: Hilton Chain; +Cc: help-guix
Hi Hilton,
Quoting Hilton Chain (2023-08-23 05:19:49)
> On Wed, 23 Aug 2023 00:56:41 +0800,
> Tanguy LE CARROUR wrote:
> > […]
> > 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
> > ```
>
> Seems to be an issue in Shepherd itself, it hung during loading the
> configuration.
>
> > […]
> >
> > 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? 🤔
>
>
> From my own experience, such issue can be "solved" by rebooting (to
> spawn new Shepherd daemons). I don't know how to debug Shepherd and
> there's no enough information for me to find the real cause.
>
> So maybe sending a Shepherd bug report to bug-guix@gnu.org ?
I'll do that!
Thanks!
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-22 16:56 ` Tanguy LE CARROUR
2023-08-23 3:19 ` Hilton Chain
@ 2023-08-23 8:09 ` nils
2023-08-25 6:59 ` Tanguy LE CARROUR
1 sibling, 1 reply; 13+ messages in thread
From: nils @ 2023-08-23 8:09 UTC (permalink / raw)
To: Tanguy LE CARROUR; +Cc: help-guix
> Tanguy LE CARROUR <tanguy@bioneland.org> hat am 22.08.2023 18:56 CEST geschrieben:
>
>
> Hi Hilton,
>
>
> Quoting Hilton Chain (2023-08-22 17:18:15)
> > If you happen to use the system mcron service as well, please pull to
> > the latest commit again, my bad :(
>
> Done!
> Reboot and…
>
>
> > > ```
> > > $ guix home reconfigure
> > > # […]
> > > Loading /gnu/store/zbfyaxxigns5lqyxhxzxhm92w54ns1cz-shepherd.conf.
> > > herd: error: exception caught while executing 'load' on service 'root':
> > > In procedure fport_write: Input/output error
> > > ```
> > >
> > > I've just tried something that, as weird as it sounds, I had never done before:
> > > `herd stop mcron`! And… it just hangs forever!? I guess it not the
> > > expected behaviour?! 🤔
> > > I `ctrl+c`-ed it and, now, `herd status` also hangs forever!? 😞
> > > I'll see if everything goes back to normal after the next reboot…
> >
> > I don't know much about Shepherd but rebooting seems to be the only
> > solution when it hangs...
>
> 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
> ```
>
> ```
> # herd status
> Started:
> + root
> Starting:
> ^ mcron
> ^ mpd
> Stopped:
> - tor
> - transmission
> ```
>
> I usually have:
>
> ```
> # herd status
> Started:
> + mcron
> + mpd
> + root
> Stopped:
> - tor
> - transmission
> ```
>
> 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?
>
> --
> Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-23 8:09 ` nils
@ 2023-08-25 6:59 ` Tanguy LE CARROUR
2023-08-25 7:34 ` Hilton Chain
0 siblings, 1 reply; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-25 6:59 UTC (permalink / raw)
To: nils; +Cc: help-guix
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/`?! 🤔
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-25 6:59 ` Tanguy LE CARROUR
@ 2023-08-25 7:34 ` Hilton Chain
2023-08-28 6:27 ` Tanguy LE CARROUR
0 siblings, 1 reply; 13+ messages in thread
From: Hilton Chain @ 2023-08-25 7:34 UTC (permalink / raw)
To: Tanguy LE CARROUR; +Cc: nils, help-guix
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---
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: Problem with Shepherd after `guix home reconfigure`
2023-08-25 7:34 ` Hilton Chain
@ 2023-08-28 6:27 ` Tanguy LE CARROUR
0 siblings, 0 replies; 13+ messages in thread
From: Tanguy LE CARROUR @ 2023-08-28 6:27 UTC (permalink / raw)
To: Hilton Chain; +Cc: nils, help-guix
Hi Hilton,
Quoting Hilton Chain (2023-08-25 09:34:09)
> On Fri, 25 Aug 2023 14:59:03 +0800,
> Tanguy LE CARROUR wrote:
> > 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---
Thanks for taking the time to explain! I'll remove the old ones.
Regards,
--
Tanguy
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2023-08-29 7:52 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-22 10:33 Problem with Sheperd after `guix home reconfigure` Tanguy LE CARROUR
2023-08-22 12:40 ` Hilton Chain
2023-08-22 13:23 ` Andreas Enge
2023-08-22 14:44 ` Hilton Chain
2023-08-22 13:51 ` Problem with Shepherd " Tanguy LE CARROUR
2023-08-22 15:18 ` Hilton Chain
2023-08-22 16:56 ` Tanguy LE CARROUR
2023-08-23 3:19 ` Hilton Chain
2023-08-23 6:29 ` Tanguy LE CARROUR
2023-08-23 8:09 ` nils
2023-08-25 6:59 ` Tanguy LE CARROUR
2023-08-25 7:34 ` Hilton Chain
2023-08-28 6:27 ` Tanguy LE CARROUR
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).