[排错] 解决 openSUSE & SLES 升级系统时报错 “Can’t get available migrations from server: SUSE::Connect::ApiError: Multiple base products found:……”

报错代码

Can't get available migrations from server: SUSE::Connect::ApiError: Multiple base products found: ......

分析

当上一次升级失败或者升级回滚了以后可能会报此类错误

解决方法

方法一:通过 SUSEConnect 命令回滚

1.1 通过 SUSEConnect 命令回滚

# SUSEConnect –rollback

1.2 重新升级

(步骤略)

步骤二:取消注册再重新注册

2.1 取消注册再重新注册

(步骤略)

2.2 重新升级

(步骤略)

参考文献:

https://www.suse.com/support/kb/doc/?id=000019523

[步骤] SUSE Repository Mirroring Tool (RMT) 客户端的注册和取消注册

正文:

步骤一:注册客户端到 SUSE Repository Mirroring Tool (RMT)

1.1 通过使用 SUSEConnect 命令注册

如果是 HTTP 协议:

# SUSEConnect --url http://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>

或者:

# SUSEConnect --url http://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>:80

如果是 HTTPS 协议:

# SUSEConnect --url https://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>

或者:

# SUSEConnect --url http://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>:443

1.2 通过 RMT server 的脚本注册

1.2.1 从 RMT 服务器下载 rmt-client-setup 脚本

如果是 HTTP 协议:

# curl http://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>/tools/rmt-client-setup --output rmt-client-setup

如果是 HTTPS 协议:

# curl https://<SUSE Repository Mirroring Tool (RMT) Server's IP address or FQDN>/tools/rmt-client-setup --output rmt-client-setup
1.2.2 执行 rmt-client-setup 脚本

如果是 HTTP 协议:

# sh rmt-client-setup http://RMT_SERVER/

如果是 HTTPS 协议:

# sh rmt-client-setup https://RMT_SERVER/

步骤二:查看客户端到 SUSE Repository Mirroring Tool (RMT) 的注册状态

# SUSEConnect --status-text

步骤三:取消注册客户端到 SUSE Repository Mirroring Tool (RMT)

3.1 取消注册客户端到 SUSE Repository Mirroring Tool (RMT)

# SUSEConnect –de-register

或者:

# SUSEConnect -d

3.2 清空客户端与 SUSE Repository Mirroring Tool (RMT) 相关的缓存

# SUSEConnect --cleanup

3.3 删除客户端与 SUSE Repository Mirroring Tool (RMT) 相关的文件

# rm -f /etc/SUSEConnect
# rm -rf /etc/zypp/credentials.d/*
# rm -rf /etc/zypp/repos.d/*
# rm -f /etc/zypp/services.d/*

参考文献:

https://documentation.suse.com/sles/15-SP1/single-html/SLES-rmt/index.html#sec-rmt-client-clientsetupscript