Content View Publish fails with "400 Bad Request"
Environment
- Satellite Server v.6.2.x
Issue
- Content View Publish fails with RestClient::BadRequest 400 Bad Request
Resolution
-
One of the reason this issue can occur is incorrect
proxyconfiguration. -
Example:
# cat /etc/pulp/server/plugins.conf.d/yum_importer.json
{
"proxy_host": null, "proxy_port": 8080, -----> This should be null in-case of Satellite Server is not configured with Proxy "proxy_username": null, "proxy_password": null }
- Re-run satellite installer with correct for removing in-correct
proxyconfiguration
# satellite-installer --scenario satellite --katello-proxy-port ""
For more KB articles/solutions related to Red Hat Satellite 6.x Content View Issues, please refer to the Red Hat Satellite Consolidated Troubleshooting Article for Red Hat Satellite 6.x Content View Issues
Diagnostic Steps
- From
/var/log/messageslogsPulpCodedValidationException: A validation error occurred.error was observed.
May 29 12:42:07 XXXXXXXX pulp: pulp.server.controllers.repository:ERROR: (22482-08960) validate_importer_config(repo.repo_id, importer_type_id, repo_plugin_config)
May 29 12:42:07 XXXXXXXX pulp: pulp.server.controllers.repository:ERROR: (22482-08960) File "/usr/lib/python2.7/site-packages/pulp/server/controllers/importer.py", line 176, in validate_importer_config
May 29 12:42:07 XXXXXXXX pulp: pulp.server.controllers.repository:ERROR: (22482-08960) raise exceptions.PulpCodedValidationException(validation_errors=message)
May 29 12:42:07 XXXXXXXX pulp: pulp.server.controllers.repository:ERROR: (22482-08960) PulpCodedValidationException: A validation error occurred.
- There are 2 ways to make importer configuration in Pulp.
1) Through the configuration file `/etc/pulp/server/plugins.conf.d/yum_importer.json` which will apply globally to all repositories and Satellite uses this configuration for proxy settings.
2) Configuration for a particular repository which stores in the `mongo database`, such as "remove_missing", "download_policy" etc.
- From the
Inputsection of the failed foreman task in the Satellite Server Web UIActions::Pulp::Repository::Create, observed that Satellite was passing the configurations using(2)method.
9: Actions::Pulp::Repository::Create (error) [ 0.08s / 0.08s ] Skip
Started at: 2017-06-12 07:33:14 UTC
Ended at: 2017-06-12 07:33:14 UTC
Real time: 0.08s
Execution time (excluding suspended state): 0.08s
Input:
---
content_type: yum
pulp_id: Organization_view_bad_request-1_0-Red_Hat_Enterprise_Linux_Workstation-Red_Hat_Enterprise_Linux_7_Workstation_RPMs_x86_64_7Workstation
name: Red Hat Enterprise Linux 7 Workstation RPMs x86_64 7Workstation
docker_upstream_name:
feed:
ssl_ca_cert:
ssl_client_cert:
ssl_client_key:
unprotected: false
checksum_type: sha1
path: organization/content_views/test_view_bad_request/1.0/content/dist/rhel/workstation/7/7Workstation/x86_64/os
download_policy: immediate
- So the troubleshooting actions are as following:
1) Check the "Input" from the foreman task.
2) If the input is fine, then check the configuration file.
SBR
Product(s)
Components
Category
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.