Pay-As-You-Go instance connected to SUSE Manager reports error getting instance data
This document (000021072) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Manager Server 4.2
Situation
Error getting instance data: unable to get ip for repository server (error Command '['getent', 'hosts', '']' returned non-zero exit status 2.)
This server may be a newly-added PAYG instance, or an existing one that has stopped working.
As a result of the this error, you may be unable to sync some software to SUSE Manager. You may see errors in the logs found at /var/log/rhn/reposync/ on the SUSE Manager server indicating this.
In addition to the above error messages, there are error messages found in at least one of the following places on the PAYG instance:
- /var/log/cloudregister
- Output of zypper commands
2023-04-11 16:40:03,332 WARNING:Found unknown entry in credentials file "system_token="
An example of an error in a zypper command might look something like this. Again, other errors seen while running zypper commands may also be relevant.
# zypper --non-interactive --no-gpg-checks patch-check Refreshing service 'Basesystem_Module_x86_64'. Problem retrieving the repository index file for service 'Basesystem_Module_x86_64': Credentials are invalid. For details see "/var/log/cloudregister". Re-register the system with "registercloudguest --force-new"
Resolution
https://www.suse.com/support/kb/doc/?id=000018170
Then, on the PAYG instance, run the following command to force the instance to re-register against the cloud update infrastructure.
# registercloudguest --force-new
If that completes without errors, go and check Admin -> Setup Wizard -> Pay-as-you-go in the SUSE Manager webUI and check the status of the instance. It may take some time to refresh and show a working state.
Cause
There are numerous ways that a damaged registration can happen, and listing them is outside the scope of this article.
Additional Information
As a general rule, if you have the error about a failed getent command, and if there are errors in the other locations mentioned, then you may be facing a problem that can be resolved by following the resolution steps in this article.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021072
- Creation Date: 16-May-2023
- Modified Date:27-Jun-2023
-
- SUSE Manager
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com