Problem:
Currently, I’m trying to upgrade our DEV OpenNMS Amazon Linux 2 server from version 27 to 29. I’m following the upgrade document Basic Upgrade Steps (opennms.com), but when I run the upgrade command “yum -y upgrade opennms” it is failing with this error: “http://yum.opennms.org/stable/common/repodata/repomd.xml: [Errno 14] HTTPS Error 301 - Moved Permanently
Trying other mirror.
One of the configured repositories failed (RPMs Common to All OpenNMS Architectures (stable)),
and yum doesn’t have enough cached data to continue.” file in /etc/yum.repos.d/opennms-repo-stable-rhel7.repo shows
[opennms-repo-stable-common]
name=RPMs Common to All OpenNMS Architectures (stable)
baseurl=http://yum.opennms.org/stable/common
enabled=1
gpgcheck=1
gpgkey=file:///etc/yum.repos.d/opennms-repo-stable-rhel7.gpg
[opennms-repo-stable-rhel7]
name=RedHat Enterprise Linux 7.x and CentOS 7.x (stable)
baseurl=http://yum.opennms.org/stable/rhel7
enabled=1
gpgcheck=1
gpgkey=file:///etc/yum.repos.d/opennms-repo-stable-rhel7.gpg
If I run the following command, it returns the information in the .xml file:
curl -k https://yum.opennms.org/stable/common/repodata/repomd.xml
I can’t seem to figure why the upgrade is not working.
Expected outcome:
Trying to upgrade from version 27 to the latest version 29 OpenNMS Horizon.
OpenNMS version:
current version is 27.02
Other relevant data:
Full error while trying to upgrade:
[root@]# yum -y upgrade opennms
Loaded plugins: extras_suggestions, langpacks, update-motd
amzn2-core | 3.7 kB 00:00:00
amzn2extra-docker | 3.0 kB 00:00:00
amzn2extra-epel | 3.0 kB 00:00:00
amzn2extra-java-openjdk11 | 3.0 kB 00:00:00
amzn2extra-postgresql11 | 3.0 kB 00:00:00
epel/x86_64/metalink | 18 kB 00:00:00
http://yum.opennms.org/stable/common/repodata/repomd.xml: [Errno 14] HTTPS Error 301 - Moved Permanently
Trying other mirror.
One of the configured repositories failed (RPMs Common to All OpenNMS Architectures (stable)),
and yum doesn’t have enough cached data to continue. At this point the only
safe thing yum can do is fail. There are a few ways to work “fix” this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=opennms-repo-stable-common ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable opennms-repo-stable-common
or
subscription-manager repos --disable=opennms-repo-stable-common
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=opennms-repo-stable-common.skip_if_unavailable=true
failure: repodata/repomd.xml from opennms-repo-stable-common: [Errno 256] No more mirrors to try.
http://yum.opennms.org/stable/common/repodata/repomd.xml: [Errno 14] HTTPS Error 301 - Moved Permanently
logs