13 Replies Latest reply: Aug 2, 2008 1:09 AM by Binepal RSS

    Lsnrctl doesn't work

      Hello guyz,
      I did an Oracle 10g installation on RHEL 4. I also created a few oracle users. At first users could not execute any binaries in $ORACLE_HOME including sqlplus, but I read in this forum a fix for that problem (i.e chmod s -R /app/oracle ; chmod gs -R /app/oracle). Things have worked seamlessly since then and I am happy with the results since only dba users have administrative privileges in this server (Even Linux user , root cannot log in as sysdba since he is not a member of the dba group). This morning, i discovered that the user oracle (who is a dba) cannot execute lsrnctl but root (who is not a dba) can. The message i get is

      LSNRCTL> start listener_orcl
      Starting /app/oracle/10.2.0/db_1/bin/tnslsnr: please wait...

      TNSLSNR for Linux: Version - Production
      System parameter file is /app/oracle/10.2.0/db_1/network/admin/listener.ora
      Log messages written to /app/oracle/10.2.0/db_1/network/log/listener_orcl.log
      Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=gprsint1.ke.celtel.com)(PORT=1521)))
      TNS-12555: TNS:permission denied
      TNS-12560: TNS:protocol adapter error
      TNS-00525: Insufficient privilege for operation
      Linux Error: 1: Operation not permitted

      Listener failed to start. See the error message(s) above...

      Any assistance will be highly appreciated
        • 1. Re: Lsnrctl doesn't work
          it seems that "someone" started lsnrctl as root (check your startup script?). Please remove or rename all related logfiles and check for .pid files. Then you should be ok.
          • 2. Re: Lsnrctl doesn't work
            Hi, thanks for the suggestion, but the thing still won't work. I have removed the only oracle .pid file (/app/oracle/10.2.0/db_1/stealth.wired.net_orcl/emctl.pid). I also removed the only log file related to my listener (/app/oracle/10.2.0/db_1/network/log/listener_orcl.log) but the error persists. The following is a listing on the binaries lsnrctl and tnslsnr.

            $ ls -alish /app/oracle/10.2.0/db_1/bin/tnslsnr
            605034 372K -rwsr-sr-x 1 oracle oinstall 364K Mar 28 10:46 /app/oracle/10.2.0/db_1/bin/tnslsnr

            $ ls -alish /app/oracle/10.2.0/db_1/bin/lsnrctl
            605035 112K -rwsr-sr-x 1 oracle oinstall 101K Mar 28 10:46 /app/oracle/10.2.0/db_1/bin/lsnrctl

            Any further suggestions will be appreciated
            • 3. Re: Lsnrctl doesn't work
              mmm... that's funky.

              My normal checklist is:
              - ownership of logfiles and binaries (check passed)
              - portnumber > 1024 (check passed)

              Still the permission denied thing sounds not ok. Do you have access to metalink?
              • 4. Re: Lsnrctl doesn't work
                Thanks a lot. I have access to metalink. I will lodge the enquiry there, and I sure will let you know if I succeeded.
                • 5. Re: Lsnrctl doesn't work
                  Surachart Opun
                  1.please UID at start listener

                  #ps -aef | grep LISTENER
                  oracle 22324 1 1 Apr12 ? 10:36:54 /oracle/product/10.1.0/db//bin/tnslsnr LISTENER -inherit

                  2. please check permission of path keep listener log
                  and directory

                  $ lsnrctl show log_file

                  LSNRCTL for Linux: Version - Production on 19-พ.ค. -2006 15:24:32

                  Copyright (c) 1991, 2004, Oracle. All rights reserved.

                  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=napjune)(PORT=1522)))
                  LISTENER parameter "log_file" set to listener.log
                  The command completed successfully
                  $ lsnrctl show log_directory

                  LSNRCTL for Linux: Version - Production on 19-พ.ค. -2006 15:24:40

                  Copyright (c) 1991, 2004, Oracle. All rights reserved.

                  Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=napjune)(PORT=1522)))
                  LISTENER parameter "log_directory" set to /oracle/product/10.1.0/db/network/log/
                  The command completed successfully

                  Message was edited by:
                  HunterX (Surachart Opun)

                  • 6. Re: Lsnrctl doesn't work

                    1. Check if any other listener is running. You could have a 9i listener running.
                    ps -aef | grep -i LISTENER

                    2. Check if any other process is listening on port 1521
                    netstat -a | grep -i 1521
                    3. If all else fails modify the port in your listener.ora file and restart the listener.
                    Just change 1521 to 1530.
                    4. cd /app/oracle/10.2.0/db_1/bin/lsrnctl start listener_orcl
                    /app/oracle/10.2.0/db_1/bin/lsrnctl status listener_orcl
                    5. If all else fails then look at LOCAL_LISTENER parameter in metalink and set it accordingly.
                    • 7. Re: Lsnrctl doesn't work
                      CHECK /var/tmp
                      there should be hidden directory named .oracle
                      as a root user:
                      I deleted all files from this directory and changed its owner:
                      chown oracle .oracle
                      relogin as an oracle user and start listner it WILL work

                      • 8. Re: Lsnrctl doesn't work
                        Thanks avedave!!!

                        This solved my main issue, which were the exact same symptoms that the original poster had listed. i have other problems, but i'll keep searching for the solutions to those problems.
                        • 9. Re: Lsnrctl doesn't work
                          thanks a bunch. worked beautiful
                          • 10. Re: Lsnrctl doesn't work
                            I installed oracle-xe 10.2.0 on a debian etch amd64 and when I try to start/stop the listener I get following error:

                            LSNRCTL for Linux: Version - Production on 15-FEB-2007 12:02:19

                            Copyright (c) 1991, 2005, Oracle. All rights reserved.

                            Message 1053 not found; No message file for product=network, facility=TNSTNS-12560: Message 12560 not found; No message file for product=network, facility=TNS
                            TNS-00530: Message 530 not found; No message file for product=network, facility=TNS
                            Linux Error: 113: No route to host

                            pls help me out ,if someone knows...thanks!
                            • 11. Re: Lsnrctl doesn't work
                              Mohammed Taj
                              It seems your enviourment variable is not correctly set.

                              • 12. Re: Lsnrctl doesn't work
                                By giving permisson to .oracle directory under /var/tmp I was able to start the listener, but when I start the DB using ./dbstart command I again get the insufficient privileges exception. Pls help.

                                ./dbstart: Starting up database "orcl"
                                Wed Jul 9 15:28:20 IST 2008
                                SQL*Plus: Release - Production on Wed Jul 9 15:28:20 2008
                                Copyright (c) 1982, 2005, Oracle. All rights reserved.
                                SQL> ERROR:
                                ORA-01031: insufficient privileges