Bug 2078978

Summary: foreman-maintain health check is unable to restart the qpidd service and failed with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass".
Product: Red Hat Satellite Reporter: Gourav Padholia <gpadholi>
Component: Foreman MaintainAssignee: satellite6-bugs <satellite6-bugs>
Status: CLOSED CURRENTRELEASE QA Contact: Satellite QE Team <sat-qe-bz-list>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.10.3CC: apatel, ehelms, kgaikwad
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2023-07-17 13:36:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Gourav Padholia 2022-04-26 15:59:53 UTC
Description of problem:
foreman-maintain health check is unable to restart the qpidd service and failed with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass".

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

How reproducible:
100%

Steps to Reproduce:
1. Stop the qpidd service manually on the Satellite server. 
2. Run command foreman-maintain health check to check the health of Satellite server. As a result it will show qpidd is failing and press "Y" to restart. 
3. The qpidd service will not restart and it will keep failing with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass".


Actual results:
Qpidd is failing with error "Couldn't connect to the server: undefined method `to_sym' for nil:NilClass".

Expected results:
Qpidd should be restarted and shouldn't show any error. 

Additional info:

Comment 4 Eric Helms 2023-07-17 13:36:51 UTC
I tested this on Satellite 6.13, and it appears to have been fixed:

[root@ip-10-0-167-238 ~]# foreman-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Clean old Kernel and initramfs files from tftp-boot:                [OK] [2.69]
--------------------------------------------------------------------------------
Check number of fact names in database:                             [OK] [0.07]
--------------------------------------------------------------------------------
Check whether all services are running:                             [FAIL] [0.55]
Following services are not running: qpidd
--------------------------------------------------------------------------------
Continue with step [Restart applicable services]?, [y(yes), n(no)] y
Restart applicable services:                                                    

Stopping the following service(s):
qpidd
| All services stopped                                                          

Starting the following service(s):
qpidd
/ All services started                                                          
\ Try 1/5: checking status of hammer ping                                       
Some components are failing: katello_agent
/ Try 2/5: checking status of hammer ping                                       
Some components are failing: katello_agent
- Try 3/5: checking status of hammer ping                                       
Some components are failing: katello_agent
| Try 4/5: checking status of hammer ping                                       
Some components are failing: katello_agent
/ Try 5/5: checking status of hammer ping                           [FAIL] [129.39]
Server response check failed!