Forum OpenACS Q&A: Oracle listener

Collapse
Posted by Ola Hansson on
Hello,

I'm anxious to see how dotLRN works, so I'm installing Oracle now for the first time. Everything went fint, i think, till it was time to stop and start the listener and to check if it works...which it doesn't. (This is on Debian Testing and I'm following Vinod's guide)

The listener says it supports no services and I can't login into the database using the listener naming convention:


debian:/etc/init.d# ./listener8i stop
Oracle 8i listener start/stop
Shutting down Listener for 8i: 
LSNRCTL for Linux: Version 8.1.7.0.0 - Production on 21-JUN-2002 
03:44:10

(c) Copyright 1998 Oracle Corporation.  All rights reserved.

Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 2: No such file or directory
Connecting to (ADDRESS=(PROTOCOL=tcp)(PORT=1521))
TNS-12541: TNS:no listener
 TNS-12560: TNS:protocol adapter error
  TNS-00511: No listener
   Linux Error: 111: Connection refused

...

debian:/etc/init.d# ./listener8i start
Oracle 8i listener start/stop
Starting the Listener for 8i: 
LSNRCTL for Linux: Version 8.1.7.0.0 - Production on 21-JUN-2002 
03:45:36

(c) Copyright 1998 Oracle Corporation.  All rights reserved.

Starting /ora8/m01/app/oracle/product/8.1.7/bin/tnslsnr: please 
wait...

TNSLSNR for Linux: Version 8.1.7.0.0 - Production
Log messages written to 
/ora8/m01/app/oracle/product/8.1.7/network/log/listener.log
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY)))
Listening on: 
(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=debian)(PORT=1521)))

Connecting to (ADDRESS=(PROTOCOL=ipc)(KEY=PNPKEY))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 8.1.7.0.0 - 
Production
Start Date                21-JUN-2002 03:45:37
Uptime                    0 days 0 hr. 3 min. 9 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Log File         
/ora8/m01/app/oracle/product/8.1.7/network/log/listener.log
The listener supports no services
The command completed successfully

debian:/etc/init.d# 


...


oracle@debian:~$ sqlplus system/my_passwd@ora8

SQL*Plus: Release 8.1.7.0.0 - Production on Fri Jun 21 05:02:05 
2002

(c) Copyright 2000 Oracle Corporation.  All rights reserved.

ERROR:
ORA-12154: TNS:could not resolve service name


Enter user-name:

Anyone know how come this happens?

Thanks,

Collapse
Posted by mark dalrymple on
are you starting it as root (I see the '#' in your prompt). Maybe try
starting it as the 'oracle' user. Also, double-check to make sure
your environment variables are groovy when you start the listener
(so that it can find shared libraries, etc)
Collapse
Posted by Ola Hansson on
Hey Mark, Yes I was starting it as root (as the guide suggests) with no ORA environment setup, though... Starting it as oracle is no good either. So I tried the following as an alternative - but didn't help:
oracle@debian:~$ env | grep ORA
ORACLE_SID=ora8
ORACLE_BASE=/ora8/m01/app/oracle
ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7
ORACLE_TERM=vt100
ORA_NLS33=/ora8/m01/app/oracle/product/8.1.7/ocommon/nls/admin/data
oracle@debian:~$

oracle@debian:~$ su  
Password: ********
debian:/home/oracle# env | grep ORA
ORACLE_SID=ora8
ORACLE_BASE=/ora8/m01/app/oracle
ORACLE_HOME=/ora8/m01/app/oracle/product/8.1.7
ORACLE_TERM=vt100
ORA_NLS33=/ora8/m01/app/oracle/product/8.1.7/ocommon/nls/admin/data
debian:/home/oracle# /etc/init.d/listener8i start
(didn't work)
Hmmm...
Collapse
Posted by Michael Hinds on
Starting as root should be OK since this is the startup script that runs at boot time (in fact, no-one else should have permission to run this). It might be an idea to check out your startup script for obvious errors. You'll also notice that it the script does an su so the listener is run by Oracle anyway.

You got the status message from the listener when you started it, so it looks like it can find the libraries OK, but it should list your service handlers, something like this:

STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 8.1.7.0.0 - Production
Start Date                17-JUN-2002 07:10:10
Uptime                    3 days 7 hr. 54 min. 46 sec
Trace Level               off
Security                  OFF
SNMP                      OFF
Listener Parameter File   /apps/oracle/product/8.1.7/network/admin/listener.ora
Listener Log File         /apps/oracle/product/8.1.7/network/log/listener.log
Services Summary...
  PLSExtProc            has 1 service handler(s)
  acs817                has 1 service handler(s)
  acs817                has 2 service handler(s)
The command completed successfully
As you can see, my listener also tells me where the parameter file lives ($ORACLE_HOME/network/admin/listener.ora). Have a look at this file. This should list the SIDs you're listening for. Maybe something is amiss there?
Collapse
Posted by Ola Hansson on
Aha, I don't have that file.

Michael, what should that file look like?

I only have one SID; ora8... What about permissions, ownership etc...?

Thanks!

Collapse
Posted by Ola Hansson on
$ORACLE_HOME/network/admin/listener.ora, that is!
Collapse
Posted by Michael Hinds on
Uh oh! During the installation process, somewhere towards the end, it asks you to configure the listener (Net8 Config). This is when that file should have been created. You could run this again (can't remember how to do this off the top of my head) or you could try making the file yourself. Here's mine:
LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS_LIST =
        (ADDRESS = (PROTOCOL = TCP)(HOST = qfs05)(PORT = 1521))
      )
    )
  )

SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = PLSExtProc)
      (ORACLE_HOME = /apps/oracle/product/8.1.7)
      (PROGRAM = extproc)
    )
    (SID_DESC =
      (GLOBAL_DBNAME = acs817)
      (ORACLE_HOME = /apps/oracle/product/8.1.7)
      (SID_NAME = acs817)
   )
 )
Put in your own values for HOST, ORACLE_HOME, GLOBAL_DBNAME and SID_NAME. The rest should be the same.

This file is owned by oracle:dba and the permissions are 664.

Collapse
Posted by Ola Hansson on
Okay, when I'm running the net8 config assistant again it hangs for like 5 mins after I answer "no" to "Configure another listener?" ...

After that a pop-up window shows, which says:
"The information provided for the tcp protocol is currently in use by other software on this computer ..."

Is there any obvious way to get past this problem?

(I'd love to get this straightened out without manually adding your file...I'll try that if all else fails.)

Collapse
Posted by Tapiwa Sibanda on
Check out the post by Brian Fenton near the end of this thread. I think he was referring to an installation on RH7.2 but it might be the same problem on your box.

oracle installation is generally painful the first couple of times you install on your system.....

Collapse
Posted by Ola Hansson on
Hi Tapiwa,

It seems like Brian had the same problem on RH7.2 that I have on Woody, but "lsnrctl stop" which helped him, doesn't help in my case...

I tried once more with "kernel.shmmax = 134217728" in /etc/sysctl.conf (50% of my 256Mb ram), and this time the listener.ora was created!

Of course I also applied the Oracle glibc patch since Woody comes with glibc2.2 and I edited the "root.sh" file (you need to change the path to awk and sed on Debian, etc.).

If anyone has succeded in installing 8.1.7 on Debian before, it would be nice to have it confirmed that it can be done 😊

Collapse
Posted by Tapiwa Sibanda on
Ola

The thing with o8i install on RH7.2 is that there are several ways of doing it. I have installed oracle about 20 times (sometimes easier to hose system than to diagnose), with about 4 or five end results. I remember I had problems with one of the methods where the net8 setup would not work. lstnctrl stop would not work and I would have to create the listener.ora manually.

Now, I have a really painless 8i install on RH7.2 ... thanks Janine !!!

  1. install stock RH7.2
  2. install *all* the compat*.rpm on the second RH7.2 CD ... am too lazy to figure out which ones I need.
  3. Follow install instructions in the docs
  4. When I set the env in the .bash_profile, add "export LD_ASSUME_KERNEL=2.2.5"
  5. At the first linking error, as user oracle, I edit the $ORACLE_HOME/bin/genclntsh, remove "-z defs", and run the script, then click Retry to continue
  6. Download and edit the root.sh, changing the ORACLE_HOME twice, from /oracle/u01... to /ora8/m01.... (the root.sh that comes with 8i does not work at all)
  7. When you run this script, make sure you su from user oracle and not su -
  8. After installation, and before you run the Net8 config, install the glibc patch as user oracle.
  9. You also need to make sure that you add "export LD_ASSUME_KERNEL=2.2.5" to the nsadmin .bash_profile, otherwise the openacs installation hangs.
  10. One other file you need to change is nsd-oracle which has the ORACLE_HOME set as /ora8/..../8.1.6 instead of /ora8/..../8.1.7

I have never run a debian system, so am not sure where the problem might lie, but I hope something in this installation might give you a pointer.

Try and replace the root.sh script... ... Is there a debian equivalent for the compat*.rpm files that ship with RH???

Collapse
Posted by Samir Joshi on

After that a pop-up window shows, which says: "The information provided for the tcp protocol is currently in use by other software on this computer ..."

I dont know much about these things, but could it be that port 1521 is already in use ? Trying netstat -a may shed some light, just in case... :)
Collapse
Posted by Ola Hansson on
Tapiwa: Your summary more or less perfectly describes what I did, too, except I didn't export LD_ASSUME_KERNEL=2.2.5 the first time around and it didn't change anything when I installed with it set either.

Samir: Thanks for the tip. However, a "netstat -a | grep 1521" didn't reveal anything...

Nevertheless, thanks for your help!

Collapse
Posted by Cynthia Kiser on
Tapiwa, can you tell me what hangs? I am kind of suspicious of having everything that nsadmin does assume kernal 2.2.5. I thought that that compatability stuff was only set for the oracle user during the actual Oracle software installation and database creation.

#  You also need to make sure that you add "export LD_ASSUME_KERNEL=2.2.5" to the nsadmin .bash_profile, otherwise the openacs installation hangs.

Collapse
Posted by Tapiwa Sibanda on
Cynthia, check out this post by Janus Dubanik.

The problem with 8i on RH7.2 extends beyond the glibc. Unless the LD_ASSUME_KERNEL is set to 2.2.5, the jre won't even launch when you ./runInstall

What you might want to do is have nsadmin assume kernel 2.2.5 only the first time you install openacs on 8i running on RH7.2

Does anyone else know of a better workaround??

Collapse
16: Successful Debian install (response to 1)
Posted by Ola Hansson on
I find this a bit strange, but, on my second dev box - which is also running Debian Woody - the installation was painless (even more so than installing on RH 7.2, it seems). However, I still can't make it past the listener (Net8) configuration on the box on which I tried before. The boxes both have 256 Mb RAM and I have no idea why it's working on one but not on the other.

Anyway, I have installed on the working machine a few times by now, both on kernel 2.2.20 and on 2.4.18. No problems whatsoever...

There's no need to export LD_ASSUME_KERNEL=2.2.5. Also, the default value for SHMMAX, 32Mb, worked but is probably not enough for a production worthy database.

Here's my miniature Oracle 8.1.7 on Debian Woody guide (based on Tapiwa's RH version):

  1. install stock Debian Woody
  2. If you're re-installing Oracle: cd /etc, rm oraInst.loc, mv oratab oratab.old, cd /usr/local/bin, rm dbhome oraenv coraenv
  3. Follow install instructions in the docs
  4. Download and edit the root.sh, changing the ORACLE_HOME twice, from /oracle/u01... to /ora8/m01 and correct the path to awk and sed (the root.sh that comes with 8i does not work at all)
  5. When you run this script, make sure you su from user oracle and not su -
  6. After installation, and before you run "dbassist" (before Net8 config is OK too), install the glibc patch as user oracle.
Collapse
Posted by Andrew Piskorski on
I also innstalled Oracle on Debian 3.0 (Woody), and it all worked.  There's more info in this thread:

https://openacs.org/forums/message-view?message_id=67108