Operating System - HP-UX
1783201 Members
1688 Online
109144 Solutions
New Discussion юеВ

Re: Can only start the Oracle listener as root!

 
MAD_2
Super Advisor

Can only start the Oracle listener as root!

We have a server with the following Oracle release:
Oracle8i Enterprise Edition Release 8.1.5.0.0 -Production With the Partitioning and Java options PL/SQL Release 8.1.5.0.0 - Production

I am trying to figure out why it is that after we reboot we can only start the listener as root. When we attempt to start it as another user, for example as Oracle, the following error is displayed:

=========================================
TNSLSNR for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production on 28-SEP-02 10:23:14
(c) Copyright 1998 Oracle Corporation. All rights reserved.
System parameter file is /oracle/network/admin/listener.ora Log messages written to /oracle/network/log/listener.log Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
Attempted to listen on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12541: TNS:no listener
TNS-12560: TNS:protocol adapter error TNS-00511: No listener
Intel SVR4 UNIX Error: 2: No such file or directory
TNSLSNR for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production on 28-SEP-02 10:24:58
(c) Copyright 1998 Oracle Corporation. All rights reserved.
System parameter file is /oracle/network/admin/listener.ora Log messages written to /oracle/network/log/listener.log

=========================================

However, after the system has restarted and the listener is reinitialized, we can stop and then re-start it as Oracle???
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
22 REPLIES 22
harry d brown jr
Honored Contributor

Re: Can only start the Oracle listener as root!


One thing I would look for is files that have root ownership that should be owned by oracle.

live free or die
harry
Live Free or Die
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

Well Harry, that crossed my mind too, but how many files are we talking about here? I did not know where to start, specially since the errors I encountered in the listener log did not point me in any specific direction.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
john korterman
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi Adam,
the "No such file or directory" suggests that a certain file is missing, but if root can start the listener, the file in question must then either have been created or modified by root.
The next time you boot your server you could do a simple search for that file:
1) touch a file immediately before you startup the listener as root, e.g.
# touch /tmp/after_this
2) startup the listener as root
3) # find /oracle -newer /tmp/after_this
This should only show files modified since creation of /tmp/after_this, but if too many files appear, then limit the scope to files with changed inode info:
# find /oracle -newer /tmp/after_thisc

see also man page for find.

regards,
John K.
it would be nice if you always got a second chance
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

John, your reply sounded like a good idea, and this is the list of files I got by using your suggestion:

conversant >find /oracle -newer /tmp/after_this
/oracle/network/log/listener.log
/oracle/oradata/A/control01.ctl
/oracle/oradata/A/control02.ctl
/oracle/.sh_history

However, after checking, I realized that ownerships of those files did not change. What is very weird is that this only happens when trying to initilize the listener right after a reboot. After it is initialized with root, if manually stopped once again, it can be restarted with the oracle login.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
steven Burgess_2
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi Adam

Why don't you set SUID on your oracle start up script

chmod g+s oracle

HTH

Steve
take your time and think things through
john korterman
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi again,
the oracle user may have access problems. Can the oracle user create a file in /oracle/network/log?
Naughty question, but I have to ask: does the listener.log exist after a reboot?

regards,
John K.
it would be nice if you always got a second chance
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

John, the answer to both of your questions is "yes". The oracle user can create files under /oracle/network/log and there is a listener.log file after reboot that is still building up, so it is not a new file after a reboot.
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
john korterman
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi again Adam,
I'm a bit low on ideas now, but perhaps my basic assumption is wrong. Does the error message originally posted by you appear every time the oracle user attempts to start the listener? Is there an error message when root starts the listener?

regards,
John K.
it would be nice if you always got a second chance
Bill Hassell
Honored Contributor

Re: Can only start the Oracle listener as root!

You may need to reinstall Oracle. It sounds as if the original installation was performed as root, a big no-no for any application, especially ones that do not use Software Distributor for packaging. If Oracle was installed as root (and worse: root has no umask), a reinstall is almost mandatory.


Bill Hassell, sysadmin
harry d brown jr
Honored Contributor

Re: Can only start the Oracle listener as root!

Adam,

What does "INTEL" SVR5 mean? Is this an install on Solaris??

TNS-12560: TNS:protocol adapter error TNS-00511: No listener
Intel SVR4 UNIX Error: 2: No such file or directory
TNSLSNR for Intel SVR4 UNIX: Version 8.1.5.0.0 - Production on 28-SEP-02 10:24:58


Oracle is so great at it's error messages that future programmers should take note to make sure that they never follow oracle's lead, then maybe sometime in the future we'll have code that actually produces meaningful error messages and clues to the corrective action.

live free or die
harry
Live Free or Die
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

OK, I am going to attemp to answer eveyone's questions here:

John, the answer to your question is no. The error only appears when a user other than root attempts to restart the listener right after a reboot. It does not appear, however, after root has restarted it and if it is manually stopped after that, it can be re-started by oracle (I have not attempted other users to restart the listener after it is stopped the first time). No error when root does the attempt at any point.

Bill, I certainly am not sure if the installation was performed using root. The installation of oracle was done by AVAYA folks, so I will have to find out. However, everything seems to be working fine with the exception of the described problem.

Harry, this is not an HP-UX. We do use Oracle in two of our HP-UX systems, 10.2 and 11.0. The 11.00 has 8.x What the "Intel SVR4 UNIX Error: 2: No such file or directory" means? I am not sure. This is a "SCO UnixWare 7.1.1" system.

Thanks everyone...
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
john korterman
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi again,
last suggestion... I originally concluded that the "No such file or directory" message meant that a certain file was expected but not present (and could not be created). As the error does not appear for root, it makes me believe that the file in question can be - and is - created by root. Last attempt would be to repeat my first search suggestion, but then not only under the /oracle dir.

regards,
John K.
it would be nice if you always got a second chance
Ian Dennison_1
Honored Contributor

Re: Can only start the Oracle listener as root!

Possible contention issue,...

Check $ORACLE_HOME/bin/dbsnmp permissions, make sure the sticky bit is set.

-rwsr-s--- 1 root dba 9555968 Mar 26 2002 dbsnmp

I believe this talks with the listener.

Share and Enjoy! Ian Dennison
Building a dumber user
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

Ian, the permissions are correct. John, I am looking into the list created when the scope is widened to the entire system, which creates a very long list by the way. I hope to be able to catch something there...
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
harry d brown jr
Honored Contributor

Re: Can only start the Oracle listener as root!


Why not call Oracle, being that it's those lazy bums that don't know how to write appropriate error messages?


live free or die
harry
Live Free or Die
Johan Bergwitz
Advisor

Re: Can only start the Oracle listener as root!

Which port are you trying to bind to? All ports below 1024 can only be bound by root or a process using setuid root.

Rgds
Johan
john korterman
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi Adam,
if you delete the /tmp after reboot, you should start searching there.

regards,
John K.
it would be nice if you always got a second chance
Jean-Luc Oudart
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi this is an extract from Metalink.
The problem is around file permissions (directory) for socket files.
You would have to check for the right directory re you rsystem :
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
You receive the following messages in the "listener.log" file: TNSLSNR for Solaris: Version 8.0.5.0.0 - Production on 07-JUL-99 18:43:51 (c) Copyright 1997 Oracle Corporation. All rights reserved. System parameter file is /infosys/oracle/tnsadmin/listener.ora Log messages written to /var/log/oracle/sqlnet/lsnr01.log Attempted to listen on: (DESCRIPTION=(CONNECT_TIMEOUT=10)(ADDRESS=(PROTOCOL=IPC)(KEY=ipckey))) TNS-12541: TNS:no listener TNS-12560: TNS:protocol adapter error TNS-00511: No listener Solaris Error: 2: No such file or directory" Solution: ========= The Listener requires access to the directory '/var/tmp/oracle' in order to write socket files. The socket files are used for internal pipe connections to the database. Make sure that the Oracle user is the owner in this directory and has full permissions to it. Problem Explanation: ==================== The ORA-12541 is actually cause by a Unix/Solaris error #2 :No such file or directory. This can be caused when the Listener attempts to access internal pipes socket files.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Jean-Luc
fiat lux
Tom Danzig
Honored Contributor

Re: Can only start the Oracle listener as root!

Check permissions for oracle user for /etc/tnsnames.ora and /etc/listener.ora (if that's where they are).

Also, make sure the port number you are trying to use is > 1024 (not privileged).
Volker Borowski
Honored Contributor

Re: Can only start the Oracle listener as root!

Hi,

I'd suspect a shared object problem. This would be the only thing which would explain, why it works, after root once initialized it -> because the shared object has alread been loaded to memory.

Check out the environment for root for all kind of LIB-Variables. Most common: DIR_LIBRARY and LD_LIBRARY PATH. Possibly those are set to an older release for your oracle user and do not get what they need.

Just another try
Volker
MAD_2
Super Advisor

Re: Can only start the Oracle listener as root!

Allright, another discovery. I am not really the Oracle db here, I am the Unix SA, so I am not sure about what the purpose of the tnsnames.ora file is.

What I am sure about is that this particular system does not have a tnsnames.ora file. The database does start and client applications can be used after the listener is started, so I guess there is no implication on not having this file. Can someone explain the purpose?
Contrary to popular belief, Unix is user friendly. It's just very particular about who it makes friends with
Brian Crabtree
Honored Contributor

Re: Can only start the Oracle listener as root!

The listener.ora is used as the configuration for the listener.

The tnsnames.ora file is used to define connections to databases through SQLNet. If you dont populate this file with information for each database that you want to connect to, you will be unable to connect to them.

What you should check is the following:

ll /etc/tnsnames.ora /etc/listener.ora $ORACLE_HOME/listener.ora $ORACLE_HOME/tnsnames.ora $TNS_ADMIN/listener.ora $TNS_ADMIN/tnsnames.ora

Look through the list of files and make sure each file is owned to oracle and is readable. Also, you should make sure that your listener is on a port over 1024. Any ports under this are locked by root and cannot be used without changing $ORACLE_HOME/bin/lsnrctl to suid-owner by root.

Thanks,

Brian