Red Hat Satellite engineering is moving the tracking of its product development work on Satellite to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1875426 - Azure VM provision fails with error `requests.exceptions.HTTPError: 502 Server Error: Proxy Error for url`
Summary: Azure VM provision fails with error `requests.exceptions.HTTPError: 502 Serve...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Compute Resources
Version: 6.8.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: 6.8.0
Assignee: Eric Helms
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-03 14:07 UTC by vijsingh
Modified: 2020-10-27 13:09 UTC (History)
7 users (show)

Fixed In Version: foreman-installer-2.1.2.5-1
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-10-27 13:08:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 30802 0 Normal Closed Azure VM provision fails with error `requests.exceptions.HTTPError: 502 Server Error: Proxy Error for url` 2020-10-28 17:48:35 UTC
Red Hat Product Errata RHSA-2020:4366 0 None None None 2020-10-27 13:09:18 UTC

Description vijsingh 2020-09-03 14:07:07 UTC
Description of problem:

Azure VM provision fails with error `requests.exceptions.HTTPError: 502 Server Error: Proxy Error for url`


Version-Release number of selected component (if applicable):

6.8.0 Snap 11

How reproducible:

Always

Steps to Reproduce:
1. Try to provision a VM using Azure CR using CLI/API/UI
2.
3.

Actual results:

requests.exceptions.HTTPError: 502 Server Error: Proxy Error for url`

Expected results:

 VM should provision 

Additional info:

 a. After setting the 'ProxyTimeout 600' all scenarios works well 

 b. More could refer from here : https://bugzilla.redhat.com/show_bug.cgi?id=1850934

Comment 1 Brad Buckingham 2020-09-03 14:56:59 UTC
Is this a regression from 6.7?

Comment 2 vijsingh 2020-09-03 15:02:45 UTC
yes it more looks regression.

Comment 4 Anurag Patel 2020-09-04 15:36:30 UTC
I believe this could be happening from 6.8 due to Apache which now runs as a proxy, and times out for long-running calls such as those to Cloud provisioning APIs. Increasing proxy timeout globally may not be a good choice.

Vijay, did you try switching to passenger via `--foreman-passenger true` as mentioned in the referenced BZ?

Comment 8 vijsingh 2020-09-05 15:37:09 UTC
as https://community.theforeman.org/t/issues-since-upgrade-to-2-1-1/20238/38 same issue impacting to GCE as well

Comment 12 Lukáš Hellebrandt 2020-09-08 13:30:09 UTC
I tried to reproduce this on Sat 6.8 snap 14.

I could NOT reproduce this with CRs of types: RHEV, VMWare.

I could reproduce this with a CR of type EC2.

I thinks this depends on how long the call lasts and thus is more dependent on the speed of the resource than on its type => this is a general bug for Compute Resources.

Comment 13 Lukáš Hellebrandt 2020-09-08 13:32:32 UTC
The error in log was:

==> /var/log/httpd/foreman-ssl_error_ssl.log <==
[Tue Sep 08 15:27:53.773208 2020] [proxy_http:error] [pid 3120] (70007)The timeout specified has expired: [client <IP>:45230] AH01102: error reading status line from remote server 127.0.0.1:3000, referer: https://<FQDN>/hosts/new
[Tue Sep 08 15:27:53.773256 2020] [proxy:error] [pid 3120] [client <IP>:45230] AH00898: Error reading from remote server returned by /hosts, referer: https://<FQDN>/hosts/new

The error in WebUI was:

Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /hosts.
Reason: Error reading from remote server

Comment 14 Anurag Patel 2020-09-08 15:26:22 UTC
Agreed - This may happen with any long running action, not just compute resources. It looks like there are two workarounds:

1. Switch to passenger via satellite-installer --foreman-passenger true
2. Increase proxy timeout in Apache.

Comment 17 Eric Helms 2020-09-08 16:59:51 UTC
Created redmine issue https://projects.theforeman.org/issues/30802 from this bug

Comment 19 Jitendra Yejare 2020-09-14 13:22:05 UTC
Verified!

@ Satellite 6.8 snap 15


Steps:
------------
1. Attempt to Provision a VM(Finish Template) from Satellite UI on Azure Cloud.


Observation:
--------------
1. The provisioning to Azure CR is successful without Proxy Error.
2. The provision host showed installed status as expected.

Comment 20 Lukas Zapletal 2020-09-17 15:08:30 UTC
Guys, if you want to run Satellite on Passenger with SElinux enabled, you need to enable boolean passenger_run_foreman optional flag. It is false by default. This will solve all the mentioned denials.

Comment 23 errata-xmlrpc 2020-10-27 13:08:57 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Important: Satellite 6.8 release), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHSA-2020:4366


Note You need to log in before you can comment on or make changes to this bug.