You are not logged in.

#1 2022-09-05 13:31:09

x-yuri
Member
Registered: 2013-01-06
Posts: 160

[SOLVED] Can reflector be made to work on boot?

I had reflector.service enabled and my journal is littered with reflector failing to do its work:

-- Boot 0e590e911a4a4bca84543d79d2954669 --
Sep 04 16:43:44 yuri2 systemd[1]: Starting Refresh Pacman mirrorlist with Reflector....
Sep 04 16:43:45 yuri2 reflector[413]: error: failed to retrieve mirrorstatus data: URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Sep 04 16:43:45 yuri2 systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Sep 04 16:43:45 yuri2 systemd[1]: reflector.service: Failed with result 'exit-code'.
Sep 04 16:43:45 yuri2 systemd[1]: Failed to start Refresh Pacman mirrorlist with Reflector..
-- Boot 0278f1628faf4c5c8e1cd7078541fcdb --
...

When started manually it works though. I'm using netctl.

Today I noticed this message, which suggests that people generally don't enable the service. And as such reflector might not be suited for being used that way (noone uses it this way, and therefore noone complains).

The idea to enable the service supposedly comes from the wiki.

I think that either there should be found a way to make it work on boot, or the wiki page should be fixed? Is there a way to make it work?

Last edited by x-yuri (2022-10-10 03:09:53)

Offline

#2 2022-09-05 13:36:33

Slithery
Administrator
From: Norfolk, UK
Registered: 2013-12-01
Posts: 5,776

Re: [SOLVED] Can reflector be made to work on boot?

Have you enabled netctl-wait-online.service as explained in the wiki?


No, it didn't "fix" anything. It just shifted the brokeness one space to the right. - jasonwryan
Closing -- for deletion; Banning -- for muppetry. - jasonwryan

aur - dotfiles

Offline

#3 2022-09-07 06:21:06

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] Can reflector be made to work on boot?

Good point about netctl-wait-online.service. I didn't have it enabled (apparently didn't notice the note).

But that's not all. From what I can see it can work in 2 ways with wifi:

* Automatic profile selection (netctl-auto). For that you need to enable the netctl-auto@INTERFACE.service. That's what I had. But netctl-wait-online.service doesn't seem to handle this case:

$ journalctl -b -u netctl-auto@wlo1 -u netctl-wait-online -u reflector -u 'netctl@wlo1\x2dyuri.service'
Sep 07 08:52:46 yuri2 systemd[1]: Starting Wait for the enabled netctl profiles to come online...
Sep 07 08:52:46 yuri2 systemd[1]: Finished Wait for the enabled netctl profiles to come online.
Sep 07 08:52:46 yuri2 systemd[1]: Starting Refresh Pacman mirrorlist with Reflector....
Sep 07 08:52:46 yuri2 reflector[422]: error: failed to retrieve mirrorstatus data: URLError: <urlopen error [Errno -3] Temporary failure in name resolution>
Sep 07 08:52:46 yuri2 systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Sep 07 08:52:46 yuri2 systemd[1]: reflector.service: Failed with result 'exit-code'.
Sep 07 08:52:46 yuri2 systemd[1]: Failed to start Refresh Pacman mirrorlist with Reflector..
Sep 07 08:52:48 yuri2 systemd[1]: Starting Automatic wireless network connection using netctl profiles...
Sep 07 08:52:48 yuri2 netctl-auto[619]: Included profile 'wlo1-yuri'
Sep 07 08:52:49 yuri2 systemd[1]: Started Automatic wireless network connection using netctl profiles.
Sep 07 08:52:53 yuri2 dhcpcd[1122]: dhcpcd-9.4.1 starting
Sep 07 08:52:53 yuri2 dhcpcd[1125]: DUID xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Sep 07 08:52:53 yuri2 dhcpcd[1125]: wlo1: connected to Access Point: yuri
Sep 07 08:52:53 yuri2 dhcpcd[1125]: wlo1: IAID xx:xx:xx:xx
Sep 07 08:52:54 yuri2 dhcpcd[1125]: wlo1: rebinding lease of xx.yy.xx.yy
Sep 07 08:52:54 yuri2 dhcpcd[1125]: wlo1: probing address xx.yy.xx.yy/24
Sep 07 08:53:00 yuri2 dhcpcd[1125]: wlo1: leased xx.yy.xx.yy for 600 seconds
Sep 07 08:53:00 yuri2 dhcpcd[1125]: wlo1: adding route to xx.yy.xx.yy/24
Sep 07 08:53:00 yuri2 dhcpcd[1125]: wlo1: adding default route via xx.yy.xx.yy

* Manual profile selection. In this case you enable one of the profiles with "netctl enable PROFILE". And this way it works:

$ journalctl -b -u netctl-auto@wlo1 -u netctl-wait-online -u reflector -u 'netctl@wlo1\x2dyuri.service'
Sep 07 08:55:19 yuri2 systemd[1]: Starting Automatically generated profile by wifi-menu...
Sep 07 08:55:19 yuri2 network[517]: Starting network profile 'wlo1-yuri'...
Sep 07 08:55:20 yuri2 systemd[1]: Started Automatically generated profile by wifi-menu.
Sep 07 08:55:20 yuri2 systemd[1]: Starting Wait for the enabled netctl profiles to come online...
Sep 07 08:55:24 yuri2 dhcpcd[931]: dhcpcd-9.4.1 starting
Sep 07 08:55:24 yuri2 dhcpcd[934]: DUID xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx:xx
Sep 07 08:55:24 yuri2 dhcpcd[934]: wlo1: connected to Access Point: yuri
Sep 07 08:55:24 yuri2 dhcpcd[934]: wlo1: IAID xx:xx:xx:xx
Sep 07 08:55:24 yuri2 dhcpcd[934]: wlo1: rebinding lease of xx.yy.xx.yy
Sep 07 08:55:24 yuri2 dhcpcd[934]: wlo1: probing address xx.yy.xx.yy/24
Sep 07 08:55:29 yuri2 dhcpcd[934]: wlo1: leased xx.yy.xx.yy for 600 seconds
Sep 07 08:55:29 yuri2 dhcpcd[934]: wlo1: adding route to xx.yy.xx.yy/24
Sep 07 08:55:29 yuri2 dhcpcd[934]: wlo1: adding default route via xx.yy.xx.yy
Sep 07 08:55:29 yuri2 network[517]: Started network profile 'wlo1-yuri'
Sep 07 08:55:30 yuri2 systemd[1]: Finished Wait for the enabled netctl profiles to come online.
Sep 07 08:55:30 yuri2 systemd[1]: Starting Refresh Pacman mirrorlist with Reflector....
Sep 07 08:55:38 yuri2 reflector[1997]: [2022-09-07 08:55:38] WARNING: failed to rate http(s) download (https://archlinux.thaller.ws/community/os/x86_64/community.db): Download timed out after 5 second(s).
Sep 07 08:55:44 yuri2 reflector[1997]: [2022-09-07 08:55:44] WARNING: failed to rate http(s) download (https://archlinux-br.com.br/archlinux/community/os/x86_64/community.db): Download timed out after 5 second(s).
Sep 07 08:55:50 yuri2 reflector[1997]: [2022-09-07 08:55:50] WARNING: failed to rate http(s) download (https://archmirror.it/repos/community/os/x86_64/community.db): HTTP Error 403: Forbidden
Sep 07 08:55:50 yuri2 systemd[1]: reflector.service: Deactivated successfully.
Sep 07 08:55:50 yuri2 systemd[1]: Finished Refresh Pacman mirrorlist with Reflector..

In other words to start reflector (or anything that needs network at boot) at boot automatic profile selection doesn't seem to be an option.

UPD This looks like a bug, so I created a bug report.

Last edited by x-yuri (2022-09-07 07:16:13)

Offline

#4 2022-09-09 16:56:59

tucuxi
Member
From: Switzerland
Registered: 2020-03-08
Posts: 291

Re: [SOLVED] Can reflector be made to work on boot?

Keep it simple - just enable reflector.timer to invoke reflector.service once a week.

Offline

#5 2022-10-10 03:09:34

x-yuri
Member
Registered: 2013-01-06
Posts: 160

Re: [SOLVED] Can reflector be made to work on boot?

Yep. That's what I did.

Offline

Board footer

Powered by FluxBB