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 731534

Summary: matahari agents unable to connect to remote broker
Product: Red Hat Enterprise Linux 6 Reporter: Dave Johnson <dajohnso>
Component: matahariAssignee: Andrew Beekhof <abeekhof>
Status: CLOSED ERRATA QA Contact: Dave Johnson <dajohnso>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 6.2CC: astokes, matahari-maint, rbryant
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: matahari-0.4.2-7.el6 Doc Type: Bug Fix
Doc Text:
No description required
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-06 11:39:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Dave Johnson 2011-08-17 19:56:14 UTC
Description of problem:
=================================
I installed the matahari agent on a system to connect to a remote broker but it is not working.  /var/log/messages has an error stating: 

    host[7962]: mh_parse_options: Broker 'ibm-hs21-03.lab.bos.redhat.com' 
         is not resolvable - ignoring

I get the same thing when configuring the agents to use an IP address for the broker:

    host[7981]: mh_parse_options: Broker '10.16.44.45' is not 
         resolvable - ignoring

I tried all of the agents just to be sure.  I also turned iptables off and ran tcpdump on the broker, the packets never make it there.

Version-Release number of selected component (if applicable):
================================================================
v0.4.2-6

How reproducible:
=================================
100%

Steps to Reproduce:
=================================
1.  Install/start a matahari broker
2.  Install a agent
3.
  
Actual results:
=================================
Fails to resolve

Expected results:
=================================
Connection to remote broker

Additional info:
=================================

[root@hp-dl2x170g6-02 init.d]# tail -f /var/log/messages
Aug 17 15:39:31 hp-dl2x170g6-02 host[7962]: mh_parse_options: Broker 'ibm-hs21-03.lab.bos.redhat.com' is not resolvable - ignoring
Aug 17 15:40:56 hp-dl2x170g6-02 host[7981]: mh_parse_options: Broker '10.16.44.45' is not resolvable - ignoring
^C

[root@hp-dl2x170g6-02 init.d]# ping 10.16.44.45
PING 10.16.44.45 (10.16.44.45) 56(84) bytes of data.
64 bytes from 10.16.44.45: icmp_seq=1 ttl=63 time=0.221 ms
64 bytes from 10.16.44.45: icmp_seq=2 ttl=63 time=0.204 ms
^C
--- 10.16.44.45 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1537ms
rtt min/avg/max/mdev = 0.204/0.212/0.221/0.016 ms

[root@hp-dl2x170g6-02 init.d]# ping ibm-hs21-03.lab.bos.redhat.com
PING ibm-hs21-03.lab.bos.redhat.com (10.16.44.45) 56(84) bytes of data.
64 bytes from ibm-hs21-03.lab.bos.redhat.com (10.16.44.45): icmp_seq=1 ttl=63 time=0.321 ms
64 bytes from ibm-hs21-03.lab.bos.redhat.com (10.16.44.45): icmp_seq=2 ttl=63 time=0.194 ms

[root@hp-dl2x170g6-02 init.d]# cat /etc/sysconfig/matahari
# Connect to a broker on the named host
# If this is not defined, agents will attempt to connect to localhost 
#  and/or the contents of a _matahari._tcp SRV record if it exists
MATAHARI_BROKER=10.16.44.45

# Connect to a broker on a non-standard port
MATAHARI_PORT=49000

# Other options that all agents should observe
MATAHARI_AGENT_ARGS="--reconnect=yes"

# Other options that all consoles should observe
# MATAHARI_CONSOLE_ARGS=...

# Per agent options
# host_AGENT_ARGS=...
# network_AGENT_ARGS=...

# Per console options
# sysconfig_CONSOLE_ARGS=...

Comment 2 Dave Johnson 2011-08-17 20:30:02 UTC
This appears to have been introduced in v0.4.2-3

Comment 3 Dave Johnson 2011-08-17 20:33:48 UTC
Ahhh, sorry for the spam, just noticed that I failed to finish the steps to reproduce so let me try again

Steps to Reproduce:
=================================
1.  Install/start a matahari broker
2.  Install a agent on a separate system from broker
3.  Configure agent to connect to remote broker in step 1
4.  Start agent
5.  See 'host unresolvable' error in /var/log/messages

Comment 4 Andrew Beekhof 2011-08-18 03:42:48 UTC
A related patch has been committed upstream: https://github.com/beekhof/matahari/commit/ee9336f

Comment 5 Andrew Beekhof 2011-08-18 04:11:23 UTC
With no argument:

[root@pcmk-1 ~]# matahari-qmf-hostd -vvv
mh_domainname: Got domainname: matahariproject.org
mh_connect: SRV record resolved to: www.matahariproject.org
mh_connect: Trying: amqp:tcp:localhost:49000
2011-08-18 00:44:43 warning Connect failed: Connection refused
2011-08-18 00:44:43 warning Connection  closed
...

With a valid broker:

[root@pcmk-1 ~]# matahari-qmf-hostd -vvv -b www.beekhof.net
mh_connect: Trying: amqp:tcp:www.beekhof.net:49000
...

With an invalid broker:

[root@pcmk-1 ~]# matahari-qmf-hostd -vvv -b www.beekhofs.net
mh_parse_options: Broker 'www.beekhofs.net' is not resolvable - ignoring
...

Comment 8 Dave Johnson 2011-08-19 19:52:58 UTC
good 2 go in v0.4.2-7

Comment 9 Russell Bryant 2011-11-16 21:43:37 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No description required

Comment 10 errata-xmlrpc 2011-12-06 11:39:57 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.

http://rhn.redhat.com/errata/RHBA-2011-1569.html