Bug 440322 - Sockets to LDAP port left in CLOSE_WAIT after uninstall
Summary: Sockets to LDAP port left in CLOSE_WAIT after uninstall
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: freeIPA
Classification: Retired
Component: ipa-server
Version: 1.0
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Rob Crittenden
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On:
Blocks: 429034
TreeView+ depends on / blocked
 
Reported: 2008-04-02 19:34 UTC by Nathan Kinder
Modified: 2015-01-04 23:31 UTC (History)
1 user (show)

Fixed In Version: freeipa-2.0.0-1.fc15
Clone Of:
Environment:
Last Closed:
Embargoed:


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

Description Nathan Kinder 2008-04-02 19:34:33 UTC
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 19:41:48 UTC
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 20:31:10 UTC
Created attachment 305295 [details]
more cleanup during uninstall

Always shut down the KDC

Restart nscd

Comment 4 Rob Crittenden 2008-05-14 13:58:17 UTC
master: 92d7f9c28a9730a497fe2f9b57ba7548e06d2413
ipa-1-0: 272ada7cedd7ffad2390fe480d0e8d54aff65073

Comment 5 Yi Zhang 2008-05-29 17:29:12 UTC
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.