Repository connection woes

Hi all, I’m looking for insight into a problem I’ve been having with updating, and refreshing and downloading from repos, since I installed Leap.

When I open the software management on Yast or use zypper, it gives me this:

Download (curl) error for ‘http://download.opensuse.org/distribution/leap/42.1/repo/non-oss/content’:
Error code: Connection failed
Error message: Failed to connect to download.opensuse.org port 80: Network is unreachable

(That is one example. It has happened with every repo)

I searched and discovered that ipv6 may be the issue, so I tried disabling it in various ways, eg NetworkManager, or as suggested here networking - Unable to connect repositories in openSUSE leap? - Unix & Linux Stack Exchange. These didn’t seem to help, and I was beginning to think it was serious and I’d have to go back to 13.1 or something else. Then in my frustration I discovered that the repos would work, but only if I spammed the ‘retry’ button for bit. Now I’m really confused! Is it possible the program ‘gives up’ too easily? The error usually returns instantly after I hit ‘retry’, until I’ve hit it about 10-20 times, and then it will load fine.

Some other info:
-I have tried a reinstall, with no effect.
-I ran 13.1 on the same machine, and router, with no problem like this (but I did upgrade my hard drive)
-It happens in Yast exactly as it does in zypper. The updater also fails to connect. It happens when refreshing and when downloading packages.
-I haven’t noticed any repo fail more than others. It seems random, and on rare occasions the list will refresh with no errors at all.
-Looking at the router config, I reckon that ipv6 isn’t working on it (‘Status: connecting’). I live in Vietnam, so maybe not the router’s problem? This is a country that until recently had regular major internet brownouts (knock on wood those sharks don’t come back).
-Connection speed is good, once it’s connected
-My browsers can all access the repos

Any ideas would be appreciated. My button finger is getting pretty sore!

I don’t know if this will help.

I used to occasionally get those message. But that was before I had IPv6. I have not had that problem with IPv6.

But I have a different problem.

The repo redirects to a mirror. And, with IPv6, it was redirecting to poor mirrors (a long way away, slow connections).

So I added a line to “/etc/hosts”:

195.135.221.134 download.opensuse.org

The effect is that I always connect to “download.opensuse.org” with IPv4, but I still use IPv6 for most mirrors. I get better mirrors this way. The repo site uses my IP address to decide on which mirror to use, and that seems to be broken with IPv6.

This might not help. But it is worth a try.

Another alternative is for you to find a mirror that works well for you, and code that into the repo definition.