Consultor Eletrônico



Kbase 16750: Progress ports and /etc/services
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   5/10/1998
Progress ports and /etc/services

To begin with, the /etc/services file is more of a courtesy for
polite programmers. The file should be identical on all hosts in the
network. When a Progress broker start up (see kbase), it searches
/etc/services looking for THE FIRST match on the -S parameter.
Having found a match, the broker will then attempt to bind the port
to a network socket (address). If some (impolite) program is already
using that port, the broker will terminate with "socket in use"
(errno=EADDRINUSE). Assuming it is able to bind, the broker will
then listen on this port for a client (mpro -H -S) request to
connect. When the request is received, the broker will spawn a
server. It doesn't check /etc/services for either service name or
port number. Basically it does a bind(2) with a sin_port = 0 to let
the system assign an unused port number automatically (see Final
Notes below). The client and this server will continue
communication on this port.
The real purpose for the Progress entries in /etc/services is that
of manually starting servers (-m2). Here again, if the specified
port is in use, the server will not start (no searching for available
ports). With manually started servers, a client can determine to
which server it will be connected (by specifying the -S of that
server).

Final Notes: In a large network, the services file is very likely to
be an NIS file. Make sure your changes are to the master, not the
local copy.
How to determine on which ports the servers are listening:
promon ->R&D ->Status ->Servers

Progress Software Technical Support Note # 16750