You are not logged in.

#76 2015-10-05 08:15:39

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: Reflector reborn

karol wrote:

Which version are you using? 2014.11-2 ?
https://projects.archlinux.org/svntogit … a04c649232

64 bit here too and yes was still at 2014.11.2 and using Xyne's x86_64 repo.
That's still at 2014.11-2 and reports an invalid signature.

However I've just discovered that I had that repo above community in the pacman.conf file. Switching them round, I now get the Community version of Reflector, which has been updated and works.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#77 2015-10-06 19:26:25

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

Sorry, I haven't had time to update my binary repo in a while. I plan to rebuild everything within an hour or two.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#78 2015-10-06 20:28:14

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,845

Re: Reflector reborn

Speaking for myself at least, no problem, but thanks for the updates.


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#79 2015-11-21 18:45:22

Mikaela
Member
Registered: 2015-11-21
Posts: 1

Re: Reflector reborn

I am getting this error,

error: failed to retrieve mirror data: (<urlopen error [Errno -2] Name or service not known>)

. I am not sure when it started, but I noticed it today.


Reflector 2014.11-2, DNS works with everything else (DNSSEC validating Unbound).

nameserver ::1
nameserver 127.0.0.1
#nameserver 2001:4860:4860::8888
#nameserver 8.8.4.4
options edns0
search mikaela.info

EDIT: Fixed formatting.

EDIT2: The command is

/usr/bin/reflector --protocol https --latest 30 --number 20 --sort rate --save /etc/pacman.d/mirrorlist

EDIT3: After testing without Unbound (those Google DNS addresses) it worked and now it also works with Unbound.

Last edited by Mikaela (2015-11-21 19:00:16)

Offline

#80 2016-12-01 10:04:06

Red54
Member
Registered: 2016-12-01
Posts: 1

Re: Reflector reborn

Please remove 'completion_pct' check!

/usr/lib/python3.5/site-packages/Reflector.py:
189: # Filter incomplete mirrors and mirrors that haven't synced.
190: mirrors = list(m for m in mirrors if m['last_sync'] and m['completion_pct'] == 1.0)

According to https://www.archlinux.org/mirrors/status/

The 'completion_pct' is :
The number of mirror checks that have successfully connected and disconnected from the given URL. If this is below 100%, the mirror may be unreliable.

If 'completion_pct' != 1.0, it just shows the mirror is not 100% that the archlinux mirror check server can connect to it, and has nothing business to show whether it is incomplete or has synced, and also has nothing business to show whether the mirror is 100% that the users in the country of the mirror can connected to it because the archlinux mirror check server it not in that country!

Offline

#81 2016-12-03 19:26:37

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

I have added a new filter option: --completion-percent
Any mirrors with a completion percent below the given value will be filtered. The default value is 100.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#82 2019-03-02 12:09:36

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

I've refactored most of the code while maintaining backwards compatibility (for now) following an unexpected reaction to the code in another thread. I'll push the update to [community] after some more testing. It should be available in my repo in a few minutes.

There are three new filter options as well: --isos, --ipv4 and --ipv6


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#83 2019-03-07 18:22:44

Kudlaty
Member
Registered: 2013-04-05
Posts: 6

Re: Reflector reborn

after update:

Traceback (most recent call last):
  File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 915, in <module>
    run_main(configure_logging=True)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 909, in run_main
    main(args, **kwargs)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 881, in main
    mirrors = list(mirrors)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 573, in sort
    yield from sort(mirrors, n_threads=self.threads, **kwargs)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 176, in sort
    rates = rate(mirrors, n_threads=n_threads)
  File "/usr/lib/python3.7/site-packages/Reflector.py", line 308, in rate
    logger.info(fmt.format(url, kibps, dt))
TypeError: unsupported format string passed to NoneType.__format__

Offline

#84 2019-03-07 22:23:46

Kudlaty
Member
Registered: 2013-04-05
Posts: 6

Re: Reflector reborn

i think the problem is in rate_http function in except, where you return dt as None

Offline

#85 2019-03-08 02:09:41

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

Kudlaty wrote:

i think the problem is in rate_http function in except, where you return dt as None

Yep. Thanks for reporting the issue. A fix has been pushed to the repos.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#86 2020-01-22 22:43:32

Neurognostic
Member
Registered: 2019-12-27
Posts: 3

Re: Reflector reborn

When trying to get any mirrorlist with reflector. I keep getting

error: no mirrors found

with all the options I have tried. It worked a few days ago.

The source JSON  is reachable. https://www.archlinux.org/mirrors/status/json/

# reflector --info
error: no mirrors found

Offline

#87 2020-01-22 22:45:58

Neurognostic
Member
Registered: 2019-12-27
Posts: 3

Re: Reflector reborn

Looks like there is an issue with the  completion percent of all the mirrors today, none of them are 100 and reflector defaults to 100.

using:

reflector --completion-percent=98

worked for me.

Related thread: https://bbs.archlinux.org/viewtopic.php?id=252334

Last edited by Neurognostic (2020-01-22 22:56:29)

Offline

#88 2020-01-22 22:47:42

sammiev
Member
Registered: 2018-12-22
Posts: 28

Re: Reflector reborn

Neurognostic wrote:

When trying to get any mirrorlist with reflector. I keep getting

error: no mirrors found

with all the options I have tried. It worked a few days ago.

The source JSON  is reachable. https://www.archlinux.org/mirrors/status/json/

# reflector --info
error: no mirrors found

I read about that today and the work around here.

https://bbs.archlinux.org/viewtopic.php?id=252334

Offline

#89 2020-01-25 00:55:38

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

Not sure what happened with the mirrors but everything seems to be working normally again.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#90 2020-03-17 14:41:44

matteoipri
Member
Registered: 2016-06-08
Posts: 17

Re: Reflector reborn

Hi Xyne,
First of all thank you for Reflector! :-)

I usually run the following command to update the mirrors list on my systems running archlinux:

sudo tee /etc/pacman.d/mirrorlist <<< "$(reflector --verbose --sort rate -l 5 -p https)"

Today I noticed that Reflector prints an extra line that looks like a debug print to me.
It prints:

/home/matteo/.cache/mirrorstatus.json

and I think this comes from line 111:

    print(cache_path)

This extra print breaks my one-liner above I use to avoid running the script as root (because I read somewhere on the wiki that it was discouraged to run the script as root).
The breakage consist in pacman printing the following during updates:

warning: config file /etc/pacman.d/mirrorlist, line 1: directive '/home/matteo/.cache/mirrorstatus.json' in section 'core' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '/home/matteo/.cache/mirrorstatus.json' in section 'extra' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '/home/matteo/.cache/mirrorstatus.json' in section 'community' not recognized.
warning: config file /etc/pacman.d/mirrorlist, line 1: directive '/home/matteo/.cache/mirrorstatus.json' in section 'multilib' not recognized.

Here is a list of possible solutions I see:
- make that print go to stderr instead of stdout;
- remove that print;
- add a "DEBUG" logging level and command line option and put that print call in an if statement.

What do you think of my proposals?
What do you think of the one-liner above?

Thank you for your attention,
Matteo

Offline

#91 2020-03-17 19:08:41

Fixxer
Member
From: Sosnowiec/Poland
Registered: 2011-08-29
Posts: 161
Website

Re: Reflector reborn

What do you think of the one-liner above?

Always try to make things as simple as possible:

sudo bash -c "reflector --verbose --sort rate -l 5 -p https --save /etc/pacman.d/mirrorlist"

If somoeone runs reflector as a service can temporarily avoid dropping one line $HOME/.cache/mirrorstatus.json to journal using Exec= like this:

bash -c 'reflector --ipv4 -p https -l 5 -f 5 --sort rate --save /etc/pacman.d/mirrorlist >/dev/null'

Last edited by Fixxer (2020-03-17 19:43:35)


marcin82

Offline

#92 2020-03-18 13:05:09

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

Sorry, that print statement should not be there. I'll push the fix in a few minutes.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

#93 2020-03-18 18:06:07

YCH
Member
Registered: 2014-01-28
Posts: 36

Re: Reflector reborn

Xyne wrote:

Sorry, that print statement should not be there. I'll push the fix in a few minutes.

Hello, Xyne .

I just wanted to write to say thank for reflector, from long time reflector user.


YCH

Offline

#94 2020-03-19 18:33:24

ugga
Member
Registered: 2020-03-19
Posts: 1

Re: Reflector reborn

I tried using reflector today as usual, but i got some Error.

sudo reflector --verbose --latest 10 --country Germany --protocol https --sort rate --save /etc/pacman.d/mirrorlist

resulting in this output:
/root/.cache/mirrorstatus.json
error: The read operation timed out

I got rid of this Error by doing this:
cp /home/ugga/.cache/mirrorstatus.json /root/.cache/mirrorstatus.json


After that, reflector updated /etc/pacman.d/mirrorlist succesfully

Offline

#95 2020-03-21 11:07:50

Xyne
Moderator/TU
Registered: 2008-08-03
Posts: 6,477
Website

Re: Reflector reborn

ugga wrote:

/root/.cache/mirrorstatus.json
error: The read operation timed out

I suspect that the error was a transient network or server error unrelated to the cache file (the cache filepath in the output was due to an erroneous print statement and has been corrected in the latest release). The command would likely have worked when you ran it again even if you hadn't copied the file. I wasn't able to reproduce the error by deleting the file, but please let me know if you are.

I'll update the code to be more explicit about which error was raised.


My Arch Linux StuffForum EtiquetteCommunity Ethos - Arch is not for everyone

Online

Board footer

Powered by FluxBB