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 1313667 - Refresh facts or Reboot on a shutdown host leads to 500
Summary: Refresh facts or Reboot on a shutdown host leads to 500
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Discovery Plugin
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Lukas Zapletal
QA Contact: Sachin Ghai
URL: http://projects.theforeman.org/issues...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-03-02 07:39 UTC by Lukas Zapletal
Modified: 2020-06-11 12:49 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-27 11:27:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
error on rebooting a offline discovered host (66.86 KB, image/png)
2016-05-18 10:17 UTC, Sachin Ghai
no flags Details
error on refreshing_facts of a offline discovered host (60.48 KB, image/png)
2016-05-18 10:19 UTC, Sachin Ghai
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 12559 0 Normal Closed Nicer error when refresh facts generates 500 2020-01-02 23:25:25 UTC

Description Lukas Zapletal 2016-03-02 07:39:46 UTC
Warning!
Could not get facts from proxy https://10.35.27.150:8443: Connection timed out - connect(2) for "10.35.27.150" port 8443

We need to show proper error instead.

Comment 2 Bryan Kearney 2016-03-02 09:07:28 UTC
Moving to POST since upstream bug http://projects.theforeman.org/issues/12559 has been closed
-------------
Anonymous
Applied in changeset commit:foreman_discovery|5ec1ccacb2b2cafff34a07d60964fa40b165e5d2.

Comment 4 Sachin Ghai 2016-03-10 12:57:33 UTC
2) In case user try to reboot the host which is either shutdown or unreachable then webUI throws following error:

Error: ERF50-5094 [Foreman::WrappedException]: Failed to reboot host mac5254001d9fad with error ERF50-4973 [Foreman::WrappedException]: Unable to reboot mac5254001d9fad via https://ibm-x3550m3-07.lab.eng.brq.redhat.com:9090/discovery/192.168.100.11: 500 Internal Server Error ([RestClient::InternalServerError]: 500 Internal Server Error) ([Foreman::WrappedException]: ERF50-4973 [Foreman::WrappedException]: Unable to reboot mac5254001d9fad via https://ib...)


I think we shouldn't show "500 internal Server Error" as part of error notification.

And in case of 1), error should also be thrown on webUI.

Comment 6 Lukas Zapletal 2016-04-21 15:55:37 UTC
This has been merged and it expected. Instead of 500 page we get an error. The word "nice" might mislead you, it's a bit unpolished, but still it is not a 500 page which was the issue we fixed. Getting:

ERF50-5094 [Foreman::WrappedException]: Failed to reboot host mac525400973bed with error ERF50-4973 [Foreman::WrappedException]: Unable to reboot mac525400973bed via https://192.168.122.110:8443: Legacy direct service only supports http scheme ([ArgumentError]: Legacy direct service only supports http scheme) ([Foreman::WrappedException]: ERF50-4973 [Foreman::WrappedException]: Unable to reboot mac525400973bed via https://19...)

For reboot.

Error: ERF50-7522 [Foreman::WrappedException]: Failed to refresh facts for mac525400973bed with error Could not get facts from proxy https://192.168.122.110:8443: No route to host - connect(2) for "192.168.122.110" port 8443 ([RuntimeError]: Could not get facts from proxy https://192.168.122.110:8443: No route to host - connect...)

For refresh facts.

I only experienced when clickingg on Refresh facts twice, the second error message is ignored. I consider this a minor thing that isn't worth investigating.

Comment 7 Sachin Ghai 2016-05-18 10:16:59 UTC
Verified with sat6.2 GA snap11.0

I can see proper error on refreshing facts of a offline/not-reachable host or rebooting the offline/not-reachable host.

Please see attached screenshots for verification.

Comment 8 Sachin Ghai 2016-05-18 10:17:35 UTC
Created attachment 1158699 [details]
error on rebooting a offline discovered host

Comment 9 Sachin Ghai 2016-05-18 10:19:01 UTC
Created attachment 1158713 [details]
error on refreshing_facts of a offline discovered host

Comment 10 Bryan Kearney 2016-07-27 11:27:54 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, 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/RHBA-2016:1501

Comment 11 ranjith 2016-08-13 10:39:14 UTC
Hello,

We have tried to reboot the host from discovered host list in foreman and getting 500 Internal Server Error, based on this  bug report discussion we have enabled the DEBUG mode in /etc/foreman-proxy/settings.yml file, kindly check the below log reports and assist us to rectify the error.


/var/log/foreman/production.log:

2016-08-13T15:50:55 [sql] [I] ForemanDiscovery: Rebooting mac3860778778b6
2016-08-13T15:50:55 [app] [W] Unable to reboot mac3860778778b6
 | RestClient::InternalServerError: 500 Internal Server Error

/var/log/foreman-proxy/proxy.log:

D, [2016-08-13T16:05:36.280084 #30936] DEBUG -- : verifying remote client 192.168.1.134 against trusted_hosts ["ubuntu.foreman.in"]
E, [2016-08-13T16:05:36.283000 #30936] ERROR -- : failed to update Foreman: Connection reset by peer
192.168.1.134 - - [13/Aug/2016 16:05:36] "PUT /discovery/192.168.1.85/reboot HTTP/1.1" 500 50 0.0390

Thanks.

Comment 12 ranjith 2016-08-13 10:41:16 UTC
Exact error on the webUI is:

Failed to reboot host mac3860778778b6 with error ERF50-6734 [Foreman::WrappedException]: Unable to reboot mac3860778778b6: 500 Internal Server Error ([RestClient::InternalServerError]: 500 Internal Server Error)

Comment 13 Lukas Zapletal 2016-08-19 13:26:36 UTC
Please open a support ticket via http://projects.theforeman.org/projects/foreman/issues/new and provide logs from discovery-image node.


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