SUSE Support

Here When You Need Us

Registration and zypper failed for GCE instances behind Cloud NAT

This document (000019662) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server for SAP Applications
SUSE Linux Enterprise Server

Google Compute Engine

Situation

After launching a new GCE instance or while running zypper refresh from an instance utilizing Cloud NAT, errors will be observed either on screen or in /var/log/cloudregister resembling the following:
2020-07-02 13:16:56,389 ERROR:  Registration failed: Registering system to registration proxy https://smt-gce.susecloud.net

Updating system details on https://smt-gce.susecloud.net ... Activating sle-module-web-scripting 15.1 x86_64 ... -> Adding service to system ... command 'zypper --non-interactive refs Web_and_Scripting_Module_x86_64' failed Error: zypper returned (4) with 'Problem retrieving the repository index file for service 'Web_and_Scripting_Module_x86_64': Login failed. (https://smt-gce.susecloud.net/services/1798/repo/repoindex.xml?credentials=Web_and_Scripting_Module_x86_64): The requested URL returned error: 401 Check if the URI is valid and accessible. Skipping service 'Web_and_Scripting_Module_x86_64' because of the above error. Could not refresh the services because of errors.'
2020-07-02 13:16:56,389 INFO:Registration: /usr/sbin/SUSEConnect --url https://smt-gce.susecloud.net --product sle-module-legacy/15.1/x86_64 --instance-data /var/lib/cloudregister/935ce144-0435-49b9-9475-12a9c59a88e8
2020-07-02 13:16:56,690 ERROR:  Registration failed: Registering system to registration proxy https://smt-gce.susecloud.net

Updating system details on https://smt-gce.susecloud.net ...
Error: Invalid system credentials, probably because the registered system was deleted in SUSE Customer Center. Check https://smt-gce.susecloud.net whether your system appears there. If it does not, please call SUSEConnect --cleanup and re-register this system.

2020-07-02 13:16:56,690 INFO:Registration: /usr/sbin/SUSEConnect --url https://smt-gce.susecloud.net --product sle-module-public-cloud/15.1/x86_64 --instance-data /var/lib/cloudregister/935ce144-0435-49b9-9475-12a9c59a88e8
2020-07-02 13:16:56,986 ERROR:  Registration failed: Registering system to registration proxy https://smt-gce.susecloud.net

Resolution

Increase "Minimum ports per VM instance" from within GCP Cloud NAT to at least 160.  The default is 64, which means it can open 64 connections to the same destination IP and port.

To increase this, follow documentation provided here:
https://cloud.google.com/nat/docs/using-nat
https://cloud.google.com/nat/docs/ports-and-addresses#ports-and-connections

If this was a new instance which failed initial registration, after increasing the recommended setting, run:
registercloudguest --force-new

Cause

zypper is designed to open multiple connections to the RMT/SMT server. With multiple repositories and if metadata is uncached, the number of connections to the same destination IP and port can increase to as high as 130-140.  Not every corner case can be tested so 160 is an estimate which should cover most cases.

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:000019662
  • Creation Date: 02-Jul-2020
  • Modified Date:13-Jul-2020
    • SUSE Linux Enterprise Server
    • SUSE Linux Enterprise Server for SAP Applications

< Back to Support Search

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

SUSE Support Forums

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

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.

Open an Incident

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