Bug 1308344

Summary: Haproxy installation fails with error "Port 5000 on the host haproxy1 is not accessible from rhua"
Product: Red Hat Update Infrastructure for Cloud Providers Reporter: Karan Rai <krai>
Component: ToolsAssignee: RHUI Bug List <rhui-bugs>
Status: CLOSED NOTABUG QA Contact: Radek Bíba <rbiba>
Severity: low Docs Contact:
Priority: unspecified    
Version: 3.0.0CC: bkearney, bperkins, rbiba
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-08-26 11:06:00 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 Karan Rai 2016-02-14 12:59:20 UTC
Description of problem:
Installing haproxy load balancer from rhua servier fails with error -
=====
Port 5000 on the host haproxy1.example.com is not accessible from 
rhua.example.com.
=====

Version-Release number of selected component (if applicable):
rh-rhui-tools-pre.3.0.16-1.el7ui.noarch

How reproducible:
Every time

Steps to Reproduce:
[root@rhua ~]# rhui haproxy add haproxy1.example.com root /root/.ssh/id_rsa -u

Checking that instance ports are reachable...
[localhost] local: yum install -y nc
[localhost] local: nc haproxy1.example.com 22 < /dev/null
Done.


The following HAProxy Load-balancer has been successfully added:

  Hostname:             haproxy1.example.com
  SSH Username:         root
  SSH Private Key:      /root/.ssh/id_rsa

The HAProxy Load-balancer will now be configured:

Checking that the RHUA services are reachable from the instance...
[root.com] sudo: yum install -d 0 -e 0 -y nc
[root.com] sudo: nc rhua.example.com 8140 < /dev/null
Done.


Installing Puppet on the HAProxy Load-balancer...
[root.com] sudo: yum install -y puppet
[root.com] sudo: puppet config set server rhua.example.com
Done.
[root.com] sudo: mkdir -p /etc/facter/facts.d
[root.com] put: /etc/puppet/rhui-secrets/rhui-custom-facts.json -> /etc/facter/facts.d/rhui-custom-facts.json

Setting up certificates...
[root.com] run: echo $HOME
[root.com] sudo: puppet config print certname
[root.com] sudo: rm -rf /var/lib/puppet/ssl
[root.com] sudo: mkdir -p /var/lib/puppet/ssl/{certs,private_keys}
[localhost] local: puppet cert clean haproxy1.example.com
[root.com] put: /var/lib/puppet/ssl/certs/ca.pem -> /root/ca.pem
[root.com] sudo: mv /root/ca.pem /var/lib/puppet/ssl/certs/ca.pem
[root.com] sudo: puppet agent --onetime --detailed-exitcodes --no-daemonize --no-usecacheonfailure
[root.com] run: echo $HOME
[root.com] sudo: cp -r /var/lib/puppet/ssl/certificate_requests/haproxy1.example.com.pem /root/haproxy1.example.com.pem
[root.com] sudo: chown -R $USER /root/haproxy1.example.com.pem
[root.com] download: /var/lib/puppet/ssl/ca/requests/haproxy1.example.com.pem <- /root/haproxy1.example.com.pem

Warning: Local file /var/lib/puppet/ssl/ca/requests/haproxy1.example.com.pem already exists and is being overwritten.

[root.com] sudo: rm -rf /root/haproxy1.example.com.pem
[localhost] local: puppet cert sign haproxy1.example.com
Done.

Installing and configuring the HAProxy Load-balancer...
[root.com] sudo: puppet agent --onetime --detailed-exitcodes --no-daemonize --no-usecacheonfailure
Done.

Ensuring that Apache and Crane are available...
[localhost] local: yum install -y nc
[localhost] local: nc haproxy1.example.com 443 < /dev/null
[localhost] local: nc haproxy1.example.com 5000 < /dev/null
Port 5000 on the host haproxy1.example.com is not accessible from rhua.example.com.

Actual results:
Port 5000 on the host haproxy1.example.com is not accessible from rhua.example.com.

Expected results:
The HAProxy Load-balancer was successfully configured.

Successful configuration of haproxy service from rhua.


Additional info:
There is not firewall on haproxy server.

As a workaround we have to open port 5000 on haproxy server 
[root@haproxy1 ~]# nc -l 5000

Now the configuration is completed successfully.

Comment 5 Radek Bíba 2016-08-26 11:06:00 UTC
Certainly works for me (using the "ec2-user" user name):

...
[localhost] local: nc hap01.example.com 5000 < /dev/null
Done.
The HAProxy Load-balancer was successfully configured.

I'm closing this bug, but please reopen it if you still experience this issue with the latest RHUI 3 ISO deployed in an environment that's undoubtedly correctly set up.