9 Replies Latest reply: Apr 23, 2010 3:16 PM by 767691 RSS

    LSNRCTL command not found - Ubuntu Linux 9.10

    733319
      Good day, everyone! So, I've been searching all over the place to find an answer for this, but have not been successful. Hopefully I can get this resolved.

      So I have the Oracle 10g XE database installed on my Ubuntu 9.10 Linux server, and it works perfectly fine. However, when trying to tie the data source to my website via Visual Web Developer, it states that the listener is not running. After reading some documentation, I go to run a terminal session and log into the oracle user on my Linux box and try running "LSNRCTL start", but I get a "command not found" error. I've tried multiple things: using root to run it, going to the actual oracle xe installation folder to run it, nothing. Anyone got any thoughts on how I can fix this? Thanks!
        • 1. Re: LSNRCTL command not found - Ubuntu Linux 9.10
          Robert Geier
          Do you have your environment set ? (ORACLE_HOME, PATH etc ?)

          lsnrctl is usually found in $ORACLE_HOME/bin

          Remember that linux is case sensitive, so lsnrctl != LSNRCTL
          • 2. Re: LSNRCTL command not found - Ubuntu Linux 9.10
            733319
            Assuming you're talking about typing in "source $ORACLE_HOME\PATH". I have tried doing that, and every time I get an error stating: ns_lang.h line 114 file not found (this is verbatim, not word-for-word, I'm currently at work and not able to remote into my Linux machine at this time, I'll clarify later today when I get home).
            • 3. Re: LSNRCTL command not found - Ubuntu Linux 9.10
              Robert Geier
              No. Check your environment :-

              echo $ORACLE_HOME
              echo $PATH

              Check that $ORACLE_HOME/bin is in $PATH
              • 4. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                sb92075
                post results from following back here while logged onto OS as user who owns Oracle s/w (oracle?)

                env | sort
                • 5. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                  733319
                  This is what I get after typing in those two commands while logged into the oracle account:

                  oracle@NAGISVR: ~$ echo $ORACLE_HOME

                  oracle@NAGISVR: ~$ echo $PATH
                  /usr/local/sbin:/usr/local/bin:user/sbin:/user/bin:/sbin:/bin:/usr/games

                  Edited by: user12197978 on Nov 10, 2009 2:57 PM
                  • 6. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                    rgvg
                    so your environment vars are not set.
                    you're right you need to source a certain file, but you did not name it properly. the name is oraenv.
                    look for that file and source it.
                    • 7. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                      sb92075
                      find / -name oraenv -ls
                      • 8. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                        Gerwin Hendriksen
                        To get the problem with the command lsnrctl right, you should first simply set your environment via the command and use the SID name of your database:
                        . oraenv

                        The next thing is the fact that your attempt to access the listener from the outside was complaining that your listener was not there. Please check the following on the command line of your ubuntu system:
                        - ps -ef | grep tnslsnr --> is there a listener process running (Oracle home is probably shown here too)
                        - Check your hosts file in probably the /etc/ directory and check if the machine name is connected with something else than 127.0.0.1.
                        - In case it is 127.0.0.1, please change the machine name mapping to the ip-address. (the listener was started for the localhost and so not available remote).

                        Hope the above remarks will help you.

                        Regards, Gerwin

                        Edited by: Gerwin Hendriksen on Nov 11, 2009 1:55 AM
                        • 9. Re: LSNRCTL command not found - Ubuntu Linux 9.10
                          767691
                          Hi,

                          I have the same issue:- lsnrctl command not found,

                          And when I echo oracle host & path I got:-
                          ------------------------------------------------------------------------
                          [oracle@ddcdevws02 etc]$ echo $ORACLE_HOST

                          [oracle@ddcdevws02 etc]$ echo $PATH
                          /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/u02/oracle/bin
                          --------------------------------------------------------------------------
                          Now I know that my environment is not set, but could please tell me how I can set the environmernt ??? I mean commands or detailed instruction step as to what needs to be set where & how, I mean the SID, port, Path ???, I am new to Linux as well as database .

                          Also In the host file under /etc/ directory I have these settings
                          --------------------------------------------------------------------------
                          127.0.0.1 localhost.localdomain localhost
                          10.201.60.21 ddcdevws02.hddev.healthdialog.com ddcdevws02
                          --------------------------------------------------------------------------
                          I don't know if this is correct or not ? But I doubt make any change in the host file, please suggest me.

                          Thanks
                          Sam