- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Two processes allocated to one port???
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
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
04-14-2002 03:38 PM
04-14-2002 03:38 PM
Two processes allocated to one port???
When I use the lsof (for HP-UX 11.00) command (dowloaded from HP-UX porting and archiving center), I get the following:
[palau]:/root # lsof -i -P | grep 1522
ora_pmon_ 14858 oracle 14u inet 0x41757668 0t845784 TCP p01.workcover.qld.gov.au:56302->p01.workcover.qld.gov.au:1522 (EST)
tnslsnr 20759 oracle 7u inet 0x572c4668 0t0 TCP p01.workcover.qld.gov.au:1522 (LISTEN)
tnslsnr 20759 oracle 11u inet 0x66c07c68 0t845784 TCP p01.workcover.qld.gov.au:1522->p01.workcover.qld.gov.au:56302 (EST)
tnslsnr 26248 oracle 7u inet 0x67c03e68 0t0 TCP p08.workcover.qld.gov.au:1522 (LISTEN)
[palau]:/root #
That might be hard to see, but basically, it says that process id 20759 and 26248 are both listening on port 1522. How can this be?
I don't understand how two processes can be sharing the same port number? If I do a ps -ef of these two processes, this is what I find:
[palau]:/root # ps -ef | grep -e 20759 -e 26248 | grep -v grep
oracle 20759 1 0 Apr 13 ? 0:44 /p01/oracle/rdbms/v8.1.7/bin/tnslsnr PRCARDB -inherit
oracle 26248 1 0 Apr 13 ? 0:00 /p08/oracle/rdbms/v8.1.7/bin/tnslsnr LISTENER -inherit
[palau]:/root #
As you can see, they are related somewhat. But can anyone explain how two processes can share the same port? I am sure that this isn't possible.
Cheers,
- Andy Gray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2002 08:43 PM
04-14-2002 08:43 PM
Re: Two processes allocated to one port???
You can achieve this effect by passing an actual IP address when the socket is bound as opposed to INADDR_ANY (bind to a certain port on every available address).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-14-2002 11:53 PM
04-14-2002 11:53 PM
Re: Two processes allocated to one port???
Processes and system-calls are connected to a socket by bind, making streams possible.
Regards,
Ceesjan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2002 09:59 PM
04-17-2002 09:59 PM
Re: Two processes allocated to one port???
Thanks for the replies.
I think you will find that inetd listens on ports as specified in /etc/services, so it is actually just a process which listens to those ports and if a connection arrives for one, spawns a child process as per /etc/inetd.conf, passing the connection to the new child process eg telnetd.
And yes, p01 and p08 are DNS names for service_guard packages, which are actually just different IP's but connected to the same server (on the same network card even), but just different IP's on the same network card. Therefore, the endpoints, although they have different IP addresses, is actually the same machine. Now here is where my lack of knowledge regarding this may arise: Are there 64k ports allocated per machine, or are there 64k ports allocated per IP address per machine? Ie is there only on pool of 64000 ports that a server knows about, or are there multiple pools of 64000 ports on a server which exist on each IP address? I always assumed that there was one pool of 64k ports per server, but what you say seems to suggest that there is one pool of 64k (ie 64000) ports per IP address. Which is it?
So anyway, I'm assuming then, that it isn't a problem that they listen on the same port number, because they are different IP addresses?
Thanks for the help, guys.
- Andy Gray
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-18-2002 12:43 AM
04-18-2002 12:43 AM
Re: Two processes allocated to one port???
In a serviceguard environment applications must be programmed to listen on only the one package address, so that multiple identical packages can run on the same machine. What you're seeing is completely normal.
The best source of information on this is W. Richard Steven's TCP/IP Illustrated series of books - IMHO Volume I is mandatory on every system administrators bookshelf.
Regards,
Steve