Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 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 "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". 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 "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-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 2007054

Summary: rhc loses connection with the broker after a long period
Product: Red Hat Enterprise Linux 8 Reporter: Christian Marineau <cmarinea>
Component: rhcAssignee: Link Dupont <link>
Status: CLOSED DUPLICATE QA Contact: Priscila Gutierres <prgutier>
Severity: high Docs Contact:
Priority: unspecified    
Version: 8.4CC: cmarinea, fjansen, pakotvan
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-10-21 19:49:55 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 Christian Marineau 2021-09-23 01:19:17 UTC
Description of problem:
rhc stops communicating with connect.cloud.redhat.com after a long period of time

Version-Release number of selected component (if applicable):
rhc-0.1.4-1.el8_4.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Install a RHEL 8.4 from the installation iso
2. Proceed with the following installation and registration steps
   # subscription-manager register --username=user --password=password
   # subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
   # dnf install ansible
   # dnf install rhc-worker-playbook
   # rhc connect --username=user --password=password

3. Validate that the client communicate with connect.cloud.redhat.com:443 regularly (every ~ 15 seconds)
   i.e.: # tcpdump -n -vvv -i any '(host 184.150.154.115 or host 184.150.154.64)'

4. Let the host running for a while (few hours to 1-2 day)

5. Check the communication again using tcpdump, at some point the communication may stop.
   i.e.: # tcpdump -n -vvv -i any '(host 184.150.154.115 or host 184.150.154.64)'


Actual results:
There is a high chances that the communication stops after a long period of time.
This is very impacting for remediation since the remediation task may remain "pending" forever, and there is no feedback provided to the user.

Expected results:
rhc should maintain the communication with the broker or automatically recover

Additional info:
Actions triggered from console.redhat.com such as configuration management or remediation may not be picked up by the client and the user may be waiting forever. 

This behaviour happened with a non-updated RHEL 8.4.

Comment 1 Link Dupont 2021-09-23 13:41:15 UTC
There are some known issues with rhc-0.1.4 that cause the MQTT client to fail reconnecting to the broker. These issues should be fixed in 0.2.0 (available in 8.4 updates). Could you retest, but upgrade rhc to 0.2.0 before connecting or enabling rhcd?

These "Steps to Reproduce" will upgrade rhc to 0.2.0 before connecting:

   # subscription-manager register --username=user --password=password
   # subscription-manager repos --enable ansible-2.9-for-rhel-8-x86_64-rpms
   # dnf install ansible
   # dnf install rhc-worker-playbook
   # dnf upgrade rhc
   # rhc connect --username=user --password=password

Comment 2 Christian Marineau 2021-10-20 23:50:49 UTC
I think his bug would be a duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=2007667

We can close it if that makes sense with you.

Comment 3 Link Dupont 2021-10-21 13:53:23 UTC
(In reply to Christian Marineau from comment #2)
> I think his bug would be a duplicate of
> https://bugzilla.redhat.com/show_bug.cgi?id=2007667
> 
> We can close it if that makes sense with you.

Sure, if you feel like the issue you describe in this bug is the same as 2007667, then this can be closed as a duplicate of it.

Comment 4 Christian Marineau 2021-10-21 19:49:55 UTC

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