Sponsored Content
Operating Systems AIX Process running but not listening Post 302704731 by abohmeed on Sunday 23rd of September 2012 12:53:40 AM
Old 09-23-2012
Quote:
Originally Posted by bakunin
Such a thing is impossible by design of the IP-stack. Let me elaborate:

First, what is a port: a port is an address on layer 4 of the network stack - just like the IP-address is an address on layer 3 (and the MAC address on layer 2). Other than the IP address it identifies a service rather than a host. There are 2 bytes identifying the port and therefore there are 65535 possible ports. Think of it like appartments to a house: the IP address identifies the house itself, the port number identifies the appartment. if you ring at different doors, different people will open, even if you are still in the same house. Some might not open at all, because the apartment is empty.

Communication now works in this way: behind any port(-number) a daemon can listen and offer some service - or not. If a daemon indeed listens it will pick up what comes its way and somehow react - by answering, by doing something, establishing a connection, whatever. Some ports, especially the ones up to # 1023, are for offering standard services: telnet, ftp, http, ssh, lpd, .... and so on. These are called "well known services" and only root can start a process using these ports. Usually a symbolic name is defined for these ports - see "/etc/services" - but this is not necessary.

You can even try this with a printer: if you have a network printer it sure runs a "lpd" daemon. This listens at port 515 per default. Using your telnet client (it allows to configure the port used) try:

Code:
telnet printer.yournetwork.com 515

Of course you will not get any telnet connection - the lpd speaks lpd and not telnet - but you will probably get some banner, identifying the printer. Something like "HP JetDirect Line Printer daemon v1.23 .....", maybe listing some EPROM software revision or so before it closes the connection.

If no daemon is listening, there is simply no answer. If you attempt to initiate a communication with a remote port where no daemon listens you get a "connection refused" answer usually, but this comes from your system, not the remote one - the remote one is simply not saying anything at all.

You see, there is no "closed" ports because ports can neither be closed nor opened. They are just listened at - or not. The daemon listening itself can of course terminate a certain connection and send your system the message "connection closed" - but this does not "close" any port, it just terminates the status that to a certain port someone is listening - if using some specific port was part of the session setup. Some daemons are contacted at a common port, then set up connections at different ports (above 1024) and listen again at the common port for new sessions.

I hope this helps.

bakunin
Thanks kindly for your time and effort and i really appreciate your elaboration,
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to create a dummy process of a process already running?

Hi Everybody, I want to create a shell script named as say "jip" and it is runned. And i want that when i do ps + grep for the process than this jip should be shown as process. Infact there might be process with name jip which is already running. (3 Replies)
Discussion started by: shambhu
3 Replies

2. UNIX for Dummies Questions & Answers

What prot is a process listening on?

Hi, Bit of a newbie question . . . How can I detrimine what TCP port a particular process is listening on? TIA. (2 Replies)
Discussion started by: Le Badger
2 Replies

3. Shell Programming and Scripting

script to monitor process running on server and posting a mail if any process is dead

Hello all, I would be happy if any one could help me with a shell script that would determine all the processes running on a Unix server and post a mail if any of the process is not running or aborted. Thanks in advance Regards, pradeep kulkarni. :mad: (13 Replies)
Discussion started by: pradeepmacha
13 Replies

4. Red Hat

No process ID for listening ports

How can I have ports that are listening without processes being associated with them? root@ldv002 # netstat -ltnup Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0... (2 Replies)
Discussion started by: Padow
2 Replies

5. UNIX for Dummies Questions & Answers

Running different process from current process?

I have been having some trouble trying to get some code working, so I was wondering...what system calls are required to execute a different program from an already running process? (1 Reply)
Discussion started by: Midwest Product
1 Replies

6. UNIX for Dummies Questions & Answers

How a process can check if a particular process is running on different machine?

I have process1 running on one machine and generating some log file. Now another process which can be launched on any machine wants to know if process1 is running or not and also in case it is running it wants to stream the logs file generated by process1 on terminal from which process2 is... (2 Replies)
Discussion started by: saurabhnsit2001
2 Replies

7. BSD

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (0 Replies)
Discussion started by: naveeng
0 Replies

8. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (1 Reply)
Discussion started by: naveeng
1 Replies

9. UNIX for Advanced & Expert Users

Process remians in Running state causing other similar process to sleep and results to system hang

Hi Experts, I am facing one problem here which is one process always stuck in running state which causes the other similar process to sleep state . This causes my system in hanged state. On doing cat /proc/<pid>wchan showing the "__init_begin" in the output. Can you please help me here... (6 Replies)
Discussion started by: naveeng
6 Replies

10. Shell Programming and Scripting

Command to get exact tomcat process I am running ignoring other java process

Team, I have multiple batchjobs running in VM, if I do ps -ef |grep java or tomcat I am getting multiple process list. How do I get my exact tomcat process running and that is unique? via shell script? (4 Replies)
Discussion started by: Ghanshyam Ratho
4 Replies
cups-lpd(8)							    Apple Inc.							       cups-lpd(8)

NAME
cups-lpd - receive print jobs and report printer status to lpd clients SYNOPSIS
cups-lpd [ -h hostname[:port] ] [ -n ] [ -o option=value ] DESCRIPTION
cups-lpd is the CUPS Line Printer Daemon ("LPD") mini-server that supports legacy client systems that use the LPD protocol. cups-lpd does not act as a standalone network daemon but instead operates as a socket-activatable systemd(1) service. OPTIONS
-h hostname[:port] Sets the CUPS server (and port) to use. -n Disables reverse address lookups; normally cups-lpd will try to discover the hostname of the client via a reverse DNS lookup. -o name=value Inserts options for all print queues. Most often this is used to disable the "l" filter so that remote print jobs are filtered as needed for printing; the examples in the previous section set the "document-format" option to "application/octet-stream" which forces autodetection of the print file format. PERFORMANCE
cups-lpd performs well with small numbers of clients and printers. However, since a new process is created for each connection and since each process must query the printing system before each job submission, it does not scale to larger configurations. We highly recommend that large configurations use the native IPP support provided by CUPS instead. SECURITY
cups-lpd currently does not perform any access control based on the settings in cupsd.conf(5) or in the hosts.allow(5) or hosts.deny(5) files used by TCP wrappers. Therefore, running cups-lpd on your server will allow any computer on your network (and perhaps the entire Internet) to print to your server. You should use configure the firewall to limit TCP port 515 access to only those computers that should be able to print through your server. cups-lpd is not enabled by the standard CUPS distribution. Please consult with your operating system vendor to determine whether it is enabled on your system. COMPATIBILITY
cups-lpd does not enforce the restricted source port number specified in RFC 1179, as using restricted ports does not prevent users from submitting print jobs. While this behavior is different than standard Berkeley LPD implementations, it should not affect normal client operations. The output of the status requests follows RFC 2569, Mapping between LPD and IPP Protocols. Since many LPD implementations stray from this definition, remote status reporting to LPD clients may be unreliable. SEE ALSO
cups(1), cupsd(8), systemd(1), http://localhost:631/help COPYRIGHT
Copyright 2007-2013 by Apple Inc. 4 August 2008 CUPS cups-lpd(8)
All times are GMT -4. The time now is 01:53 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy