SUSE Support

Here When You Need Us

zypper commands return Error code: HTTP response: 0

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

Environment

SUSE Manager Server
SUSE Linux Enterprise Server 15
SUSE Linux Enterprise Server 12

Situation

When running zypper commands, an Error code: HTTP response: 0 with empty Error message is returned like in the following example:

susemanager:~ # zypper ref -s
Refreshing service 'Basesystem_Module_15_SP2_x86_64'.
Problem retrieving the repository index file for service 'Basesystem_Module_15_SP2_x86_64':
Download (curl) error for 'https://scc.suse.com/access/services/1931/repo/repoindex.xml?cookies=0&credentials=Basesystem_Module_15_SP2_x86_64':
Error code: HTTP response: 0
Error message:


Check if the URI is valid and accessible.
Skipping service 'Basesystem_Module_15_SP2_x86_64' because of the above error.
Refreshing service 'Python_2_Module_15_SP2_x86_64'.
Problem retrieving the repository index file for service 'Python_2_Module_15_SP2_x86_64':
Download (curl) error for 'https://scc.suse.com/access/services/1977/repo/repoindex.xml?cookies=0&credentials=Python_2_Module_15_SP2_x86_64':
Error code: HTTP response: 0
Error message:


Looking at /var/log/zypper.log, different HTTP error codes are reported as well:

grep "Error code: HTTP" /var/log/zypper.log | awk '{print $7,$8,$9,$10,$11}'|sort|uniq
Error code: HTTP response: 0
Error code: HTTP response: 407


On SUSE Manager, the repository sync may be interrupted at the same and the respective log files in /var/log/rhn/reposync report errors similar to:

2021/05/25 04:25:04 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'sle-module-basesystem15-sp2-updates-x86_64', '--type', 'yum', '--non-interactive']
2021/05/25 04:25:04 +02:00 Sync of channel started.
2021/05/25 04:25:06 +02:00 RepoMDError: Cannot access repository. Maybe repository GPG keys are not imported
2021/05/26 04:26:29 +02:00 Command: ['/usr/bin/spacewalk-repo-sync', '--channel', 'sle-module-basesystem15-sp2-updates-x86_64', '--type', 'yum', '--non-interactive']
2021/05/26 04:26:29 +02:00 Sync of channel started.
2021/05/26 04:26:30 +02:00 RepoMDError: Cannot access repository. Maybe repository GPG keys are not imported.


When looking at the reposync log files it is noticed the sync process used to work before but reported this error only lately.

Resolution

Please update /root/.curlrc accordingly or use the YaST2 proxy module to change the proxy settings. For SUSE Manager based systems please also update the settings in WebUI -> Admin -> HTTP Proxy.

Cause

This is situation may be encountered if the proxy settings changed (e.g. password for the configured proxy user expired) but the system settings were not updated. 

Additional Information

Executing and extracting a supportconfig on the affected system might help to identify issues like this. In the extracted archive, see the file updates-curl-trace_*.txt for a curl trace of an HTTP connection. Look for any HTTP 40x replies that indicate an error condition. Here are some examples that have been found in such a condition:

 

0000: HTTP/1.1 403 Forbidden
[...]
== Info: The requested URL returned error: 403

or



0000: HTTP/1.1 407 Proxy Authentication Required
[...]
== Info: Authentication problem. Ignoring this.

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:000020275
  • Creation Date: 10-Jun-2021
  • Modified Date:10-Jun-2021
    • SUSE Linux Enterprise Server
    • SUSE Manager Server

< 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.