11 Replies Latest reply on May 4, 2009 5:32 AM by Hans Forbrich

    SUSE 10, cant connect to homepage or sqlplus. Please help

    user481753
      Please help me, I am a relative noob to linux. I have tried to include as much info as possible:

      I cant connect to the home page or sqlplus.

      I installed XE like this:

      rpm -ivh oracle-xe-10.2.0.1-0.1.i386.rpm //everything went smoothly

      /etc/init.d/oracle-xe configure //everything ok, i set the password

      Then i added these 2 lines to etc\profile:

      ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
      ORACLE_SID=XE

      and added them oracle_home and oracle_sid to export, and added oracle_home to path.

      Then i tried to connect to the home page and got the error:

      "Error when trying to contact: 127.0.0.1"

      Then i attempted to connect to sqlplus :

      "SQL*Plus: Release 10.2.0.1.0 - Beta..........

      SQL> connect
      Enter user-name: sys
      Enter password:
      ERROR
      ORA-01034: ORACLE not available
      ORA-21=27101: shared memory realm does not exist
      Linux Error: 2: No such file or directory"

      I have uninstalled and reinstalled and restarted the system with no success. I am currently logged in as root.
      The oracle-xe service is enabled. I have a fresh install of SUSE 10

      any help would be greately appreciated,
      Thanks,
      Chris
        • 1. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
          Hans Forbrich
          after install, you might want to try - from the command line as oraclexe user

          oracle-xe start


          One common problem with SuSE is the permission settings. You might search the forum for SuSE - I've provided the settings in another thread.
          • 2. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
            user481753
            I've tried changing the permissions with no success.
            • 3. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
              user481753
              I tried running "oracle-xe start" as oraclexe but it says: "bash: oracle-xe: command not found"

              any ideas?
              • 4. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                Hans Forbrich
                op2@fuzzy:~> uname -a
                Linux fuzzy 2.6.11.4-21.10-default #1 Tue Nov 29 14:32:49 UTC 2005 i686 i686 i386 GNU/Linux

                pop2@fuzzy:~> sqlplus / as sysdba

                SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 14:08:46 2006

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

                Connected to an idle instance.

                SQL> startup
                ORACLE instance started.

                Total System Global Area  289406976 bytes
                Fixed Size                  1219028 bytes
                Variable Size              83887660 bytes
                Database Buffers          201326592 bytes
                Redo Buffers                2973696 bytes
                Database mounted.
                Database opened.
                SQL>                                                  
                • 5. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                  Hans Forbrich
                  I tried running "oracle-xe start" as oraclexe but it
                  says: "bash: oracle-xe: command not found"
                  $ORACLE_HOME/config/scripts/oracle-xe
                  /etc/init.d/oracle-xe

                  Use explicit path.
                  • 6. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                    user481753
                    I attempted to recreate the commands you entered with no luck:

                    :~ # uname -a
                    Linux 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 i686 athlon i386 GNU/Linux
                    :~ # sqlplus / as sysdba

                    SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 21:37:14 2006

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

                    ERROR:
                    ORA-01031: insufficient privileges

                    Enter user-name: sysdba
                    Enter password:
                    ERROR:
                    ORA-01034: ORACLE not available
                    ORA-27101: shared memory realm does not exist
                    Linux Error: 2: No such file or directory
                    • 7. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                      Hans Forbrich
                      You are using root. That is a no-no.

                      Log in as oraclexe and try again.
                      • 8. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                        user481753
                        Ok, now i tried with root, and got a bit further :

                        Linux 2.6.13-15.7-default #1 Tue Nov 29 14:32:29 UTC 2005 i686 athlon i386 GNU/Linux
                        oraclexe@:~/app/oracle/product/10.2.0/server/config/scripts> sqlplus / as sysdba

                        SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 21:50:16 2006

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

                        Connected to an idle instance.

                        SQL> startup
                        ORA-00119: invalid specification for system parameter LOCAL_LISTENER
                        ORA-00130: invalid listener address '(ADDRESS=(PROTOCOL=TCP)(HOST=)(PORT=1521))'

                        your help is really appreciated, thanks
                        • 9. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                          Hans Forbrich
                          Oracle should never, ever, be accessed/started/used/managed using root. There are 2 exceptions to this (and the second exception actually does 'su' to oraclexe):

                          1) initial install of XE (or the root.sh call in a regular non-XE install) and
                          2) startup/shutdown as part of changing run levels.

                          So - let's do this the hard way:

                          1) Make sure you have the right oracle environment. Any user must have the following set:
                          oraclexe@fuzzy:~> set | grep ORA
                          ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                          ORACLE_SID=XE

                          oraclexe@fuzzy:~> # if these are not set they can be set using

                          oraclexe@fuzzy:~> export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                          oraclexe@fuzzy:~> export ORACLE_SID=XE
                                   


                          oraclexe@fuzzy:~> echo $PATH
                          /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin
                          oraclexe@fuzzy:~> # where the first entry is the $ORACLE_HOME/bin and can be set using
                          oraclexe@fuzzy:~> #
                          oraclexe@fuzzy:~> export PATH=$ORACLE_HOME/bin:$PATH

                          oraclexe@fuzzy:~> # Other related misc settings include
                          oraclexe@fuzzy:~> #
                          oraclexe@fuzzy:~> set | grep ora
                          HOME=/usr/lib/oracle/xe
                          LD_LIBRARY_PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/lib:
                          ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server
                          PATH=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:/usr/games:/opt/gnome/bin:/opt/kde3/bin
                          USER=oraclexe
                          2) Make sure the listener is started. I logon as oraclexe (the user created to hold ORacle XE), check the listener, and if it's down (which I deliberately did to demo), start it up using the lsnrctl command ....
                          pop2@fuzzy:~> su - oraclexe
                          Password:
                          oraclexe@fuzzy:~> lsnrctl status

                          LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 24-JAN-2006 15:10:32

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

                          Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fuzzy)(PORT=1521)))
                          TNS-12541: TNS:no listener
                          TNS-12560: TNS:protocol adapter error
                            TNS-00511: No listener
                             Linux Error: 111: Connection refused
                          oraclexe@fuzzy:~> lsnrctl start

                          LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 24-JAN-2006 15:10:38

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

                          Starting /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/tnslsnr: please wait...

                          TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
                          System parameter file is /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
                          Log messages written to /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
                          Listening on: (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fuzzy.forbrichcomputing.ca)(PORT=1521)))

                          Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=fuzzy)(PORT=1521)))
                          STATUS of the LISTENER
                          ------------------------
                          Alias                     LISTENER
                          Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
                          Start Date                24-JAN-2006 15:10:38
                          Uptime                    0 days 0 hr. 0 min. 0 sec
                          Trace Level               off
                          Security                  ON: Local OS Authentication
                          SNMP                      OFF
                          Default Service           XE
                          Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
                          Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
                          Listening Endpoints Summary...
                            (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=fuzzy.forbrichcomputing.ca)(PORT=1521)))
                          Services Summary...
                          Service "PLSExtProc" has 1 instance(s).
                            Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
                          The command completed successfully
                          oraclexe@fuzzy:~>                   
                          If that blows up, then the problem might be the listener config file. That file should be $ORACLE_HOME/network/admin/listener.ora
                          oraclexe@fuzzy:~> cd $ORACLE_HOME/network/admin
                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/network/admin> ls -l
                          total 16
                          -rw-r--r-- 1 oraclexe dba 392 2005-11-16 22:55 listener.ora
                          drwxr-xr-x  2 oraclexe dba 144 2005-11-16 22:50 samples
                          -r--r--r--  1 oraclexe dba 172 2005-10-22 03:37 shrept.lst
                          -rw-r--r--  1 oraclexe dba  42 2006-01-13 09:05 sqlnet.ora
                          -rw-r--r--  1 oraclexe dba 581 2006-01-03 18:47 tnsnames.ora
                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/network/admin> cat listener.ora
                          # listener.ora Network Configuration File:

                          SID_LIST_LISTENER =
                            (SID_LIST =
                              (SID_DESC =
                                (SID_NAME = PLSExtProc)
                                (ORACLE_HOME = /usr/lib/oracle/xe/app/oracle/product/10.2.0/server)
                                (PROGRAM = extproc)
                              )
                            )

                          LISTENER =
                            (DESCRIPTION_LIST =
                              (DESCRIPTION =
                                (ADDRESS = (PROTOCOL = TCP)(HOST = {replace with your host name})(PORT = 1521))
                              )
                            )

                          DEFAULT_SERVICE_LISTENER = (XE)
                          and your host name can be determined from
                          oraclexe@fuzzy:~> uname -a
                          Linux fuzzy 2.6.11.4-21.10-default #1 Tue Nov 29 14:32:49 UTC 2005 i686 i686 i386 GNU/Linux
                          oraclexe@fuzzy:~> # and that should exist in the /etc/hosts file as a static IP

                          oraclexe@fuzzy:~> cat /etc/hosts
                          #
                          127.0.0.1       localhost
                          192.168.10.77    fuzzy.forbrichcomputing.ca fuzzy
                          3) Now that the listener is up, let's see if we can start the database:
                          oraclexe@fuzzy:~> sqlplus / as sysdba

                          SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 15:28:56 2006

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

                          Connected to an idle instance.

                          SQL> startup
                          ORACLE instance started.

                          Total System Global Area  289406976 bytes
                          Fixed Size                  1219028 bytes
                          Variable Size              83887660 bytes
                          Database Buffers          201326592 bytes
                          Redo Buffers                2973696 bytes
                          Database mounted.
                          Database opened.

                          SQL> exit
                          but if that does not work, let's check whether the database parameters are OK and try starting with a hand-coded init file.
                          oraclexe@fuzzy:~> cd $ORACLE_HOME/dbs
                          oraclexe@fuzzy:~> # check the spfile and pfile for size and permissions

                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/dbs> ls -l spfileXE.ora
                          -rw-r----- 1 oraclexe dba 2560 2006-01-24 15:32 spfileXE.ora
                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/dbs> ls -l initXE.ora
                          -rw-r--r-- 1 oraclexe dba 865 2006-01-24 15:31 initXE.ora

                          oraclexe@fuzzy:~> # Assuming spfile is blotto, recreate.  Hand carve a pfile:
                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/dbs> cat initXE.ora
                          # these next 5 lines assume a 1G RAM machine. remove them if less than 1G
                          XE.__db_cache_size=201326592
                          XE.__java_pool_size=4194304
                          XE.__large_pool_size=8388608
                          XE.__shared_pool_size=71303168
                          XE.__streams_pool_size=0
                          *.audit_file_dest='/usr/lib/oracle/xe/app/oracle/admin/XE/adump'
                          *.background_dump_dest='/usr/lib/oracle/xe/app/oracle/admin/XE/bdump'
                          *.compatible='10.2.0.1.0'
                          *.control_files='/usr/lib/oracle/xe/oradata/XE/control.dbf'
                          *.core_dump_dest='/usr/lib/oracle/xe/app/oracle/admin/XE/cdump'
                          *.db_name='XE'
                          *.dispatchers='(PROTOCOL=TCP) (SERVICE=XEXDB)'
                          *.fixed_date='NONE'
                          *.job_queue_processes=4
                          *.local_listener='(ADDRESS = (PROTOCOL=TCP) (HOST=fuzzy) (PORT=1521))'
                          *.open_cursors=300
                          *.pga_aggregate_target=95420416
                          *.remote_login_passwordfile='EXCLUSIVE'
                          *.sessions=20
                          *.sga_target=286261248
                          *.shared_servers=4
                          *.undo_management='AUTO'
                          *.undo_tablespace='UNDO'
                          *.user_dump_dest='/usr/lib/oracle/xe/app/oracle/admin/XE/udump'


                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/dbs> # try to start with this config
                          oraclexe@fuzzy:~/app/oracle/product/10.2.0/server/dbs> sqlplus / as sysdba

                          SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 15:31:52 2006

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

                          Connected to an idle instance.

                          SQL> startup pfile=?/dbs/initXE.ora
                          ORACLE instance started.

                          Total System Global Area  289406976 bytes
                          Fixed Size                  1219028 bytes
                          Variable Size              83887660 bytes
                          Database Buffers          201326592 bytes
                          Redo Buffers                2973696 bytes
                          Database mounted.
                          Database opened.

                          SQL> rem If this worked, then create a replacement SPFILE and restart the database
                          SQL> create spfile from pfile;

                          File created.

                          SQL> shutdown immediate;
                          startupDatabase closed.
                          Database dismounted.

                          ORACLE instance shut down.
                          SQL> ORACLE instance started.

                          Total System Global Area  289406976 bytes
                          Fixed Size                  1219028 bytes
                          Variable Size              83887660 bytes
                          Database Buffers          201326592 bytes
                          Redo Buffers                2973696 bytes
                          Database mounted.
                          Database opened.
                          SQL>                                                               
                          4) Assuming we are now up and running, see whether we can log in as a no-so-powerful user
                          oraclexe@fuzzy:~> sqlplus system/oracle

                          SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 15:38:57 2006

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


                          Connected to:
                          Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta

                          SQL> select * from dual;

                          DUM
                          ---
                          X

                          SQL> alter user hr identified by hr account unlock;

                          User altered.

                          SQL> exit
                          Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
                          oraclexe@fuzzy:~>           
                          and try from a non-Oracle linux user
                          oraclexe@fuzzy:~> exit
                          logout
                          poppa@fuzzy:~> # use Oracle's supplied routine to change environment settings
                          poppa@fuzzy:~> # note the 'dot space' syntax
                          poppa@fuzzy:~> . /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/bin/oraenv
                          ORACLE_SID = [poppa] ? XE


                          poppa@fuzzy:~> sqlplus hr/hr

                          SQL*Plus: Release 10.2.0.1.0 - Beta on Tue Jan 24 15:41:30 2006

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


                          Connected to:
                          Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta

                          SQL> select user from dual;

                          USER
                          ------------------------------
                          HR

                          SQL> exit
                          Disconnected from Oracle Database 10g Express Edition Release 10.2.0.1.0 - Beta
                          poppa@fuzzy:~>                                        
                          • 10. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                            Binepal
                            i had a running xe install on linux but now when i start listner it is giving error

                            TNS-12537: TNS:connection closed
                            TNS-12560: TNS:protocol adapter error
                            TNS-00507: Connection closed
                            Linux Error: 29: Illegal seek

                            the only change in setup is the change of ip address of server
                            what changes i need to make
                            • 11. Re: SUSE 10, cant connect to homepage or sqlplus. Please help
                              Hans Forbrich
                              binepal wrote:
                              i had a running xe install on linux but now when i start listner it is giving error

                              TNS-12537: TNS:connection closed
                              TNS-12560: TNS:protocol adapter error
                              TNS-00507: Connection closed
                              Linux Error: 29: Illegal seek

                              the only change in setup is the change of ip address of server
                              what changes i need to make
                              LOL - thread's been idle for 2 years and you resurrect it. Now (6 months later) I finally look at it.

                              The answer - in case anyone happens to find this question using a search - is that the listener.ora and tnsnames.ora need to be updated. Do a WIndows Explorer or Linux 'find' search for the file names.