Skip to main content
ExLibris
  • Subscribe by RSS
  • Ex Libris Knowledge Center

    AIK step 6.3: "Failed to connect to aleph21 ... TNS:lost contact"

    • Article Type: General
    • Product: Aleph
    • Product Version: 20

    Problem Symptoms:
    1. In AIK step 6.3:

    LOG: inserting 3 to ./tmp/src_ts_list.list ...
    LOG: finish creating ./tmp/src_ts_list.list ...

    Performing some calculations, patient is a virtue ... please wait ...

    Error: Failed to connect to aleph21
    Tue Apr 23 09:29:30 EDT 2013 Step aleph21_add_datafiles.bash [ Failed ]

    UNIX user aleph could not connect to the Oracle database aleph21 as database user ALEPH_ADMIN.

    2. When trying to connect to the database as user ALEPH_ADMIN by means of SQL*Plus the following error message was received:

    aleph@aleph-arc(a21_1):> sqlplus $ALEPH_ADMIN

    SQL*Plus: Release 11.2.0.3.0 Production on Mon Apr 29 08:24:00 2013
    [...]
    ERROR:
    ORA-12547: TNS:lost contact

    Cause:
    The permissions on the file /exlibris/app/oracle/product/11r2/bin/oracle (the Oracle server binary) are incorrect. In order to allow UNIX users other that oraleph (owner of the Oracle 11.2.0.3 software) to connect to the Oracle database instance aleph21, the Set-User-ID Bit and the Set-Group-Id Bit of the file /exlibris/app/oracle/product/11r2/bin/oracle must be set. This means that the permissions on the file /exlibris/app/oracle/product/11r2/bin/oracle must look as follows (file mode 6751):

    -rwsr-s--x /exlibris/app/oracle/product/11r2/bin/oracle

    However, the permissions look like this (file mode 755):

    -rwxr-xr-x /exlibris/app/oracle/product/11r2/bin/oracle

    Resolution:
    (1)
    Shut down the Oracle database aleph21 (as UNIX user oraleph):

    $ sqlplus / as sysdba
    SQL> shutdown immediate

    (2)
    Execute the script root.sh to set the correct the permissions on the files extjob, ..., oradism listed above (as UNIX user root):

    $ su - root
    # cd /exlibris/app/oracle/product/11r2
    # ./root.sh

    (3)
    Set the correct the permissions on the file /exlibris/app/oracle/product/11r2/bin/oracle (as UNIX user oraleph):

    $ chmod 6751 /exlibris/app/oracle/product/11r2/bin/oracle


    (4)
    Start the Oracle database aleph21 (as UNIX user oraleph):

    $ sqlplus / as sysdba
    SQL> startup

    (5)
    Verify that UNIX user aleph can connect to the Oracle database aleph21 as database user ALEPH_ADMIN:

    $ su - aleph
    $ sqlplus $ALEPH_ADMIN
    [...]
    Connected to:
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production

    (6)
    Execute AIK Step 6.3 again.

    Additional Information

    When checking the Oracle binaries in the directory /exlibris/app/oracle/product/11r2/bin, it was found that the permissions on the following files were also incorrect:

    /exlibris/app/oracle/product/11r2/bin/extjob
    /exlibris/app/oracle/product/11r2/bin/jssu
    /exlibris/app/oracle/product/11r2/bin/nmb
    /exlibris/app/oracle/product/11r2/bin/nmhs
    /exlibris/app/oracle/product/11r2/bin/nmo
    /exlibris/app/oracle/product/11r2/bin/oradism

    Oracle requires that the Set-User-ID Bit of these files is set, too. To be more precise, the permissions on these files must look as follows:

    -rwsr-x--- /exlibris/app/oracle/product/11r2/bin/extjob
    -rwsr-x--- /exlibris/app/oracle/product/11r2/bin/jssu
    -rws--x--- /exlibris/app/oracle/product/11r2/bin/nmb
    -rws--x--- /exlibris/app/oracle/product/11r2/bin/nmhs
    -rws--x--- /exlibris/app/oracle/product/11r2/bin/nmo
    -rwsr-x--- /exlibris/app/oracle/product/11r2/bin/oradism

    Category: Installation


    • Article last edited: 10/8/2013
    //Feedback