Forum Stats

  • 3,735,220 Users
  • 2,247,146 Discussions
  • 7,857,787 Comments

Discussions

ORA-12547: TNS:lost contact : Error received while trying to login from sqlplus / as sysdba

Ujjwal Rana
Ujjwal Rana Member Posts: 273
edited Jul 17, 2015 12:37AM in General Database Discussions

Hi,

I am getting following messages while trying to install database from DBCA. PLEASE HELP ?

tns.png

I RECEIVED THE SAME ERROR MESSAGE FROM THE FOLLOWING AS WELL :

[[email protected] ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 15:59:10 2015

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

ERROR:

ORA-12547: TNS:lost contact

«134

Answers

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 7:12AM

    Hi,

    Working on Oracle is it for first time (are you a new starter )?

    - Pavan Kumar N

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 7:27AM

    ORA-12547: TNS: lost contact

        

        Cause: Partner has unexpectedly gone away, usually during process startup.

        Action: Investigate partner application for abnormal termination. On an Interchange, this can happen if the machine is overloaded.

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 7:37AM

    Okay, you know the resolution I believe then please continue. I just asked (are you a new starter )?

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 7:46AM

    yup i am a starter and i am trying to work on oracle but theoritically i understand but practically i am not been able to do it and thats why i asked for the support through oracle community forrum

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 8:01AM

    THIS IS WHAT I TRIED BUT STILL COULD NOT SOLVE IT.

    The "TNS lost contact error is most commonly a network error, and you can diagnose it by following my notes on troubleshooting sql*net connectivity errors.

    Steps to troubleshoot Oracle connectivity:

    Also I followed this steps as well :

    To troubleshoot & diagnose Oracle connectivity problems, I did the simplest, outermost level, and follow this checklist:

    ---Check with "ping" using the IP address ("ping 198.11.34.43")'

    [[email protected] Desktop]$ ping example.test.com

    PING example.test.com (192.168.0.227) 56(84) bytes of data.

    64 bytes from example.test.com (192.168.0.227): icmp_seq=1 ttl=64 time=52.0 ms

    64 bytes from example.test.com (192.168.0.227): icmp_seq=2 ttl=64 time=0.051 ms

    64 bytes from example.test.com (192.168.0.227): icmp_seq=3 ttl=64 time=0.038 m

    ---Check with "ping" using DNS name (e.g. "tnsping uranus")

    [[email protected] admin]$

    --Try telnet to the IP on port 1521 (telnet 1.2.3.4 1521)

    --Check with "tnsping" using TNS service name

    [[email protected] admin]$ tnsping LISTENERCONF

    TNS Ping Utility for Linux: Version 11.2.0.3.0 - Production on 15-JUL-2015 17:36:13

    Copyright (c) 1997, 2011, Oracle.  All rights reserved.

    Used parameter files:

    /u01/app/11.2.0/grid/network/admin/sqlnet.ora

    Used TNSNAMES adapter to resolve the alias

    Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)(HOST = example.test.com)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = orcl)))

    OK (0 msec)

    --Invoke SQL*Plus from the OS command line "sqlplus [email protected]".  If this fails, check to ensure that your listener has the flintstone service defined

    [[email protected] ~]$ sqlplus / as [email protected]

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 17:40:42 2015

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

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name:

    --Sign-on to SQL*Plus and connect with the TNS name ("connect fred/[email protected]_name")[[email protected] ~]$ sqlplus / as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 17:41:16 2015

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

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name:

    AND TRIED THIS ONE AS WELL BY GOING INSIDE $ORACLE_HOME/BIN in grid

    [[email protected] Desktop]$ chmod 6751 oracle

    ls -ltr oracle

    -rwsr-s--x    1 oracle   oinstall       136803483 Mar 16 20:32 oracle


    CAN YOU HELP ME ?

  • John Stegeman
    John Stegeman Member Posts: 24,269 Blue Diamond
    edited Jul 15, 2015 8:07AM

    How will knowing the answer to that help you answer the OP's question?

  • John Stegeman
    John Stegeman Member Posts: 24,269 Blue Diamond
    edited Jul 15, 2015 8:08AM

    Is there a firewall of any sort between you and the database server? I would suggest that the firewall is terminating the connection. If that's the case - you'll need to talk to the networking people to correct that.

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 8:12AM

    Just to know from which phase, we should start suggesting him, if he knows some thing, then we can go and  ask create listener (else he would come back to us where and how to start listener)

    Note - Just from example perspective.

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 10:16AM

    Hi Ujjawal,

    1. Thanks for sharing the information.

    2. Appreciate that you did tried from your end

    3.  tnsping LISTENERCONF ..this is alias name from tnsnames.ora (location : ORACLE_HOME/network/admin)

        But while connecting from sqlplus

         sqlplus [email protected] ...

    you are using two different network service   ...try to use "sqlplus [email protected]"

    4. If you are using flinstone.. check whether it's reachable or not (tnsping flinstone) If it's not reachable then check listener on destination *db server" is up or not

    5.sqlplus / as [email protected]

    The above method is suitable when you are residing db server, does orcl net service is it working (check that

    - Pavan Kumar N

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 11:06AM

    Hello John,

    HERE IS THE STATUS OF FIREWALL and YOU MIGHT WANT TO CHECK 1521 PORT AS WELL ...HAVE ADDED NETSTAT output too

    [[email protected] ~]# service iptables status

    iptables: Firewall is not running.

    [[email protected] ~]#

    HERE IS THE OUTPUT FROM NETSTAT FOR 1521 PORT

    [[email protected] ~]# netstat -an | grep 1521

    tcp        0      0 192.168.0.227:61274         192.168.0.227:1521          ESTABLISHED

    tcp        0      0 :::1521                     :::*                        LISTEN   

    tcp        0      0 ::ffff:192.168.0.227:1521   ::ffff:192.168.0.227:63611  TIME_WAIT

    tcp        0      0 ::ffff:192.168.0.227:1521   ::ffff:192.168.0.227:61274  ESTABLISHED

    [[email protected] ~]#

    Hello Pavan,

    I do know how to create listener. As I have grid installed in my pc so here is the screen shot of LISTENER CREATED

    [[email protected] admin]$ netmgr

    l1.png

    l2.png

    or you might want to check information of the following one. Please note :

    [[email protected] admin]$ pwd

    /u01/app/11.2.0/grid/network/admin

    [[email protected] admin]$ cat listener.ora

    # listener.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/listener.ora

    # Generated by Oracle configuration tools.

    SID_LIST_LISTENER =

      (SID_LIST =

        (SID_DESC =

          (GLOBAL_DBNAME = orcl)

          (ORACLE_HOME = /u01/app/11.2.0/grid)

          (SID_NAME = orcl)

        )

      )

    LISTENER =

      (DESCRIPTION =

        (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

      )

    ADR_BASE_LISTENER = /u01/app/grid

    ENABLE_GLOBAL_DYNAMIC_ENDPOINT_LISTENER=ON        # line added by Agent

    [[email protected] admin]$ more tnsnames.ora

    # tnsnames.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

    LISTENERCONF =

      (DESCRIPTION =

        (ADDRESS_LIST =

          (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

        )

        (CONNECT_DATA =

          (SERVICE_NAME = orcl)

        )

      )

    [[email protected] admin]$ more sqlnet.ora

    # sqlnet.ora Network Configuration File: /u01/app/11.2.0/grid/network/admin/sqlnet.ora

    # Generated by Oracle configuration tools.

    #NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, EZCONNECT)

    SQLNET.AUTHENTICATION_SERVICES= (ALL)

    NAMES.DIRECTORY_PATH= (TNSNAMES, HOSTNAME, EZCONNECT)

    ADR_BASE = /u01/app/grid

    [[email protected] admin]$

    ALSO PLEASE FIND THE tnsnames.ora information inside ORACLE USER as well :-

    [[email protected] ~]$ cd $ORACLE_HOME/network/admin

    [[email protected] ~]$ cd $ORACLE_HOME/network/admin

    [[email protected] admin]$ cat tnsnames.ora

    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/11.2.0/db_1/network/admin/tnsnames.ora

    # Generated by Oracle configuration tools.

    LISTENERCONF =

      (DESCRIPTION =

        (ADDRESS_LIST =

          (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

        )

        (CONNECT_DATA =

          (SERVICE_NAME = orcl)

        )

      )

    ORCL =

      (DESCRIPTION =

    (ADDRESS = (PROTOCOL = TCP)(HOST = storage.castrading.com)(PORT = 1521))

        (CONNECT_DATA =

          (SERVER = DEDICATED)

          (SERVICE_NAME = orcl)

        )

      )

    [[email protected] admin]$

    ALSO HERE IS THE OUTPUT FOR lsnrctl status



    [[email protected] ~]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-JUL-2015 20:16:29

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=storage.castrading.com)(PORT=1521)))

    STATUS of the LISTENER

    ------------------------

    Alias                     LISTENER

    Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

    Start Date                15-JUL-2015 19:30:02

    Uptime                    0 days 0 hr. 46 min. 27 sec

    Trace Level               off

    Security                  ON: Local OS Authentication

    SNMP                      OFF

    Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

    Listener Log File         /u01/app/grid/diag/tnslsnr/storage/listener/alert/log.xml

    Listening Endpoints Summary...

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=storage.castrading.com)(PORT=1521)))

    Services Summary...

    Service "orcl" has 1 instance(s).

      Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

    The command completed successfully

    [[email protected] ~]$

    AS YOU CAN NOTICE THAT ASM STATUS HASN'T SHOWN  AT ABOVE LSNRCTL OUTPUT.

    NOTE : I WOULD LIKE TO SHOW THE CLUSTER UTILITY OUTPUT AS WELL :-


    [[email protected] ~]$ crs_stat -t

    Name           Type           Target    State     Host      

    ------------------------------------------------------------

    ora.DATA.dg    ora....up.type ONLINE    OFFLINE             

    ora.FRA.dg     ora....up.type OFFLINE   OFFLINE             

    ora....ER.lsnr ora....er.type ONLINE    ONLINE    storage   

    ora.asm        ora.asm.type   ONLINE    OFFLINE             

    ora.cssd       ora.cssd.type  ONLINE    ONLINE    storage   

    ora.diskmon    ora....on.type OFFLINE   OFFLINE             

    ora.evmd       ora.evm.type   ONLINE    ONLINE    storage   

    ora.ons        ora.ons.type   OFFLINE   OFFLINE             

    [[email protected] ~]$


    HERE IS WHAT I DID TO MAKE ora.DATA.dg, ora.FRA.dg , ora.asm , ora.diskmon, ora.ons   TO MAKE ONLINE


    [[email protected] Desktop]$ crsctl start resource -all

    CRS-5702: Resource 'ora.DATA.dg' is already running on 'storage'

    CRS-5702: Resource 'ora.FRA.dg' is already running on 'storage'

    CRS-5702: Resource 'ora.LISTENER.lsnr' is already running on 'storage'

    CRS-5702: Resource 'ora.asm' is already running on 'storage'

    CRS-5702: Resource 'ora.cssd' is already running on 'storage'

    CRS-5702: Resource 'ora.evmd' is already running on 'storage'

    CRS-2501: Resource 'ora.ons' is disabled

    CRS-2672: Attempting to start 'ora.diskmon' on 'storage'

    CRS-2676: Start of 'ora.diskmon' on 'storage' succeeded

    CRS-4000: Command Start failed, or completed with errors.

    I DON'T KNOW WHY INORDER TO MAKE RUN OF ABOVE RESOURCES EVERY TIME I HAVE TO RUN crsctl start resource -all ..I WONDER WHAT IS THE REASON ?

    so after crsctl start resource -all HERE IS THE OUTPUT

    [[email protected] Desktop]$ crs_stat -t

    Name           Type           Target    State     Host       

    ------------------------------------------------------------

    ora.DATA.dg    ora....up.type ONLINE    ONLINE    storage    

    ora.FRA.dg     ora....up.type ONLINE    ONLINE    storage    

    ora....ER.lsnr ora....er.type ONLINE    ONLINE    storage    

    ora.asm        ora.asm.type   ONLINE    ONLINE    storage    

    ora.cssd       ora.cssd.type  ONLINE    ONLINE    storage    

    ora.diskmon    ora....on.type OFFLINE   OFFLINE              

    ora.evmd       ora.evm.type   ONLINE    ONLINE    storage    

    ora.ons        ora.ons.type   OFFLINE   OFFLINE              

    [[email protected] Desktop]$

    [[email protected] Desktop]$ srvctl enable ASM

    PRCC-1010 : asm was already enabled

    PRCR-1002 : Resource ora.asm is already enabled

    [[email protected] Desktop]$ srvctl start ASM

    PRCC-1014 : asm was already running

    PRCR-1004 : Resource ora.asm is already running

    PRCR-1079 : Failed to start resource ora.asm

    CRS-5702: Resource 'ora.asm' is already running on 'storage'

    [[email protected] Desktop]$ srvctl status ASM

    ASM is running on storage

    AFTER MAKING ALL THE RESOURCES ONLINE crsctl start resource -all HERE IS THE LISTENER OUTPUT

    [[email protected] Desktop]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-JUL-2015 20:40:10

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=storage.castrading.com)(PORT=1521)))

    STATUS of the LISTENER

    ------------------------

    Alias                     LISTENER

    Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

    Start Date                15-JUL-2015 20:30:37

    Uptime                    0 days 0 hr. 9 min. 32 sec

    Trace Level               off

    Security                  ON: Local OS Authentication

    SNMP                      OFF

    Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

    Listener Log File         /u01/app/grid/diag/tnslsnr/storage/listener/alert/log.xml

    Listening Endpoints Summary...

      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=storage.castrading.com)(PORT=1521)))

    Services Summary...

    Service "orcl" has 1 instance(s).

    Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

    The command completed successfully

    [[email protected] Desktop]$



  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 10:29AM

    Hi Pavan,

    I tried login with all of this but could not login

    sqlplus [email protected]

    sqlplus / as sysdba

    sqlplus / as [email protected]

    sqlplus / as [email protected]

    For all above command i have used for login. I received the same error message for all. Here is the error message :

    [[email protected] admin]$ sqlplus / as [email protected]

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 20:11:17 2015

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

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    [[email protected] admin]$ sqlplus / as [email protected]

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 20:11:33 2015

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

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    [[email protected] admin]$

  • Unknown
    edited Jul 15, 2015 10:37AM

    using COPY & PASTE post results from OS commands below

    lsnrctl status

    lsnrctl service

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 10:54AM

    Hi,

    1. You have installed grid (good), It's used for ASM/Cluster (RAC) purpose, but not for creating databases. You need to install Oracle Binaries for that, to create database

    2. Second thing, storage.castrading.com --is this your local host or some other host ? Since your tnsnames.ora pointing to that host - for Oracle sid-  orcl
      storage.castrading.com -- This is the location where database is hosted and you need to connect.

    3. SQLNET.AUTHENTICATION_SERVICES=NONE (update it)

    4.  Not an appropriate method when you are connecting to remote instance as sysdba

    sqlplus [email protected]
    sqlplus / as sysdba                              
    sqlplus / as [email protected]
    sqlplus / as [email protected]
    

    Not appropriate methods (all are wrong)

    5. Do you have sys password (correct one)?

    sqlplus "/as sysdba" it mean is you use OS authorization and your user must member of dba(ORA_DBA) OS group,else operation will fail.

    sqlplus sys/[email protected] as sysdba it mean is you use passwordfile authorization .And in this case you need properly configure this file also need set remote_login_passwordfile= EXCLUSIVE or SHARED

    6. Login to server storage.castrading.com (make sure you have listener, instance is up and running)

    - Pavan Kumar N

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 11:20AM

    HERE IS THE OUTPUT AS MENTIONED ABOVE :-

    [[email protected] ~]$ sqlplus "/as sysdba"

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 20:52:30 2015

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

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    [[email protected] ~]$

    =========================================================================================================================

    [[email protected] ~]$ sqlplus sys/[email protected] as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 20:54:04 2015

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

    ERROR:

    ORA-01031: insufficient privileges

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    [[email protected] ~]$

    =========================================================================================================================

    [[email protected] Desktop]$ srvctl status ASM

    ASM is running on storage

    AND HERE IS THE LISTENER STATUS

    [[email protected] Desktop]$ lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.3.0 - Production on 15-JUL-2015 20:51:17

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=storage.castrading.com)(PORT=1521)))

    STATUS of the LISTENER

    ------------------------

    Alias                     LISTENER

    Version                   TNSLSNR for Linux: Version 11.2.0.3.0 - Production

    Start Date                15-JUL-2015 20:30:37

    Uptime                    0 days 0 hr. 20 min. 39 sec

    Trace Level               off

    Security                  ON: Local OS Authentication

    SNMP                      OFF

    Listener Parameter File   /u01/app/11.2.0/grid/network/admin/listener.ora

    Listener Log File         /u01/app/grid/diag/tnslsnr/storage/listener/alert/log.xml

    Listening Endpoints Summary...

    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=storage.castrading.com)(PORT=1521)))

    Services Summary...

    Service "orcl" has 1 instance(s).

      Instance "orcl", status UNKNOWN, has 1 handler(s) for this service...

    The command completed successfully

    [[email protected] Desktop]$

    ==================================================================================================

    Please NOTE : I haven't installed database from DBCA. Its because it gives an error message ORA-12547: TNS:lost contact

    while installing DATABSE

  • Unknown
    edited Jul 15, 2015 11:16AM

    please post last 100 or so line from file below

    /u01/app/grid/diag/tnslsnr/storage/listener/alert/log.xml

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 11:22AM

    Hi,

    sqlplus "/as sysdba" .....why are you testing this ? as you have stated that no database installed

    sqlplus sys/[email protected] as sysdba   .... have you tested whether this server "storage.castrading.com " reachable or not  (where the database is up and running or not)

    Blindly with out going through comments you are just posting outputs which are not required

    Please NOTE : I haven't installed database from DBCA. Its because it gives an error message ORA-12547: TNS:lost contact while installing DATABSE
    

    Then you try use oracle binaries to create some listener not with grid binaries (you are just running super fast, be patient understand what said and what happening)

    Note - if you are not installed the database (as you know) then why are you trying to connect database orcl..so many times (how could that would be possible and posting outputs so many times)

    - Pavan Kumar N

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 11:31AM

    [[email protected] Desktop]$ tail -f /u01/app/grid/diag/tnslsnr/storage/listener/alert/log.xml -n 100

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:14:43 * service_died * LsnrAgt * 12537

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:43.658+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:14:43 * version * 0

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:43.743+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>Error listening on: (ADDRESS=(PROTOCOL=TCP)(HOST=54.174.31.254)(PORT=1521)(IP=FIRST))

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:43.743+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:14:43 * service_register * LsnrAgt * 12545

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:43.743+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>TNS-12545: Connect failed because target host or object does not exist

    TNS-12560: TNS:protocol adapter error

      TNS-00515: Connect failed because target host or object does not exist

       Linux Error: 99: Cannot assign requested address

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:44.769+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>WARNING: Subscription for node down event still pending

    </txt>

    </msg>

    <msg time='2015-07-15T21:14:44.770+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:14:44 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=storage.castrading.com)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647296)) * status * 0

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.559+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>WARNING: Subscription for node down event still pending

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.559+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:15:43 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=storage.castrading.com)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647296)) * status * 0

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.637+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:15:43 * service_died * LsnrAgt * 12537

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.677+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:15:43 * version * 0

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.747+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>Error listening on: (ADDRESS=(PROTOCOL=TCP)(HOST=54.174.31.254)(PORT=1521)(IP=FIRST))

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.747+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:15:43 * service_register * LsnrAgt * 12545

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:43.747+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>TNS-12545: Connect failed because target host or object does not exist

    TNS-12560: TNS:protocol adapter error

      TNS-00515: Connect failed because target host or object does not exist

       Linux Error: 99: Cannot assign requested address

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:44.776+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>WARNING: Subscription for node down event still pending

    </txt>

    </msg>

    <msg time='2015-07-15T21:15:44.776+05:45' org_id='oracle' comp_id='tnslsnr'

    type='UNKNOWN' level='16' host_id='storage.castrading.com'

    host_addr='192.168.0.227'>

    <txt>15-JUL-2015 21:15:44 * (CONNECT_DATA=(CID=(PROGRAM=)(HOST=storage.castrading.com)(USER=grid))(COMMAND=status)(ARGUMENTS=64)(SERVICE=LISTENER)(VERSION=186647296)) * status * 0

    </txt>

    </msg>

  • Unknown
    edited Jul 15, 2015 11:36AM

    OS/networking mis-configuration is root cause

    fix the problem reported below

    <txt>TNS-12545: Connect failed because target host or object does not exist

    TNS-12560: TNS:protocol adapter error

      TNS-00515: Connect failed because target host or object does not exist

       Linux Error: 99: Cannot assign requested address

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 11:45AM

    Hi Pavan,

    What about the exisiting LISTENERCONF ...the one i have created inside grid ? Do you want me to delete that ? please let me know ???

    QUESTION : sqlplus sys/[email protected] as sysdba   .... have you tested whether this server "storage.castrading.com " reachable or not  (where the database is up and running or not)


    ANSWER :

    sqlplus sys/[email protected] as sysdba (REGARDING THIS DO YOU WANT ME SHOW THE OUTPUT of sqlplus sys/[email protected] as sysdba ) If it is then here it is :-

    [[email protected] ~]$ sqlplus sys/[email protected] as sysdba

    SQL*Plus: Release 11.2.0.1.0 Production on Wed Jul 15 21:29:30 2015

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

    ERROR:

    ORA-01031: insufficient privileges

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    Enter user-name: sys

    Enter password:

    ERROR:

    ORA-12547: TNS:lost contact

    SP2-0157: unable to CONNECT to ORACLE after 3 attempts, exiting SQL*Plus

    REGARDING WHETHER server "storage.castrading.com " reachable or no. HERE IS THE OUTPUT FROM GRID AND ORACLE

    [[email protected] ~]$ ping storage.castrading.com

    PING storage.castrading.com (192.168.0.227) 56(84) bytes of data.

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=1 ttl=64 time=0.035 ms

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=2 ttl=64 time=0.045 ms

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=3 ttl=64 time=0.044 ms

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=4 ttl=64 time=0.044 ms

    [[email protected] Desktop]$ ping storage.castrading.com

    PING storage.castrading.com (192.168.0.227) 56(84) bytes of data.

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=1 ttl=64 time=0.045 ms

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=2 ttl=64 time=0.043 ms

    64 bytes from storage.castrading.com (192.168.0.227): icmp_seq=3 ttl=64 time=0.046 ms

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 11:51AM

    Hi,

    1. You can leave that listener.

    2. Try to login to this server 192.168.0.227, check verify any db instance is up and running

    ps -ef |grep pmon (If its running then ) check for listener

    Note - I just hoping that you are trying to correct password of sysdba

    - Pavan Kumar N

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 12:07PM

    SINCE I HAVE INSTALLED ORACLE GRID. I HAVE POSTED THE OUTPUT OF ps -ef |grep pmon from following user :


    FROM GRID USER

    [[email protected] Desktop]$ ps -ef |grep pmon

    grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM

    grid      3748  2934  0 21:37 pts/0    00:00:00 grep pmon

    [[email protected] Desktop]$ su - oracle

    Password:


    FROM ORACLE USER

    [[email protected] ~]$ ps -ef |grep pmon

    grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM

    oracle    3779  3755  0 21:37 pts/0    00:00:00 grep pmon

    [[email protected] ~]$ su - root

    Password:


    FROM ROOT USER

    [[email protected] ~]# ps -ef |grep pmon

    grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM

    root      3807  3783  0 21:38 pts/0    00:00:00 grep pmon

    [[email protected] ~]#

    One more thing since this is a test server only therefore password for sys is sys.

  • Pavan Kumar
    Pavan Kumar Member Posts: 11,903 Gold Crown
    edited Jul 15, 2015 12:12PM

    Hi,

    1.  storage.castrading.com is this same server from where you are trying sys connections (then man you confused this time, by so many posts)

    2. You need to first install oracle binaries, different from GRID.

    3, then during installation or after software installation you need create database (dbca). You can't kick of dbca from grid.

    Note - storage.castrading.com (I was thinking this is totally different server)

  • EdStevens
    EdStevens Member Posts: 28,158 Gold Crown
    edited Jul 15, 2015 12:13PM
    Ujjwal Rana wrote:
    
    SINCE I HAVE INSTALLED ORACLE GRID. I HAVE POSTED THE OUTPUT OF ps -ef |grep pmon from following user :
    
    FROM GRID USER [[email protected] Desktop]$ ps -ef |grep pmon grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM grid      3748  2934  0 21:37 pts/0    00:00:00 grep pmon [[email protected] Desktop]$ su - oracle Password:
    FROM ORACLE USER [[email protected] ~]$ ps -ef |grep pmon grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM oracle    3779  3755  0 21:37 pts/0    00:00:00 grep pmon [[email protected] ~]$ su - root Password:
    FROM ROOT USER [[email protected] ~]# ps -ef |grep pmon grid      2452     1  0 20:30 ?        00:00:00 asm_pmon_+ASM root      3807  3783  0 21:38 pts/0    00:00:00 grep pmon [[email protected] ~]#

    The output of the ps command is not dependent on who executes it.  You either have the privilege to execute it, or you don't.  You'll see that if you will actually examine the above results.  The only variance is the session id and parent session id in the line that reports 'grep pmon', and that is because that line is reporting your own grep command which, of course, is different as you are executing it from a different process every time.

  • Li_R
    Li_R Member Posts: 117
    edited Jul 15, 2015 12:21PM

    Hi,

          Have you installed oracle home , All the logs show you are using grid home not the actual oracle home. ??

    Thanks

    Lingesh R

  • Ujjwal Rana
    Ujjwal Rana Member Posts: 273
    edited Jul 15, 2015 12:41PM

    Pavan,

    I have already installed oracle binaries as well. Here is the complete steps which i have followed for installing oracle binaries :-

    Linux Setup steps for Oracle 11gR2 Installation with Grid

    1. Check Minimum Required RAM & Swap Space

    # free -m

    1 GB RAM

    1.5 GB swap space

    2. Check Minimum Disk space requirements:

    # df -h

    /tmp --> 1GB

    /u01 --> 8.3 GB (3.8 GB for Database Software + 4.5 for Grid Software)

    3. Install required RPMs.

    . Insert RHEL/CentOS DVD into the DVD-ROM

    # mkdir -p /stage/Disk1

    # df -h

    # cp -r /media/RH<TAB>/* /stage/Disk1

    # cd /stage/Disk1/Packages

    # rpm -ivh createrepo<TAB> deltarpm<TAB> python-deltarpm<TAB>

    # createrepo /stage/Disk1/Packages

    # cd /etc/yum.repos.d

    # vi packages.repo

    [server]

    name=server's packages

    baseurl=file:///stage/Disk1/Packages

    enabled=1

    gpgcheck=0


    # yum -y install compat-libcap1*i686* compat-libcap1*86_64* compat-libstdc+

    +*x86_64* elfutils-devel*x86_64* elfutils-libelf-devel*x86_64* gcc-c++*x86_64*

    glibc*i686* glibc-devel*i686* libaio*i686* libaio-devel*x86_64* libattr*i686*

    libcap*i686* libgcc*i686* libstdc++-devel*x86_64* libtool-ltdl*i686* ncurses-

    devel*i686* ncurses-libs*i686* nss-softokn-freebl*i686* pdksh*x86_64*

    readline*686* glibc-devel*x86_64* java*

    4. Configure Kernel

    # vi /etc/sysctl.conf

    kernel.shmall = 2097152

    kernel.shmmax = 982431744

    kernel.shmmni = 4096

    kernel.sem = 250 32000 100 128

    fs.file-max = 6815744

    fs.aio-max-nr = 1048576

    net.ipv4.ip_local_port_range = 9000 65500

    net.core.rmem_default = 262144

    net.core.rmem_max = 4194304

    net.core.wmem_default = 262144

    net.core.wmem_max = 1048576

    # sysctl -p

    5. Specify Resource Limitations

    # vi /etc/pam.d/login

    session required pam_limits.so

    # vi /etc/security/limits.conf

    oracle soft nproc 2047

    oracle hard nproc 16384

    oracle soft nofile 1024

    oracle hard nofile 65536

    grid soft nproc 2047

    grid hard nproc 16384

    grid soft nofile 1024

    grid hard nofile 65536

    6. Specify Shell Limitations

    # vi /etc/profile

    if [ \$USER = "oracle" ] || [ \$USER = "grid" ]; then

    if [ \$SHELL = "/bin/ksh" ]; then

    ulimit -p 16384

    ulimit -n 65536

    else

    ulimit -u 16384 -n 65536

    fi

    fi

    umask 022

    7. Disable SELinux

    # setenforce 0

    # vi /etc/sysconfig/selinux

    SELINUX=disabled

    8. Disable Firewall

    # iptables -F

    # service iptables save

    # chkconfig iptables off

    9. Creating OS groups and users.

    # groupadd asmadmin

    # groupadd asmdba

    # groupadd asmoper

    # groupadd oinstall

    # groupadd dba

    # groupadd oper

    # useradd -g oinstall -G dba,asmadmin,asmdba,asmoper -d /home/grid grid

    # useradd -g oinstall -G dba,oper,asmdba -d /home/oracle oracle

    # passwd grid

    # passwd oracle

    10. Creating necessary directories (INSIDE ROOT # )

    # mkdir -p /u01/app/grid

    # mkdir -p /u01/app/11.2.0/grid

    # chown -R grid:oinstall /u01

    mkdir -p /u01/app/oracle

    chown oracle:oinstall /u01/app/oracle

    chmod -R 775 /u01

    11. Specify neccessary environment variables

    # su – oracle

    $ vi .bash_profile

    ORACLE_SID=orcl; export ORACLE_SID

    ORACLE_UNQNAME=orcl; export ORACLE_UNQNAME

    JAVA_HOME=/usr/local/java; export JAVA_HOME

    ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE

    ORACLE_HOME=$ORACLE_BASE/product/11.2.0/db_1; export ORACLE_HOME

    ORACLE_TERM=xterm; export ORACLE_TERM

    NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

    TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

    ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

    PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

    PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

    PATH=${PATH}:/u01/app/common/oracle/bin

    export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib

    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

    export LD_LIBRARY_PATH

    CLASSPATH=$ORACLE_HOME/JRE

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

    export CLASSPATH

    THREADS_FLAG=native; export THREADS_FLAG

    export TEMP=/tmp

    export TMPDIR=/tmp

    umask 022


    # su - grid

    $ vi .bash_profile

    ORACLE_SID=+ASM; export ORACLE_SID

    JAVA_HOME=/usr/local/java; export JAVA_HOME

    ORACLE_BASE=/u01/app/grid; export ORACLE_BASE

    ORACLE_HOME=/u01/app/11.2.0/grid; export ORACLE_HOME

    ORACLE_TERM=xterm; export ORACLE_TERM

    NLS_DATE_FORMAT="DD-MON-YYYY HH24:MI:SS"; export NLS_DATE_FORMAT

    TNS_ADMIN=$ORACLE_HOME/network/admin; export TNS_ADMIN

    ORA_NLS11=$ORACLE_HOME/nls/data; export ORA_NLS11

    PATH=.:${JAVA_HOME}/bin:${PATH}:$HOME/bin:$ORACLE_HOME/bin

    PATH=${PATH}:/usr/bin:/bin:/usr/bin/X11:/usr/local/bin

    PATH=${PATH}:/u01/app/common/oracle/bin

    export PATH

    LD_LIBRARY_PATH=$ORACLE_HOME/lib

    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:$ORACLE_HOME/oracm/lib

    LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/lib:/usr/lib:/usr/local/lib

    export LD_LIBRARY_PATH

    CLASSPATH=$ORACLE_HOME/JRE

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/jlib

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/rdbms/jlib

    CLASSPATH=${CLASSPATH}:$ORACLE_HOME/network/jlib

    export CLASSPATH

    THREADS_FLAG=native; export THREADS_FLAG

    export TEMP=/tmp

    export TMPDIR=/tmp

    umask 022

    12. Specify Hostname

    # vi /etc/hosts

    127.0.0.1 <Hostname> localhost localhost.localdomain

    Sorry this time  I have mentioned all the complete steps for oracle installation knowingly which is somewhat long and the other reason is to provide you the clear vision of the complete oracle grid installation which i have installed in my pc.

This discussion has been closed.