SUSE Support

Here When You Need Us

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.3
SUSE Manager Server 4.2

Situation

A Pay-As-You-Go cloud instance connected in the setup wizard of SUSE Manager is reporting the following error in the SUSE Manager webUI.
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
An example error from /var/log/cloudregister can be seen below, but other errors logged in this file may also be symptoms of this problem.
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

If the PAYG instance is registered as a SUSE Manager client, delete it in the SUSE Manager webUI and then clean up the client according to the instructions in this Knowledge Base article.
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

A damaged registration on the PAYG instance causes SUSE Manager to not be able to identify the URL where software should be sourced from.

There are numerous ways that a damaged registration can happen, and listing them is outside the scope of this article.

Additional Information

Because this issue can come about in a variety of ways, it is not possible to list all of the other error messages that might be present.

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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.