curl error updating server

Today I experienced this result while doing zypper lu on my headless server.

Skipping repository 'Main Repository' because of the above error.
Problem retrieving files from 'Update repository with updates from SUSE Linux Enterprise 15'.
Download (curl) error for 'http://download.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml':                             
Error code: Connection failed                                                                                                  
Error message: Could not resolve host: download.opensuse.org                                                                   

Please see the above error message for a hint.

This message is repeated for all of the enabled repositories.

Running this command and zypper up on all my desktops responded as expected.
The server has internet access as I can ping several DNS.
The $releasever is proper and is being used by checking

**DEL-OSS:~ #** zypper --releasever @--HERE--@ lr -u 
Warning: Enforced setting: $releasever=@--HERE--@ 
Repository priorities are without effect. All enabled repositories share the same priority. 

#  | Alias                         | Name                                                                       | Enabled | GPG
 Check | Refresh | URI 
---+-------------------------------+----------------------------------------------------------------------------+---------+----
-------+---------+------------------------------------------------------------------------------- 
 1 | openSUSE-Leap-${releasever]-2 | openSUSE-Leap-${releasever]-2                                              | No      | ---
-      | ----    | hd:/?device=/dev/disk/by-id/usb-Samsung_Flash_Drive_0374017110002465-0:0-part2
 2 | repo-backports-debug-update   | Update repository of openSUSE Backports (Debug)                            | No      | ---
-      | ----    | http://download.opensuse.org/update/leap/@--HERE--@/backports_debug/
 3 | repo-backports-update         | Update repository of openSUSE Backports                                    | Yes     | (r 
) Yes  | Yes     | http://download.opensuse.org/update/leap/@--HERE--@/backports/ 
 4 | repo-debug                    | Debug Repository                                                           | No      | ---
-      | ----    | http://download.opensuse.org/debug/distribution/leap/@--HERE--@/repo/oss/
 5 | repo-debug-non-oss            | Debug Repository (Non-OSS)                               

Again, this message is repeated for all repositories.
I checked that the actual urls are the same as on the desktops that are working.
I rebooted the server.

The server responds properly as far as allowing access from any of my desktops. I can copy and save files to it, can (obviously) ssh into it.

Don’t know where else to look.

Bart

Hi
Switch to https and look at using mirrorcache-us.opensuse.org instead of download.opensuse.org see https://en.opensuse.org/MirrorCache

That’s a great advancement.
However, it didn’t fix my problem. grrr.

Bart

Hi
Very strange, I would suggest rebooting your internet router and see if that helps, maybe something stale lurking.

FWIW, I just updated my Leap 15.4 ADS-B system, was all good using mirrorcache-us.

I thought of that. but, all my other machines are working correctly. Let me try a different port on the switch.

Nope. No difference

What files, besides curl, are used when I call zypper lu? I could do a diff or cmp on the files from my machine to the server to see if I got some bit rot.

Bart

Hi
Can you browse to the repository?

Do you have a number of entries here:

https://download.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml.mirrorlist

Do you get the file downloaded via;


curl -kv "https://download.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml"

and

curl -kv "https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml"

What repo do you hit?

I see http://linux.duke.edu for the first one.

Could be dns or have you a manual entry in /etc/hosts?

I have;


 zypper lr -dE
#  | Alias                              | Name                                                         | Enabled | GPG Check | Refresh | Priority | Type   | URI                                                                           | Service
---+------------------------------------+--------------------------------------------------------------+---------+-----------+---------+----------+--------+-------------------------------------------------------------------------------+--------
 1 | download.opensuse.org-hardware-sdr | Hardware SDR                                                 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://mirrorcache-us.opensuse.org/download/repositories/hardware:/sdr/15.4/ | 
 4 | repo-backports-update              | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/backports/               | 
10 | repo-oss                           | Main Repository                                              | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://mirrorcache-us.opensuse.org/distribution/leap/15.4/repo/oss/          | 
12 | repo-sle-update                    | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/                     | 
14 | repo-update                        | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     |   99     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/oss              

Not sure about “browse”

Do you have a number of entries here:

https://download.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml.mirrorlist

Do you get the file downloaded via;

curl -kv “https://download.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml

and

curl -kv “https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml

I get the following error from both suggestions, with differing urls of course.

**DEL-OSS:~ #** curl -kv "https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/repodata/repomd.xml" 
* Could not resolve host: mirrorcache-us.opensuse.org 
* Closing connection 0 
curl: (6) Could not resolve host: mirrorcache-us.opensuse.org

I do get the file when issuing that command on my desktop. Using that file and copying the ip of the server I connected to, I can ping it from my server.

What repo do you hit?

I see http://linux.duke.edu for the first one.

Could be dns or have you a manual entry in /etc/hosts?

I have;

zypper lr -dE

| Alias | Name | Enabled | GPG Check | Refresh | Priority | Type | URI | Service

—±-----------------------------------±-------------------------------------------------------------±--------±----------±--------±---------±-------±------------------------------------------------------------------------------±-------
1 | download.opensuse.org-hardware-sdr | Hardware SDR | Yes | (r ) Yes | Yes | 99 | rpm-md | https://mirrorcache-us.opensuse.org/download/repositories/hardware:/sdr/15.4/ |
4 | repo-backports-update | Update repository of openSUSE Backports | Yes | (r ) Yes | Yes | 99 | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/backports/ |
10 | repo-oss | Main Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | https://mirrorcache-us.opensuse.org/distribution/leap/15.4/repo/oss/ |
12 | repo-sle-update | Update repository with updates from SUSE Linux Enterprise 15 | Yes | (r ) Yes | Yes | 99 | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/ |
14 | repo-update | Main Update Repository | Yes | (r ) Yes | Yes | 99 | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/oss

I get:

**DEL-OSS:~ #** zypper lr -dE 
#  | Alias                 | Name                                                         | Enabled | GPG Check | Refresh | Pri
ority | Type   | URI                                                                      | Service 
---+-----------------------+--------------------------------------------------------------+---------+-----------+---------+----
------+--------+--------------------------------------------------------------------------+-------- 
 3 | repo-backports-update | Update repository of openSUSE Backports                      | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/backports/          |  
 8 | repo-non-oss          | Non-OSS Repository                                           | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/distribution/leap/15.4/repo/non-oss/ |  
 9 | repo-oss              | Main Repository                                              | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/distribution/leap/15.4/repo/oss/     |  
11 | repo-sle-update       | Update repository with updates from SUSE Linux Enterprise 15 | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/sle/                |  
13 | repo-update           | Main Update Repository                                       | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/oss                 |  
14 | repo-update-non-oss   | Update Repository (Non-Oss)                                  | Yes     | (r ) Yes  | Yes     |   9
9     | rpm-md | https://mirrorcache-us.opensuse.org/update/leap/15.4/non-oss/            | 


There is no relevant entry in /etc/hosts. Here is the file:

# 
# hosts         This file describes a number of hostname-to-address 
#               mappings for the TCP/IP subsystem.  It is mostly 
#               used at boot time, when no name servers are running. 
#               On small systems, this file can be used instead of a 
#               "named" name server. 
# Syntax: 
#     
# IP-Address  Full-Qualified-Hostname  Short-Hostname 
# 

127.0.0.1       localhost 

# 
# This section added by Bart on 22,4,2022 
# 
# Network 


# Servers 
192.168.10.3    SYN-1520 
192.168.10.50   BUF-SRV 

# Computers 
192.168.10.5    ASU-X99 
192.168.10.8    ASU-AIO 
192.168.10.10   TOS-OS 
192.168.10.11   MSI-6400 

# Printers 
192.168.10.21    HP-8210 
192.168.10.23    BRO-PRN 
192.168.10.25    HP-577 
192.168.10.27    HP-7720 

# 
# End of section added by Bart on 22,4,2022 
# 

# special IPv6 addresses 
::1             localhost ipv6-localhost ipv6-loopback 

fe00::0         ipv6-localnet 

ff00::0         ipv6-mcastprefix 
ff02::1         ipv6-allnodes 
ff02::2         ipv6-allrouters 
ff02::3         ipv6-allhosts

Do you expect this file to list every host on Internet?

What you are using - wicked or NetworkManager? Show output of

ip a
ip r
ping 8.8.8.8
ping dns.google
cat /etc/resolv.conf
ls -l /etc/resolv.conf
grep hosts /etc/nsswitch.conf

Of course not! I want it to list those devices on my home network so I can address them by name rather than ip address.

What you are using - wicked or NetworkManager?

wicked

Show output of

ip a
ip r
ping 8.8.8.8
ping dns.google
cat /etc/resolv.conf
ls -l /etc/resolv.conf
grep hosts /etc/nsswitch.conf
**DEL-OSS:/ #** ip a 
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo 
       valid_lft forever preferred_lft forever 
    inet6 ::1/128 scope host  
       valid_lft forever preferred_lft forever 
2: p8p1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 
    link/ether c0:25:a5:96:c6:f3 brd ff:ff:ff:ff:ff:ff
    altname enp2s0 
    inet 10.118.10.4/24 brd 10.118.10.255 scope global p8p1 
       valid_lft forever preferred_lft forever

[FONT=monospace]**DEL-OSS:/ #** ip r 
default via 10.118.10.1 dev p8p1 proto dhcp  
10.118.10.0/24 dev p8p1 proto kernel scope link src 10.118.10.4 
[/FONT]
**DEL-OSS:/ #** ping 8.8.8.8 
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 
64 bytes from 8.8.8.8: icmp_seq=1 ttl=111 time=27.4 ms 
64 bytes from 8.8.8.8: icmp_seq=2 ttl=111 time=28.0 ms 
^C 
--- 8.8.8.8 ping statistics --- 
2 packets transmitted, 2 received, 0% packet loss, time 1002ms 
rtt min/avg/max/mdev = 27.432/27.726/28.020/0.294 ms

**DEL-OSS:/ #** ping dns.google 
ping: dns.google: Temporary failure in name resolution

**DEL-OSS:/ #** cat /etc/resolv.conf  
### /etc/resolv.conf is a symlink to /var/run/netconfig/resolv.conf 
### autogenerated by netconfig! 
# 
# Before you change this file manually, consider to define the 
# static DNS configuration using the following variables in the 
# /etc/sysconfig/network/config file: 
#     NETCONFIG_DNS_STATIC_SEARCHLIST 
#     NETCONFIG_DNS_STATIC_SERVERS 
#     NETCONFIG_DNS_FORWARDER 
# or disable DNS configuration updates via netconfig by setting: 
#     NETCONFIG_DNS_POLICY='' 
# 
# See also the netconfig(8) manual page and other documentation. 
# 
### Call "netconfig update -f" to force adjusting of /etc/resolv.conf. 
search home.arpa 
nameserver 127.0.0.1 
nameserver 192.168.0.1 
nameserver 192.168.1.1

**DEL-OSS:/ #** ls -l /etc/resolv.conf 
lrwxrwxrwx 1 root root 26 Feb 27 19:29 /etc/resolv.conf -> /run/netconfig/resolv.conf

**DEL-OSS:/ #** grep hosts /etc/nsswitch.conf 
# Valid databases are: aliases, ethers, group, gshadow, **hosts**, 
**hosts**:          files dns

Are those servers correct? Do you have name server on your local system (127.0.0.1)? Do you have name servers on addresses 192.168.0.1 and 192.168.1.1? We cannot answer it for you, we do not know your network environment.

Do you use DHCP or do you have static configuration? Show

cat /etc/sysconfig/network/ifcfg-p8p1
grep DNS /etc/sysconfig/network/config

After looking at the results of

cat /etc/resolv.conf

I saw those entries for a network that doesn’t exist on my system.
So, after checking what was in the file on my other machines, I did

vim /etc/sysconfig/network/config
 

and removed the offending entries on the file on my server, rebooted, and all is now well!

arvidjaar, I can’t thank you enough!

My server is now happily updating itself! And to think, I was almost ready to do a microsoft repair!

Bart

All my machines experienced similar recurring problems related to networking when updating the system, resuming from suspend to RAM or booting into different distributions during the period 2014 -2019. I gave systemd-networkd a try: https://en.opensuse.org/Network_Management_With_Systemd

Now all of the systems run systemd-networkd. It’s rock solid and virtually maintenance free. No more problems encountered since 2019.

Hi
Lets just concentrate on fixing a users network issue, not try to convert, thank you.