Operating System - HP-UX
1753797 Members
7378 Online
108805 Solutions
New Discussion юеВ

Adding a port in /etc/services

 
Marko_3
Contributor

Adding a port in /etc/services

Hi all,

I am trying to access my Oracle 8i in my HP unix box via SQL*net. While configuring the connection via Oracle Net8 Configuration assistant, I am using the default port 1521. But I do not see this port in /etc/services. Hence my connection fails.
Do I need this entry in the /etc/services file? What should the entry be like? How do I activate it?

Thanks
5 REPLIES 5
Alexander M. Ermes
Honored Contributor

Re: Adding a port in /etc/services

Hi there.
Just add a line like the samples :

tcptlisrv 1521/tcp oracle #SQL*Net V2 Listener
tcptlisrv 1526/tcp oracle #SQL*Net V2 Listener

Rgds
Alexander M. Ermes
.. and all these memories are going to vanish like tears in the rain! final words from Rutger Hauer in "Blade Runner"
Jerome Bellet
Advisor

Re: Adding a port in /etc/services

Hi Marko!

An entry in /etc/services is mandatory if SQL*Net is handled by inetd. If not, it depends on SQL*Net code itself.
In the first case, you also need an entry in /etc/inetd.conf, with the proper value for each column. You can't devise them, SQL*Net installation program should create this entry for you.
To ensure that inetd configuration is up to date, execute "inetd -c" as root.

Regards, Jerome
Chiara Fregonara
Occasional Advisor

Re: Adding a port in /etc/services

I still have Oracle 7.3.4 and not 8i but I think the problem is in the listener.
Maybe it is not started or configured.
In file listener.ora there should be an entry with the server name, database SID and port the clients are connecting to.
Than you have to stop and restart the listener.

Regards
Chiara
Bill Perez
Occasional Advisor

Re: Adding a port in /etc/services

Marko:

The last answer is right--the problem is neither with "/etc/services", nor with "/etc/inetd.conf". We have no problem with SQL*Net connections to our HP-UX server, and we have nothing in either of those files with regards to SQL*Net. Oracle's "listener" is independent of "inetd".

I would suggest taking a look at the various ".ora" files that SQL*Net uses on both your local machine and the server ("sqlnet.ora", "tnsnames.ora", "listener.ora"). The "tnsnames.ora" file is usually the culprit. That's where the IP connection info (host name/IP address, port #) is stored, as well the Oracle instance name. Also check the listener status on your server--go into "lsnrctl" and type "status".

If you can't say something nice, say something surreal.
Francois Laupretre
New Member

Re: Adding a port in /etc/services

Also use 'netstat -an | grep 1521'. The result should contain one line with the word 'LISTEN'. This shows that a process is listening on port 1521.
Or you can use 'lsof' to display the ports the listener is waiting at.