#7769 Installer does not detect that kadmin port 749/UDP is blocked
Closed: fixed Opened by cheimes.

Issue

The ipa-server-install command has some port checks, e.g. it checks that LDAP ports are not in use. It's missing some port checks, most importantly for the KDC kadmin port 749/UDP. The port is sometimes blocked by rpcbind, causing ipa-server-install to fail half way through the installation process

Steps to Reproduce

  1. run a process that listens on 749/UDP
  2. run ipa-server-install

Actual behavior

Installation fails in kadmin step with CalledProcessError(Command ['/bin/systemctl', 'restart', 'kadmin.service'] returned non-zero exit status 1: 'Job for kadmin.service failed because the control process exited with error code.\nSee "systemctl status kadmin.service" and "journalctl -xe" for details.\n')

Expected behavior

Installation should fail in the check phase.

Version/Release/Distribution

all

Additional info:

See https://bugzilla.redhat.com/show_bug.cgi?id=1592883

The issue is a common cause of flaky PR-CI tests.


https://github.com/freeipa/freeipa/compare/master...tiran:port_check?expand=1 contains some experimental code to detect blocked ports.

PR-CI should also detect the case and restart rpcbind: ss -uln | grep 749 && systemctl restart rpcbind.service

master:

  • 7434a3299d25d1b96ac13ad33fb9ec96eb3da85e PR-CI: Restart rpcbind when it blocks kadmin port

Metadata Update from @frenaud:
- Issue set to the milestone: FreeIPA 4.7.2

ipa-4-7:

  • a20fe7c19b810f2d3e3654602425a5a4f6f2f312 PR-CI: Restart rpcbind when it blocks kadmin port

Metadata Update from @frenaud:
- Issue close_status updated to: fixed
- Issue status updated to: Closed (was: Open)

master:

  • 3243498faa19eeba01fc87586a3d6fbcd81a4fa3 Increase debugging for blocked port 749 and 464

ipa-4-7:

  • 0e3a9f683d374a3fb815b4ea63b314ef2e037b97 Increase debugging for blocked port 749 and 464

view-source:http://freeipa-org-pr-ci.s3-website.eu-central-1.amazonaws.com/jobs/9f407684-f4be-11e8-875b-fa163e55d08e/report.html is another case of a blocked port:

transport.py               558 DEBUG    Netid State   Recv-Q  Send-Q      Local Address:Port        Peer Address:Port                                                                                   
transport.py               558 DEBUG    udp   UNCONN  0       0                 0.0.0.0:68               0.0.0.0:*       users:(("dhclient",pid=1584,fd=8))                                             
transport.py               558 DEBUG    udp   UNCONN  0       0                 0.0.0.0:111              0.0.0.0:*       users:(("rpcbind",pid=1974,fd=5),("systemd",pid=1,fd=103))                     
transport.py               558 DEBUG    udp   UNCONN  0       0                 0.0.0.0:41189            0.0.0.0:*                                                                                      
transport.py               558 DEBUG    udp   UNCONN  0       0               127.0.0.1:323              0.0.0.0:*       users:(("chronyd",pid=452,fd=5))                                               
transport.py               558 DEBUG    udp   UNCONN  0       0               127.0.0.1:879              0.0.0.0:*       users:(("rpc.statd",pid=1975,fd=5))                                            
transport.py               558 DEBUG    udp   UNCONN  0       0                 0.0.0.0:40153            0.0.0.0:*       users:(("rpc.statd",pid=1975,fd=9))                                            
transport.py               558 DEBUG    udp   UNCONN  0       0                    [::]:51130               [::]:*                                                                                      
transport.py               558 DEBUG    udp   UNCONN  0       0                    [::]:43017               [::]:*       users:(("rpc.statd",pid=1975,fd=11))                                           
transport.py               558 DEBUG    udp   UNCONN  0       0                    [::]:111                 [::]:*       users:(("rpcbind",pid=1974,fd=7),("systemd",pid=1,fd=105))                     
transport.py               558 DEBUG    udp   UNCONN  0       0                   [::1]:323                 [::]:*       users:(("chronyd",pid=452,fd=6))                                               
transport.py               558 DEBUG    tcp   LISTEN  0       128               0.0.0.0:111              0.0.0.0:*       users:(("rpcbind",pid=1974,fd=4),("systemd",pid=1,fd=102))                     
transport.py               558 DEBUG    tcp   LISTEN  0       64                0.0.0.0:43285            0.0.0.0:*                                                                                      
transport.py               558 DEBUG    tcp   LISTEN  0       128               0.0.0.0:22               0.0.0.0:*       users:(("sshd",pid=488,fd=4))                                                  
transport.py               558 DEBUG    tcp   LISTEN  0       128               0.0.0.0:52291            0.0.0.0:*       users:(("rpc.statd",pid=1975,fd=10))                                           
transport.py               558 DEBUG    tcp   ESTAB   0       0          192.168.121.59:749        192.168.121.1:2049                                                                                   
transport.py               558 DEBUG    tcp   ESTAB   0       0          192.168.121.59:22         192.168.121.1:45176   users:(("sshd",pid=2084,fd=5),("sshd",pid=2081,fd=5))                          
transport.py               558 DEBUG    tcp   ESTAB   0       0          192.168.121.59:22        192.168.121.74:56190   users:(("sshd",pid=15833,fd=5),("sshd",pid=15830,fd=5))                        
transport.py               558 DEBUG    tcp   LISTEN  0       64                   [::]:46407               [::]:*                                                                                      
transport.py               558 DEBUG    tcp   LISTEN  0       128                  [::]:39785               [::]:*       users:(("rpc.statd",pid=1975,fd=12))                                           
transport.py               558 DEBUG    tcp   LISTEN  0       128                  [::]:111                 [::]:*       users:(("rpcbind",pid=1974,fd=6),("systemd",pid=1,fd=104))                     
transport.py               558 DEBUG    tcp   LISTEN  0       128                  [::]:22                  [::]:*       users:(("sshd",pid=488,fd=5))                                                  
transport.py               217 DEBUG    Exit code: 0
RUN ['ss', '--all', '--tcp', '--udp', '--numeric', '--processes', '-o', 'state', 'all', '( sport = :749 or dport = :749 or sport = :464 or dport = :464 )']
Netid State Recv-Q Send-Q Local Address:Port Peer Address:Port
tcp ESTAB 0 0 192.168.121.59:749 192.168.121.1:2049 timer:(keepalive,45sec,0)
Exit code: 0
Metadata