You are not logged in.

#1 2015-08-20 17:34:57

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

[Gave up]Reflector service/timer not automagically working.

Neither my server or desktop will run reflector.service via the reflector.timer. Works fine if I manually start reflector.service (can't enable, no 'Install' section). This is the journal:

-- Reboot --
Aug 16 02:00:07 Server systemd[1]: Started Pacman mirrorlist update.
Aug 16 02:00:12 Server reflector[11151]: error: failed to retrieve mirror data: (<urlopen error _ssl.c:584: The handshake operation timed out>)
Aug 16 02:00:12 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 16 02:00:12 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 16 02:00:12 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 17 02:00:17 Server systemd[1]: Started Pacman mirrorlist update.
Aug 17 02:00:22 Server reflector[1740]: error: failed to retrieve mirror data: (<urlopen error _ssl.c:584: The handshake operation timed out>)
Aug 17 02:00:22 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 17 02:00:22 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 17 02:00:22 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 18 02:00:07 Server systemd[1]: Started Pacman mirrorlist update.
Aug 18 02:00:12 Server reflector[8923]: error: failed to retrieve mirror data: (<urlopen error _ssl.c:584: The handshake operation timed out>)
Aug 18 02:00:12 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 18 02:00:12 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 18 02:00:12 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 19 02:00:07 Server systemd[1]: Started Pacman mirrorlist update.
Aug 19 02:00:14 Server reflector[18141]: error: failed to retrieve mirror data: (The read operation timed out)
Aug 19 02:00:14 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 19 02:00:14 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 19 02:00:14 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 20 02:00:07 Server systemd[1]: Started Pacman mirrorlist update.
Aug 20 02:00:12 Server reflector[1475]: error: failed to retrieve mirror data: (<urlopen error _ssl.c:584: The handshake operation timed out>)
Aug 20 02:00:12 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 02:00:12 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 20 02:00:12 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
# systemctl list-timers

NEXT                         LEFT     LAST                         PASSED      UNIT                         ACTIVATES
Fri 2015-08-21 00:00:00 EDT  10h left Thu 2015-08-20 00:00:07 EDT  13h ago     logrotate.timer              logrotate.service
Fri 2015-08-21 00:00:00 EDT  10h left Thu 2015-08-20 00:00:06 EDT  13h ago     man-db.timer                 man-db.service
Fri 2015-08-21 00:00:00 EDT  10h left Thu 2015-08-20 00:00:07 EDT  13h ago     prelink.timer                prelink.service
Fri 2015-08-21 00:00:00 EDT  10h left Thu 2015-08-20 00:00:07 EDT  13h ago     shadow.timer                 shadow.service
Fri 2015-08-21 02:00:00 EDT  12h left Thu 2015-08-20 02:00:06 EDT  11h ago     reflector.timer              reflector.service
Fri 2015-08-21 04:00:00 EDT  14h left Thu 2015-08-20 04:00:06 EDT  9h ago      fstrim.timer                 fstrim.service
Fri 2015-08-21 08:24:37 EDT  18h left Thu 2015-08-20 08:24:36 EDT  5h 3min ago systemd-tmpfiles-clean.timer systemd-tmpfiles-clean.service

7 timers listed.
Pass --all to see loaded but inactive timers, too.

Here is the reflector.timer:

[Unit]
Description=Run reflector daily

[Timer]
OnCalendar=*-*-* 02:00:00
Persistent=true

[Install]
WantedBy=timers.target

and the reflector.service:

[Unit]
Description=Pacman mirrorlist update

[Service]
Type=oneshot
ExecStart=/usr/bin/reflector --country 'United States' -l 200 -n 10 -p http --sort rate --save /etc/pacman.d/mirrorlist

Last edited by Buddlespit (2015-08-22 07:05:36)

Offline

#2 2015-08-21 06:43:19

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [Gave up]Reflector service/timer not automagically working.

Your reflector.timer and reflector.service both work fine for me (and obviously fail with the same error message if there is no internet connection).

Buddlespit wrote:

Works fine if I manually start reflector.service

Have you also checked that your internet connection is working at the time the timer starts the service? How do you connect to internet?

--edit: typo

Last edited by mauritiusdadd (2015-08-21 12:26:15)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#3 2015-08-21 10:50:43

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Gave up]Reflector service/timer not automagically working.

The server is connected via dhcpcd (wired) and the desktop via NetworkManager (wired). I also run three TS3 virtual servers from the server and there is usually someone on it at 2am. The desktop is set to run at 7:30am and I'm (usually) on it, checking emails, forums and news from 7am to 8am.

from server:

Aug 21 01:34:21 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:34:21.687500|INFO    |VirtualServer |  1| query clien
Aug 21 01:34:23 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:34:23.513559|INFO    |VirtualServerBase|  1| query cl
Aug 21 01:35:26 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:35:26.179432|INFO    |VirtualServer |  1| query clien
Aug 21 01:35:27 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:35:27.017952|INFO    |VirtualServerBase|  1| query cl
Aug 21 01:41:47 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:41:47.201213|INFO    |VirtualServer |  1| query clien
Aug 21 01:41:49 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:41:49.008459|INFO    |VirtualServerBase|  1| query cl
Aug 21 01:49:08 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:49:08.703888|INFO    |VirtualServer |  1| query clien
Aug 21 01:49:10 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:49:10.486799|INFO    |VirtualServerBase|  1| query cl
Aug 21 01:49:55 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:49:55.325090|INFO    |VirtualServer |  1| query clien
Aug 21 01:49:56 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:49:56.168733|INFO    |VirtualServerBase|  1| query cl
Aug 21 01:56:30 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:56:30.879697|INFO    |VirtualServer |  1| query clien
Aug 21 01:56:32 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 05:56:32.635904|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:00:07 Server systemd[1]: Started Pacman mirrorlist update.
Aug 21 02:00:12 Server reflector[17317]: error: failed to retrieve mirror data: (<urlopen error _ssl.c:584: The handshake opera
Aug 21 02:00:12 Server systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 21 02:00:12 Server systemd[1]: reflector.service: Unit entered failed state.
Aug 21 02:00:12 Server systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 21 02:04:38 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:04:38.222243|INFO    |VirtualServer |  1| query clien
Aug 21 02:04:39 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:04:39.155147|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:04:56 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:04:56.453480|INFO    |VirtualServer |  1| query clien
Aug 21 02:04:58 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:04:58.228808|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:12:18 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:12:18.196814|INFO    |VirtualServer |  1| query clien
Aug 21 02:12:19 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:12:19.961106|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:19:16 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:19:16.893551|INFO    |VirtualServer |  1| query clien
Aug 21 02:19:17 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:19:17.762192|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:19:39 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:19:39.181739|INFO    |VirtualServer |  1| query clien
Aug 21 02:19:40 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:19:40.950540|INFO    |VirtualServerBase|  1| query cl
Aug 21 02:27:00 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:27:00.328403|INFO    |VirtualServer |  1| query clien
Aug 21 02:27:02 Server ts3server_minimal_runscript.sh[376]: 2015-08-21 06:27:02.102938|INFO    |VirtualServerBase|  1| query cl

from desktop:

Aug 20 07:30:48 Pats_Main systemd[1]: Started Network Manager Script Dispatcher Service.
Aug 20 07:30:48 Pats_Main dbus[363]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 20 07:30:48 Pats_Main dbus[363]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.s
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>  (enp3s0): DHCPv4 state changed bound -> bound
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    domain name 'buddlespit.org'
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    nameserver '192.168.1.1'
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    hostname 'PatsMain'
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    lease time 120
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    server identifier 192.168.1.1
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    gateway 192.168.1.1
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    plen 24 (255.255.255.0)
Aug 20 07:30:48 Pats_Main NetworkManager[376]: <info>    address 192.168.1.100
Aug 20 07:30:48 Pats_Main systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 20 07:30:48 Pats_Main dhclient[2163]: DHCPACK from 192.168.1.1
Aug 20 07:30:48 Pats_Main dhclient[2163]: DHCPREQUEST on enp3s0 to 192.168.1.1 port 67
Aug 20 07:30:08 Pats_Main systemd[1]: reflector.service: Failed with result 'exit-code'.
Aug 20 07:30:08 Pats_Main systemd[1]: reflector.service: Unit entered failed state.
Aug 20 07:30:08 Pats_Main systemd[1]: Failed to start Reflector service for timer.
Aug 20 07:30:08 Pats_Main systemd[1]: reflector.service: Main process exited, code=exited, status=1/FAILURE
Aug 20 07:30:08 Pats_Main reflector[14931]: error: failed to retrieve mirror data: (The read operation timed out)
Aug 20 07:30:03 Pats_Main dhclient[2163]: bound to 192.168.1.100 -- renewal in 45 seconds.
Aug 20 07:30:03 Pats_Main systemd[1]: Started Network Manager Script Dispatcher Service.
Aug 20 07:30:03 Pats_Main dbus[363]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 20 07:30:03 Pats_Main systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 20 07:30:03 Pats_Main dbus[363]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.s
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>  (enp3s0): DHCPv4 state changed bound -> bound
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    domain name 'buddlespit.org'
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    nameserver '192.168.1.1'
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    hostname 'PatsMain'
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    lease time 120
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    server identifier 192.168.1.1
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    gateway 192.168.1.1
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    plen 24 (255.255.255.0)
Aug 20 07:30:03 Pats_Main NetworkManager[376]: <info>    address 192.168.1.100
Aug 20 07:30:03 Pats_Main dhclient[2163]: DHCPACK from 192.168.1.1
Aug 20 07:30:03 Pats_Main dhclient[2163]: DHCPREQUEST on enp3s0 to 192.168.1.1 port 67
Aug 20 07:30:02 Pats_Main systemd[1]: Starting Reflector service for timer...
Aug 20 07:29:26 Pats_Main FAHClient[3062]: 11:29:26:WU02:FS00:0xa4:Completed 290000 out of 500000 steps  (58%)
Aug 20 07:29:10 Pats_Main systemd[1]: Started Network Manager Script Dispatcher Service.
Aug 20 07:29:10 Pats_Main dbus[363]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Aug 20 07:29:10 Pats_Main dhclient[2163]: bound to 192.168.1.100 -- renewal in 53 seconds.
Aug 20 07:29:10 Pats_Main systemd[1]: Starting Network Manager Script Dispatcher Service...
Aug 20 07:29:10 Pats_Main dbus[363]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.s
Aug 20 07:29:10 Pats_Main NetworkManager[376]: <info>  (enp3s0): DHCPv4 state changed bound -> bound

Offline

#4 2015-08-21 12:25:53

mauritiusdadd
Member
From: Benevento, Italy
Registered: 2013-10-27
Posts: 776

Re: [Gave up]Reflector service/timer not automagically working.

I dont know what to say about your server, but from the log you posted from your desktop, it seems that the reflector service is started before the network is fully operational. You could try to add After=network-online.target to the [Unit] section of the service file and see if it works.

Last edited by mauritiusdadd (2015-08-21 12:26:47)


About me - github

-- When you have eliminated the impossible, whatever remains, however improbable, must be the truth -- Spock | Sherlock Holmes

Offline

#5 2015-08-21 13:14:32

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [Gave up]Reflector service/timer not automagically working.

mauritiusdadd wrote:

You could try to add After=network-online.target to the [Unit] section of the service file and see if it works.

This is covered by your link, but you also need Wants=network-online.target and you need your network management software to make the network-online.target do something meaningful.

Offline

#6 2015-08-21 18:55:11

Buddlespit
Member
From: Chesapeake, Va.
Registered: 2014-02-07
Posts: 501

Re: [Gave up]Reflector service/timer not automagically working.

OK, I've added the 'After' and 'Wants' to the service file (under [Unit]), but I should point out that my desktop is always on. And if not, then it's been up and running since 7am.

edit: OK, I give up (again). Going back to cronie. I'll try again in a couple of weeks/months... Prolly after an update or three of systemd. It's most likely a configuration issue on my part, but after looking for it off and on for the past year, I'll be damned if I know what it is.

Last edited by Buddlespit (2015-08-22 07:05:06)

Offline

Board footer

Powered by FluxBB