convert2rhel imposible from centos 8

Latest response

Hello i have a problem with convert2rhel, i try to do it with convert2rhel --username=mail@server.com --password=mypassword and without username and password he ask me later.
The problem is:
Attempt 2 of 3: Registering the system using subscription-manager ...
'ascii' codec can't encode character '\xe1' in position 7: ordinal not in range(128)
System registration failed with return code = 70
Trying again - provide username and password.
Building subscription-manager command ...
... activation key not found, username and password required
Username:

Password:

If i do it with subscription-manager then works. But when i run convert2rhel he delete the subscription and i have to write again with the same problem. Thanks for your help.

Responses

I think it is a python problem. I think it is a bad string conversion or something like this.

ok now i doit by activation key and get this error: --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.6/logging/init.py", line 996, in emit stream.write(msg) UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 122: ordinal not in range(128) Call stack: File "/usr/sbin/subscription-manager", line 11, in load_entry_point('subscription-manager==1.28.13', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main return managercli.ManagerCLI().main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3310, in main ret = CLI.main(self) File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 546, in main return_code = self.do_command() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1610, in _do_command service_level=self.options.service_level, File "/usr/lib64/python3.6/site-packages/rhsmlib/services/register.py", line 85, in register facts_dict = self.facts.get_facts() File "/usr/lib64/python3.6/site-packages/subscription_manager/facts.py", line 78, in get_facts facts = collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/all.py", line 40, in get_all results.update(fact_collector.get_all()) File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/host_collector.py", line 55, in get_all firmware_info_dict = firmware_collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/firmware_info.py", line 103, in get_all firmware_info = self.get_firmware_info() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/firmware_info.py", line 96, in get_firmware_info firmware_info_dict = firmware_info_collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/dmiinfo.py", line 93, in get_all self.log_warnings(dmidecode) File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/dmiinfo.py", line 130, in log_warnings log.warn(("Error reading system DMI information: %s"), dmiwarnings, exc_info=True) Message: 'Error en la lectura de informaci\xf3n de DMI del sistema:%s' Arguments: ('# SMBIOS implementations newer than version 2.7 are not\n# fully supported by this version of dmidecode.\n\n',) --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.6/logging/init.py", line 996, in emit stream.write(msg) UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 122: ordinal not in range(128) Call stack: File "/usr/sbin/subscription-manager", line 11, in load_entry_point('subscription-manager==1.28.13', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main return managercli.ManagerCLI().main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3310, in main ret = CLI.main(self) File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 546, in main return_code = self.do_command() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1649, in _do_command facts.write_cache() File "/usr/lib64/python3.6/site-packages/subscription_manager/cache.py", line 114, in write_cache json.dump(self.to_dict(), f, default=json.encode) File "/usr/lib64/python3.6/site-packages/subscription_manager/facts.py", line 84, in to_dict return self.get_facts() File "/usr/lib64/python3.6/site-packages/subscription_manager/facts.py", line 78, in get_facts facts = collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/all.py", line 40, in get_all results.update(fact_collector.get_all()) File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/host_collector.py", line 55, in get_all firmware_info_dict = firmware_collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/firmware_info.py", line 103, in get_all firmware_info = self.get_firmware_info() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/firmware_info.py", line 96, in get_firmware_info firmware_info_dict = firmware_info_collector.get_all() File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/dmiinfo.py", line 93, in get_all self.log_warnings(dmidecode) File "/usr/lib64/python3.6/site-packages/rhsmlib/facts/dmiinfo.py", line 130, in log_warnings log.warn(("Error reading system DMI information: %s"), dmiwarnings, exc_info=True) Message: 'Error en la lectura de informaci\xf3n de DMI del sistema:%s' Arguments: ('# SMBIOS implementations newer than version 2.7 are not\n# fully supported by this version of dmidecode.\n\n',) --- Logging error --- Traceback (most recent call last): File "/usr/lib64/python3.6/logging/init.py", line 996, in emit stream.write(msg) UnicodeEncodeError: 'ascii' codec can't encode character '\xf3' in position 143: ordinal not in range(128) Call stack: File "/usr/sbin/subscription-manager", line 11, in load_entry_point('subscription-manager==1.28.13', 'console_scripts', 'subscription-manager')() File "/usr/lib64/python3.6/site-packages/subscription_manager/scripts/subscription_manager.py", line 87, in main return managercli.ManagerCLI().main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 3310, in main ret = CLI.main(self) File "/usr/lib64/python3.6/site-packages/subscription_manager/cli.py", line 183, in main return cmd.main() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 546, in main return_code = self._do_command() File "/usr/lib64/python3.6/site-packages/subscription_manager/managercli.py", line 1677, in _do_command self.entcertlib.update() File "/usr/lib64/python3.6/site-packages/subscription_manager/certlib.py", line 32, in update self.report = self.locker.run(self._do_update) File "/usr/lib64/python3.6/site-packages/subscription_manager/certlib.py", line 18, in run return action() File "/usr/lib64/python3.6/site-packages/subscription_manager/entcertlib.py", line 42, in _do_update return action.perform() File "/usr/lib64/python3.6/site-packages/subscription_manager/entcertlib.py", line 131, in perform log.info('certs updated:\n%s', self.report) Message: 'certs updated:\n%s' Arguments: (<subscription_manager.entcertlib.EntCertUpdateReport object at 0x7f5bb1544d68>,) Using the activation key provided through the command line...

[10/29/2021 13:44:58] TASK - [Convert: Get RHEL repository IDs] ********************************* RHEL repository IDs to enable: rhel-8-for-x86_64-baseos-rpms, rhel-8-for-x86_64-appstream-rpms

[10/29/2021 13:44:58] TASK - [Convert: Subscription Manager - Check required repositories] ****** Verifying needed RHEL repositories are available ... Repositories available through RHSM:

WARNING - rhel-8-for-x86_64-baseos-rpms repository is not available - some packages may not be replaced and thus not supported.

Continue with the system conversion? [y/n]:

Always error with python. Need Help.

Ok for someone to looking for the same problem. Imposible to do it with rhsm subscription. I have to mount the dvd red hat enterprise linux 8.

I have to create a dir, this is for mount rhel8 dvd in a dir:

mkdir -p /media/rhel8dvd/

mount -o loop /path/to/rhel-8.3-x86_64-dvd.iso /media/rhel8dvd/

This is for do a repo from the dvd iso. Edit for your need.

cat >/etc/yum.repos.d/rhel8dvd.repo <<EOFE [rhel-8-baseos] name=rhel-8-baseos baseurl=file:///media/rhel8dvd/BaseOS/ enabled=1

[rhel-8-appstream] name=rhel-8-appstream baseurl=file:///media/rhel8dvd/AppStream/ enabled=1 EOFE

I read this from https://access.redhat.com/discussions/5676681 Michal Bocek

and then convert2rhel --disable-submgr --enablerepo rhel-8-baseos --enablerepo rhel-8-appstream --debug

After that something fail, please don't reboot. Use subscription-manager register to register your rhel account. Then when you are subscribe use dnf update. Dnf update from RHSM with the ultimate version of software installed.

Now all is working. Do a backup before this.

Try to run LC_ALL=C convert2rhel, there may be issues with non-English systems. You can try to open a new bug in Bugzilla (https://bugzilla.redhat.com/) so guys from Red Hat will investigate if there is anything wrong with the script.

ok, next time I have the problem I try this. I have to convert more systems. Thx.

Hi Teodoro. Thank you for the report and sorry for the inconvenience. Before we fix the issue, the workaround for now is to prepend the convert2rhel command with LANG=C, e.g.

LANG=C convert2rhel --debug -y --no-rpm-va --org 1234 --activationkey rhel_key