Bug 1772526

Summary: Each start of qpidd causes error Error reading socket: Encountered end of file
Product: Red Hat Satellite Reporter: Kenny Tordeurs <ktordeur>
Component: InstallationAssignee: Eric Helms <ehelms>
Status: CLOSED ERRATA QA Contact: Devendra Singh <desingh>
Severity: low Docs Contact:
Priority: medium    
Version: 6.6.0CC: arahaman, egolov, ehelms, janarula, jan.gerrit, jjeffers, kkinge, mmccune, momran, pmoravec, rbertolj, sfroemer, spezialist, susalvi, zhunting
Target Milestone: 6.9.0Keywords: Triaged
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:
: 1943269 (view as bug list) Environment:
Last Closed: 2021-04-21 13:12:13 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 Kenny Tordeurs 2019-11-14 14:52:54 UTC
Description of problem:
When starting the qpidd service there is always the following error message:

# journalctl -u qpidd.service -f
~~~
-- Logs begin at Wed 2019-10-23 12:50:21 CEST. --
Nov 14 15:42:23 ktordeur-sat65-cap1.sysmgmt.lan systemd[1]: Starting An AMQP message broker daemon....
Nov 14 15:42:25 ktordeur-sat65-cap1.sysmgmt.lan qpidd[25934]: 2019-11-14 15:42:25 [System] error Error reading socket: Encountered end of file [-5938]
Nov 14 15:42:25 ktordeur-sat65-cap1.sysmgmt.lan qpidd[25934]: 2019-11-14 15:42:25 [System] error Error reading socket: Encountered end of file [-5938]
~~~

Version-Release number of selected component (if applicable):
~~~
python-gofer-qpid-2.12.5-5.el7sat.noarch
python-qpid-1.35.0-5.el7.noarch
python-qpid-proton-0.28.0-1.el7.x86_64
python-qpid-qmf-1.36.0-28.el7amq.x86_64
qpid-cpp-client-1.36.0-28.el7amq.x86_64
qpid-cpp-server-1.36.0-28.el7amq.x86_64
qpid-cpp-server-linearstore-1.36.0-28.el7amq.x86_64
qpid-dispatch-router-1.5.0-4.el7.x86_64
qpid-proton-c-0.28.0-1.el7.x86_64
qpid-qmf-1.36.0-28.el7amq.x86_64
qpid-tools-1.36.0-28.el7amq.noarch
~~~

How reproducible:
100%

Steps to Reproduce:
1. Restart qpidd service
2. journalctl -u qpidd.service -f
3.

Actual results:
Nov 14 15:42:23 ktordeur-sat65-cap1.sysmgmt.lan systemd[1]: Stopped An AMQP message broker daemon..
Nov 14 15:42:23 ktordeur-sat65-cap1.sysmgmt.lan systemd[1]: Starting An AMQP message broker daemon....
Nov 14 15:42:25 ktordeur-sat65-cap1.sysmgmt.lan qpidd[25934]: 2019-11-14 15:42:25 [System] error Error r
Nov 14 15:42:25 ktordeur-sat65-cap1.sysmgmt.lan qpidd[25934]: 2019-11-14 15:42:25 [System] error Error r

Expected results:
No errors

Additional info:
The error is triggered by `nc -z 127.0.0.1 5671` in /etc/systemd/system/qpidd.service.d/wait-for-port.conf

Comment 3 Pavel Moravec 2019-12-19 14:09:27 UTC
We can replace the test by e.g.:

qpid-config queues -b amqps://localhost:5671 --ssl-certificate=/etc/pki/katello/private/$(hostname -f)-foreman-proxy-client-bundle.pem

that returns zero on success and 1 on connection failure. (optionally, qpid client cert + key can be used instead of the foreman-proxy-client bundle, just that is a longer command)

Comment 5 Pavel Moravec 2020-04-10 09:15:26 UTC
I agree qpid behaves properly here and the error log is caused by 

https://github.com/theforeman/puppet-qpid/blob/master/templates/wait-for-port.conf.erb

that issues invalid check from SSL/application layer point of view.

Reassigning to installer component.

Comment 7 Eric Helms 2020-06-30 23:42:24 UTC
I tested the proposed solution and for this case I do not believe it will work. This produces a chicken and egg problem. Given this has been the way this has worked for many releases and Satellite 6.8 will be the last release with Qpid I'm inclined to close this as won't fix.

Comment 11 Devendra Singh 2021-01-29 09:20:08 UTC
Verified on 6.9 snap 11

Verification steps:

1- Install satellite with 6.9 Snap 11
2- Restarted qpidd.service on the satellite.
3- Checked the "journalctl -u qpidd.service -f logs", didn't see any socket error.

# journalctl -u qpidd.service -f

-- Logs begin at Fri 2021-01-29 01:35:33 EST. --
Jan 29 02:46:51 xyz.com systemd[1]: Starting An AMQP message broker daemon....
Jan 29 02:46:52 xyz.com systemd[1]: Started An AMQP message broker daemon..
Jan 29 04:08:08 xyz.com systemd[1]: Stopping An AMQP message broker daemon....
Jan 29 04:08:08 xyz.com systemd[1]: Stopped An AMQP message broker daemon..
Jan 29 04:08:08 xyz.com systemd[1]: Starting An AMQP message broker daemon....
Jan 29 04:08:09 xyz.com systemd[1]: Started An AMQP message broker daemon..
Jan 29 04:15:07 xyz.com systemd[1]: Stopping An AMQP message broker daemon....
Jan 29 04:15:07 xyz.com systemd[1]: Stopped An AMQP message broker daemon..
Jan 29 04:15:07 xyz.com systemd[1]: Starting An AMQP message broker daemon....
Jan 29 04:15:08 xyz.com systemd[1]: Started An AMQP message broker daemon..

Comment 14 errata-xmlrpc 2021-04-21 13:12:13 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 (Moderate: Satellite 6.9 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-2021:1313