- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- closed fds seen as LISTENING
Categories
Company
Local Language
Forums
Discussions
Knowledge Base
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 06:02 PM
11-27-2003 06:02 PM
closed fds seen as LISTENING
We have an interface server which listens on multiple ports. It is required to close all client sockets and base sockets at some point of time. Using netstat we found that the base sockets(listening fds)which are closed are still seen as LISTENING. Glance is however not showing these fds. Any attempt to connect to these ports are successful. Is this a bug? Is there any patch we have to apply?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 09:34 PM
11-27-2003 09:34 PM
Re: closed fds seen as LISTENING
Do you use the socket caching?
Did you check with lsof that no process could still have this port opened? ( for instance a child process of the one which closed)
Usually that sort of things arrive when a child process still have a file handler on the socket.
For instance if you do
fd=socket()
fd1=accept(fd...)
if (fork())
{ /* child do not close the fd */
...
} else close(fd1);
In that case the socket will stay in listen state as long as a child process which had not closed it explicitely is still running
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 09:40 PM
11-27-2003 09:40 PM
Re: closed fds seen as LISTENING
Try to use something like lsof to find out which process is still listening on those ports at that time...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 11:18 PM
11-27-2003 11:18 PM
Re: closed fds seen as LISTENING
The server is not forking child processes.
lsof and glance do not show these fds in their output but netstat shows them as listening.
An attempt to 'telnet localhost portNum' is successful and netstat shows ESTABLISHED connection on these ports.
Any pointers as to what's going wrong ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 11:28 PM
11-27-2003 11:28 PM
Re: closed fds seen as LISTENING
If they are started through inetd you could increase verbosity by toggling it back and forth to/from extended connection logging mode whenever you issue
/usr/sbin/inetd -b
Then do a tail -f on your syslog.log or wherever your syslogd is writing output for facility daemon.
It will also print the PIDs of your freshly spawned servers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-27-2003 11:41 PM
11-27-2003 11:41 PM
Re: closed fds seen as LISTENING
The sockets are created by a stand-laone server.
--Samir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-28-2003 12:08 AM
11-28-2003 12:08 AM
Re: closed fds seen as LISTENING
Are you sure you have sent the right process the right signal?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 01:07 PM
12-01-2003 01:07 PM
Re: closed fds seen as LISTENING
What do you see if you take a tusc trace of the application - either during startup (be sure to set the follow forks option just to be safe :) or during operation?
As for patches to apply to an 11.0 box, well, since 11.0 first shipped in 1997, there have been some TCP/IP patches. You might want to make sure you are up on some that are recent.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-01-2003 03:57 PM
12-01-2003 03:57 PM
Re: closed fds seen as LISTENING
No the application does not daemonize or fork
during startup.
It is observerd that on the first close of the basesocket, the netstat shows the ports as still listening.
Upon introduction of another close of the basesocket just after the first one, perror returns 'Bad file number' and netstat does not show up the ports as listening !!.
I feel we are missing on some network related patches on HP-UX 11.0.
Pl. help.
--Samir
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-02-2003 04:38 AM
12-02-2003 04:38 AM
Re: closed fds seen as LISTENING
PHCO_23651 fsck_vxfs(1M) cumulative patch
PHCO_24437 LVM commands cumulative patch
PHCO_27375 cumulative SAM/ObAM patch
PHCO_29380 user/group(add/mod/del)(1M) cumulative patch
PHKL_18543 PM/VM/UFS/async/scsi/io/DMAPI/JFS/perf patch
PHKL_20016 2nd CPU not recognized in G70/H70/I70
PHKL_23409 NFS, Large Data Space, kernel memory leak
PHKL_28150 LVM Cumulative Patch w/Performance Upgrades
PHKL_28593 VxFS 3.1 cumulative patch: CR_EIEM
PHKL_29385 IDS/9000; syscalls; eventports; dup2() race
PHKL_29434 POSIX AIO;getdirentries;MVFS;rcp;mmap/IDS;
PHKL_29648 Probe,IDDS,PM,VM,PA-8700,AIO,T600,FS,PDC,CLK
PHNE_27902 Cumulative STREAMS Patch
PHNE_28538 cumulative ARPA Transport patch