Bug 440322 - Sockets to LDAP port left in CLOSE_WAIT after uninstall
Sockets to LDAP port left in CLOSE_WAIT after uninstall
Status: CLOSED ERRATA
Product: freeIPA
Classification: Community
Component: ipa-server (Show other bugs)
1.0
All Linux
low Severity low
: ---
: ---
Assigned To: Rob Crittenden
Chandrasekar Kannan
:
Depends On:
Blocks: 429034
  Show dependency treegraph
 
Reported: 2008-04-02 15:34 EDT by Nathan Kinder
Modified: 2015-01-04 18:31 EST (History)
1 user (show)

See Also:
Fixed In Version: freeipa-2.0.0-1.fc15
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
more cleanup during uninstall (1.81 KB, patch)
2008-05-13 16:31 EDT, Rob Crittenden
no flags Details | Diff

  None (edit)
Description Nathan Kinder 2008-04-02 15:34:33 EDT
If you do an ipa-server-uninstall and then try to do a new install after that,
it will say that port 389 is already in use.  The Directory Server was removed
cleanly and we're not listening on 389 anymore, but there are 5 client sockets
left in CLOSE_WAIT:

tcp   1   0 127.0.0.1:46342        127.0.0.1:389          CLOSE_WAIT  
tcp   1   0 127.0.0.1:46340        127.0.0.1:389          CLOSE_WAIT  
tcp   1   0 127.0.0.1:46341        127.0.0.1:389          CLOSE_WAIT  
tcp   1   0 127.0.0.1:46343        127.0.0.1:389          CLOSE_WAIT  
tcp   1   0 127.0.0.1:46344        127.0.0.1:389          CLOSE_WAIT

I used lsof to see what process was accessing these sockets before I ran the
uninstall, and I found that all of these are from krb5kdc:

# lsof -i :46340
COMMAND   PID   USER   FD   TYPE DEVICE SIZE NODE NAME
ns-slapd 3095 dirsrv   65u  IPv6  10933       TCP
localhost.localdomain:ldap->localhost.localdomain:46340 (ESTABLISHED)
krb5kdc  3202   root    6u  IPv4  10932       TCP
localhost.localdomain:46340->localhost.localdomain:ldap (ESTABLISHED)
Comment 1 Nathan Kinder 2008-04-02 15:41:48 EDT
If I manually do the following when uninstalling, no sockets are left in CLOSE_WAIT:

# service krb5kdc stop
# ipa-server-install --uninstall

I noticed that we are uninstalling the KDC before DS in ipa-server-install.  It
also looks like we try to stop the KDC in the uninstall method in
krbinstance.py, but perhaps that's not working properly.
Comment 3 Rob Crittenden 2008-05-13 16:31:10 EDT
Created attachment 305295 [details]
more cleanup during uninstall

Always shut down the KDC

Restart nscd
Comment 4 Rob Crittenden 2008-05-14 09:58:17 EDT
master: 92d7f9c28a9730a497fe2f9b57ba7548e06d2413
ipa-1-0: 272ada7cedd7ffad2390fe480d0e8d54aff65073
Comment 5 Yi Zhang 2008-05-29 13:29:12 EDT
QA Verified on May 29, 2008 (Yi)

Build used: May 29, 2008 (i386)

Test:
1. install ipa server
2. verify the installation success
3. run ipa-server-install --uninstall
4. verify the uninstall success
5. run ipa-server-install again
6. verify everything works fine.

test result: pass

Note You need to log in before you can comment on or make changes to this bug.