Operating System - HP-UX
1748195 Members
3019 Online
108759 Solutions
New Discussion юеВ

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