Operating System - HP-UX
1833852 Members
1944 Online
110063 Solutions
New Discussion

Why port number for oracle listener is not in /etc/services?

 
zhaogui
Super Advisor

Why port number for oracle listener is not in /etc/services?

Can anyone tell me why port number 1521 for oracle listener is not in /etc/services in my environment and it can still work? Is that optional? What is the difference in terms of mechanism, system administration, security,etc.?

Thanks,
10 REPLIES 10
Giri Sekar.
Trusted Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hi
It is not a requirement to have the port numbers listed unless you are using certain services using /etc/inetd.conf. Some organisations make it requirement to list the port numbers in /etc/services for Information purposes.

Thanks
Giri Sekar.
"USL" Unix as Second Language
someone_4
Honored Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hello ..
Here is what I was told about /etc/services. (thanks to Mr. James F. it did sink in)

/etc/services doesn't necessarily list the port number. "Official" services and their port numbers can be found in the services file, but there is no requirement to place a port number in /etc/services to be able to use it. Call like 'getservbyname()' and 'getservbyport()' can be used to obtain the name for a port number and the port number for a name if the pair are defined.


To see the port numbers on your system you can run:

# netstat -an

To see what is actually "listening"

Richard
Sanjay_6
Honored Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hi,

Oracle listener configuration is controlled by the listener configuration parameters and the listener can be started or stopped as per oracle requirements. The port configured under /etc/services are controlled by the system and if configured the process will be listening on that port all the time the system is up. The case is not same with the oracle listener which can be started and stopped by oracle dba at his convenience or even by system startup script.

Have not heard of any security issues with the oracle listener till now.

Hope this helps.

Regds
zhaogui
Super Advisor

Re: Why port number for oracle listener is not in /etc/services?

I remembered that oracle listener port numebr did appear in /etc/services in my previous company's servers and the Oracle version is old one(7.3.2 or 8.11?). Does it mean newer version of Oracle does not require to have port number displayed in /etc/services?

Another question, what's the relationship between /etc/services and /etc/inetd.conf? I saw finger is in service but is comment out in inetd.conf. So can it be used or not?
Sanjay_6
Honored Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hi,

The service (daemon) name and the executable associated with that daemon alongwith arguements (options) if any are mentioned in the /etc/inetd.conf file. The /etc/services files has got the mapping for the port number associated with the daemons.

If a service is commented in /etc/inetd.conf file the port no associated with that service (as mentioned in /etc/services) can be configured for use by another daemon. Only when the daemons is started using inetd the daemons listens on the port mentioned in /etc/services.

Hope this helps.

Regds
Wodisch
Honored Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hi,

if you use a name instead of a portnumber, then Oracle DOES use "/etc/servcies".
It is just tradition to use portnumbers within the "listener.ora" and the "tnsnames.ora", but you can use names, and I do this quite often.
But it is YOU to insert and maintain those lines in the "/etc/servcies", and the next DBA might nor care about it and use numbers again...

Just my $0.02,
Wodisch
K.Vijayaragavan.
Respected Contributor

Re: Why port number for oracle listener is not in /etc/services?

Hi,

Oracle port listener might have appeared in your previous company's servers, as there might have been a realtive daemon configured at /etc/inetd.conf as well.


If "finger" is in service but is comment out in inetd.conf, It can't be used by finger service.

But the port is available to the local network and if not blocked by firewall to the network behind firewall.

"Telnet "
; to see a port is accessible or not.

-Vijay.

"Let us fine tune our knowledge together"
Ron Kinner
Honored Contributor

Re: Why port number for oracle listener is not in /etc/services?

The big difference between having a service in /etc/services and not having it (if it's not called by inetd) is that when you have the service listed and do a netstat -a you will see the name as the listener instead of the port number. netstat -an will show the port number instead of the name.

Ron
zhaogui
Super Advisor

Re: Why port number for oracle listener is not in /etc/services?

From what I understand, it seems whatever service/protocol not listed in /etc/services is not under the control of /etc/inetd, inetd.conf and inetd.sec. But I was wondering what's the pros and cons? which solution is better?
brian_31
Super Advisor

Re: Why port number for oracle listener is not in /etc/services?

Hi:

Before Attempting to Answer Further, if you would take a little time for those who spent thier valuable time for you and assign the points whichever you feel as appropriate it would be better.

Brian.