Error when runing "zypper refresh"

I am getting the following message when I run "zypper install :

Loading repository data...
Warning: Repository 'Main Update Repository' metadata expired since 2023-05-27 06:03:47 EDT.

    Warning: Repository metadata expired: Check if 'autorefresh' is turned on (zypper lr), otherwise
    manualy refresh the repository (zypper ref). If this does not solve the issue, it could be that
    you are using a broken mirror or the server has actually discontinued to support the repository.

I’ve cleaned up the repositories and used “zypper ref --force” and I still get the error. According to “zypper lr” the main repository is enabled and is set to autorefresh.

zypper lr
Repository priorities are without effect. All enabled repositories share the same priority.

#  | Alias                       | Name                                        | Enabled | GPG Check | Refresh
---+-----------------------------+---------------------------------------------+---------+-----------+--------
 1 | devel_languages_crystal     | Crystal (15.4)                              | Yes     | (r ) Yes  | No
 2 | devel_languages_lua         | Lua is a powerful light-weight programmin-> | Yes     | (r ) Yes  | No
 3 | openSUSE-Leap-15.4-1        | openSUSE-Leap-15.4-1                        | No      | ----      | ----
 4 | repo-backports-debug-update | Update repository with updates for openSU-> | No      | ----      | ----
 5 | repo-backports-update       | Update repository of openSUSE Backports     | Yes     | (r ) Yes  | Yes
 6 | repo-debug                  | Debug Repository                            | No      | ----      | ----
 7 | repo-debug-non-oss          | Debug Repository (Non-OSS)                  | No      | ----      | ----
 8 | repo-debug-update           | Update Repository (Debug)                   | No      | ----      | ----
 9 | repo-debug-update-non-oss   | Update Repository (Debug, Non-OSS)          | No      | ----      | ----
10 | repo-non-oss                | Non-OSS Repository                          | Yes     | (r ) Yes  | Yes
11 | repo-oss                    | Main Repository                             | Yes     | (r ) Yes  | Yes
12 | repo-sle-debug-update       | Update repository with debuginfo for upda-> | No      | ----      | ----
13 | repo-sle-update             | Update repository with updates from SUSE -> | Yes     | (r ) Yes  | Yes
14 | repo-source                 | Source Repository                           | No      | ----      | ----
15 | repo-update                 | Main Update Repository                      | Yes     | (r ) Yes  | Yes
16 | repo-update-non-oss         | Update Repository (Non-Oss)                 | Yes     | (r ) Yes  | Yes

This is the “repo-update.repo” file from "/etc/zypp/repos.d

repo-update.repo 
[repo-update]
name=Main Update Repository
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/update/leap/$releasever/oss
path=/
type=rpm-md
keeppackages=0

All the other enable repositories are comming from the same mirror. The “expired since” time and date are today and a few seconds before getting the error message.
The only other thing to mention is this is a fresh install of openSUSE on an old Dell R620 Server.

I’m not sure how to fix this. Any ideas?

1 Like

I too am getting this:

Loading repository data…
Warning: Repository ‘openSUSE-Leap-15.4-Update’ metadata expired since 2023-05-27 05:03:47 CDT.

Warning: Repository metadata expired: Check if 'autorefresh' is turned on
(zypper lr), otherwise manualy refresh the repository (zypper ref). If this
does not solve the issue, it could be that you are using a broken mirror or
the server has actually discontinued to support the repository.

Reading installed packages…

2 Likes

Just did a zyper ref without problems.

BTW @wwwdave, your repo list is of very limited value because there are no URLs in it, only Names and Aliases that are local to your system. Whenever you want to show a repo list here do something like

zyper lr -d
1 Like

It’s only a warning. It isn’t an error. Everything should still work.

Most updates are coming from the backports update repo and the sle update repo. That’s why this one is out of date. It needs to be fixed by the maintainers.

I’m currently using Leap 15.5 (not officially released) on my desktop. And I get similar warnings every time. But it all works so I just ignore the warnings. In the 15.5 case, this is because the update repos are not really used until the official release.

1 Like

It is just a warning. I wait to see if it fixes itself.
Thanks everyone.

It is fixed now - was bad before the fix propagated thru the repos.

1 Like

I am not sure what do you mean and what is fixed.

Each repository metadata has timestamp (when it was last changed) and may have expiration period. For update repository expiration period is 30 days and timestamp is 2023-04-27 around midday UTC so expiration date/time is today. zypper warns that repository was not changed before expiration time. It could be due to connectivity problems, it could be because nothing has really been changed. In this case there has been no updates (in this repository) since a month. There is no newer repomd.xml, there is no newer timestamp.

1 Like

No longer getting the error on zypper dup.

The problem is fixed for me.

1 Like

zypper ref does not exercise code path that prints this warning.

I was wrong - still happening on Leap - not on Tumbleweed - Was was on Tumbleweed.

This is the repo in question:

10 | os-repo-update-non-oss | Update Repository (Non-Oss) | Yes | (r ) Yes | Yes | 99 | rpm-md | /update/leap/15.4/non-oss - openSUSE Download

What zypper reports zypper dup ; zypper up :

All repositories have been refreshed.
Loading repository data…
Warning: Repository ‘openSUSE-Leap-15.4-Update’ metadata expired since 2023-05-27 05:03:47 CDT.

Warning: Repository metadata expired: Check if 'autorefresh' is turned on
(zypper lr), otherwise manualy refresh the repository (zypper ref). If this
does not solve the issue, it could be that you are using a broken mirror or
the server has actually discontinued to support the repository.

Reading installed packages…

Nothing to do.

2 Likes

It’s fixed now (I can confirm), Re: 15.4 - main update repostiry expired today - ? - openSUSE Support - openSUSE Mailing Lists

1 Like