Tuesday, September 13, 2011

Oracle Database Listener not starting due to TNS-00525

Recently hit with this issue while starting the oracle db listener on AIX.

TNSLSNR for IBM/AIX RISC System/6000: Version 11.2.0.1.0 - Production System parameter file is /opt/oracle/product/11.2/mydb/network/admin/listener.ora
Log messages written to /opt/oracle/diag/tnslsnr/myserver/listener/alert/log.xml
Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=myserver)(PORT=1234)))
Error listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC0)))
TNS-12555: TNS:permission denied
 TNS-12560: TNS:protocol adapter error
  TNS-00525: Insufficient privilege for operation
   IBM/AIX RISC System/6000 Error: 1: Not owner

Listener failed to start. See the error message(s) above...
Suspecting that the cause of this was because i was configuring the powerHA in AIX and trying to start the DB. Thanks to blauecorsa, this leads me to finding the root cause. Some where in the "truss -aedfo result.txt lsnrctl start" shows some ECONNREFUSED errors. I checked and found both the /var/tmp/.oracle and /tmp/.oracle are being owned by root:system as below.
root> ls -l /tmp/ | grep oracle
drwxrwxrwt    2 root   system             256 Sep 13 13:03 .oracle

root> ls -l /var/tmp/ | grep oracle
drwxrwxrwt    2 root   system             256 Sep 07 13:58 .oracle
so we can confirm that powerHA started the DB using the startup / shutdown script using root account. The startup / shutdown scripts were modified to su - oracle -c "" and we are back in business. last question, can powerHA assume oracle account to start / shutdown the database so that no change to the scripts is needed?

No comments: