Bug 2059351

Summary: Getting error on Satellite 7 webUI, Oops, we're sorry but something went wrong Katello::Errors::CandlepinNotRunning
Product: Red Hat Satellite Reporter: Ganesh Payelkar <gpayelka>
Component: CandlepinAssignee: Barnaby Court <bcourt>
Status: CLOSED DUPLICATE QA Contact: Lai <ltran>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.11.0CC: nmoumoul
Target Milestone: Unspecified   
Target Release: Unused   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-02 10:57:19 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 Ganesh Payelkar 2022-02-28 21:00:55 UTC
Description of problem:

2022-02-28T20:45:17 [E|app|9bc2fffc] Error occurred while starting Katello::CandlepinEventListener
2022-02-28T20:45:17 [E|app|9bc2fffc] Connection refused - connect(2) for "localhost" port 61613


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

satellite-7.0.0-0.5.beta.el7sat.noarch
candlepin-4.1.10-1.el7sat.noarch
candlepin-selinux-4.1.10-1.el7sat.noarch

How reproducible:
New installation 

Steps to Reproduce:
1. Install RHEL 7 with FIPS enabled
2. Install satellite and ran installer with custom SSL certificates 
3. Trying to access satellite 7 WebUI

Actual results:

 Oops, we're sorry but something went wrong Katello::Errors::CandlepinNotRunning

Expected results:


Additional info:


2022-02-28T20:48:51 [I|app|01215ef3]   Rendered dashboard/index.html.erb within layouts/application (Duration: 151.2ms | Allocations: 12804)
2022-02-28T20:48:51 [W|app|01215ef3] Katello::Errors::CandlepinNotRunning
2022-02-28T20:48:51 [I|app|01215ef3] Backtrace for 'Katello::Errors::CandlepinNotRunning' error (ActionView::Template::Error): Katello::Errors::CandlepinNotRunning
 01215ef3 | /opt/theforeman/tfm/root/usr/share/gems/gems/katello-4.3.0.7/app/lib/katello/resources/candlepin.rb:27:in `raise_rest_client_exception'


# hammer ping 
database:         
    Status:          ok
    Server Response: Duration: 1ms
candlepin:        
    Status:          FAIL
    Server Response: Message: 404 Not Found
candlepin_auth:   
    Status:          FAIL
    Server Response: Message: Katello::Errors::CandlepinNotRunning
candlepin_events: 
    Status:          FAIL
    message:         Not running
    Server Response: Duration: 2ms
katello_events:   
    Status:          ok
    message:         0 Processed, 0 Failed
    Server Response: Duration: 1ms
pulp3:            
    Status:          ok
    Server Response: Duration: 436ms
pulp3_content:    
    Status:          ok
    Server Response: Duration: 453ms
foreman_tasks:    
    Status:          ok
    Server Response: Duration: 5ms


# cat /proc/sys/crypto/fips_enabled 
1


# satellite-maintain service status -b
Running Status Services
================================================================================
Get status of applicable services: 

Displaying the following service(s):
rh-redis5-redis, postgresql, pulpcore-api, pulpcore-content, pulpcore-worker, pulpcore-worker, pulpcore-worker, pulpcore-worker, tomcat, dynflow-sidekiq@orchestrator, foreman, httpd, dynflow-sidekiq@worker-1, dynflow-sidekiq@worker-hosts-queue-1, foreman-proxy, foreman-cockpit
| displaying rh-redis5-redis                       [OK]                         
/ displaying postgresql                            [OK]                         
/ displaying pulpcore-api                          [OK]                         
/ displaying pulpcore-content                      [OK]                         
- displaying pulpcore-worker             [OK]                         
- displaying pulpcore-worker             [OK]                         
- displaying pulpcore-worker             [OK]                         
- displaying pulpcore-worker             [OK]                         
- displaying tomcat                                [OK]                         
- displaying dynflow-sidekiq@orchestrator          [OK]                         
- displaying foreman                               [OK]                         
- displaying httpd                                 [OK]                         
\ displaying dynflow-sidekiq@worker-1              [OK]                         
\ displaying dynflow-sidekiq@worker-hosts-queue-1  [OK]                         
| displaying foreman-proxy                         [OK]                         
| displaying foreman-cockpit                       [OK]                         
| All services are running                                            [OK]      
--------------------------------------------------------------------------------

# satellite-maintain health check
Running ForemanMaintain::Scenario::FilteredScenario
================================================================================
Check number of fact names in database:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running:                               [OK]
--------------------------------------------------------------------------------
Check whether all services are running using the ping call:           [FAIL]
Couldn't connect to the server: undefined method `to_sym' for nil:NilClass


Couldn't connect to the server: undefined method `to_sym' for nil:NilClass
/ Try 5/5: checking status of hammer ping                             [FAIL]    
Server response check failed!

Comment 1 Nikos Moumoulidis 2022-03-01 14:40:35 UTC
61613 is the port that candlepin/tomcat exposes for the embedded ActiveMQ Artemis message broker that Katello needs to connect to.
This could be something related to selinux.

Could you please provide the following logs?:
/var/log/tomcat/
/var/log/candlepin/
Check for any potential SELinux denials around access for this port.

Thanks,
Nikos

Comment 3 Nikos Moumoulidis 2022-03-02 10:57:19 UTC

*** This bug has been marked as a duplicate of bug 2029914 ***