11 Replies Latest reply on Nov 11, 2011 12:08 PM by TheHades0210

    ORA-12571 TNS packet writer failure

    TheHades0210
      Aloha!

      I badly need your help regarding ORA-12571: TNS:packet writer failure.

      I can access an instance using C:\> set ORACLE_SID=SID and C:\> sqlplus / as sysdba running this on the server machine it self.

      but when i try to use:

      c:> sqlplus sys\password@SID as sysdba

      I get this error:

      C:\>sqlplus sys/password@orc18 as sysdba

      SQLPlus: Release 11.2.0.1.0 Production on Thu Nov 10 14:04:57 2011

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

      ERROR:
      ORA-12571: TNS:packet writer failure
      Enter user-name:

      But when i try to run the following:

      C:\> set ORACLE_SID=SID
      C:\>sqlplus schema_name/password

      I can access the instance.

      Also I try to check the DB connection on remote users(TNS names), same error ORA-12571: TNS:packet writer failure . So all users cant access any of the instances from the server.

      Thanks,

      Hades
        • 1. Re: ORA-12571 TNS packet writer failure
          Satish Kandi
          12571, 00000, "TNS:packet writer failure"
          // *Cause: An error occurred during a data send.
          // *Action: Not normally visible to the user. For further details, turn
          // on tracing and reexecute the operation. If error persists, contact
          // Oracle Customer Support.
          • 2. Re: ORA-12571 TNS packet writer failure
            TheHades0210
            :( any other way aside from this one?or reason may be, why im having this error?
            • 3. Re: ORA-12571 TNS packet writer failure
              Oviwan
              check for firewall and antivirus. try it if you disable them...
              • 4. Re: ORA-12571 TNS packet writer failure
                TheHades0210
                the machine where DB is dsnt have a anti virus..can i disable its firewall?
                • 5. Re: ORA-12571 TNS packet writer failure
                  Oviwan
                  firewall on os level on your client (and maybe server) or enable port 1521 on the firewall
                  • 6. Re: ORA-12571 TNS packet writer failure
                    KeenOnOracle
                    ok, so if you use the listener you cannot connect

                    I had this issue but it wasn't the firewall.

                    Can you post the listener.ora for us?
                    try to change it, pointing the host address as "localhost" or even the IP Address instead the "hostname". And then try to tnsping your service.
                    If necessary, re-create the listener.

                    In my case, re-creating the listener and configuring the local ip address instead hostname or even localhost worked well, and I could then connect to the DB.

                    Hope it Helps
                    Keen
                    • 7. Re: ORA-12571 TNS packet writer failure
                      TheHades0210
                      Current listener.ora:

                      *# listener.ora Network Configuration File: C:\Oracle\app\product\11.2.0\dbhome_1\network\admin\listener.ora*
                      *# Generated by Oracle configuration tools.*

                      SID_LIST_LISTENER =
                      *(SID_LIST =*
                      *(SID_DESC =*
                      *(SID_NAME = CLRExtProc)*
                      *(ORACLE_HOME = C:\Oracle\app\product\11.2.0\dbhome_1)*
                      *(PROGRAM = extproc)*
                      *(ENVS = "EXTPROC_DLLS=ONLY:C:\Oracle\app\product\11.2.0\dbhome_1\bin\oraclr11.dll")*
                      *)*
                      *)*

                      LISTENER =
                      *(DESCRIPTION_LIST =*
                      *(DESCRIPTION =*
                      *(ADDRESS = (PROTOCOL = TCP)(HOST = hostname.domainname)(PORT = 1521))*
                      *(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))*
                      *)*
                      *)*

                      what will i modify here?

                      Thanks,
                      • 8. Re: ORA-12571 TNS packet writer failure
                        KeenOnOracle
                        The listener resides o the oracleserver?

                        is so,
                        (HOST = hostname.domainname)

                        change to (HOST = "ip address")

                        and..
                        LSNRCTL STOP LISTENER
                        LSNRCTL START LISTENER

                        tnsping your service and try again.
                        This fixed my erros twice
                        • 9. Re: ORA-12571 TNS packet writer failure
                          TheHades0210
                          Changed the host value.

                          I'm having this result when i stop and start the listener.

                          C:\>lsnrctl stop listener

                          LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-NOV-2011 18:25
                          *:53*

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

                          Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=ip address)(PORT=1521))
                          *)*
                          TNS-12571: TNS:packet writer failure
                          TNS-12560: TNS:protocol adapter error
                          TNS-00530: Protocol adapter error
                          *32-bit Windows Error: 54: Unknown error*

                          C:\>lsnrctl start listener

                          LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 - Production on 10-NOV-2011 18:26
                          *:11*

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

                          Starting tnslsnr: please wait...

                          Service OracleOraDb11g_home4TNSListener already running.
                          TNS-12560: TNS:protocol adapter error

                          C:\>

                          tnsping result:

                          C:\>tnsping tnsname

                          TNS Ping Utility for 32-bit Windows: Version 10.2.0.1.0 - Production on 10-NOV-2
                          *011 18:45:18*

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

                          Used parameter files:
                          D:\oracle\product\10.2.0\db_1\network\admin\sqlnet.ora


                          Used TNSNAMES adapter to resolve the alias
                          Attempting to contact (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (PROTOCOL = TCP)
                          *(HOST = ip address)(PORT = 1521))) (CONNECT_DATA = (SERVICE_NAME = SID)))*
                          _*

                          It seems that its stuck.

                          Hades

                          Edited by: TheHades0210 on Nov 10, 2011 6:52 PM
                          • 10. Re: ORA-12571 TNS packet writer failure
                            KeenOnOracle
                            Make sure you set up your IP on hostname, not the "word" ipaddress,
                            HOSTNAME=(192.168.0.1), etc

                            ok, so in this case, try to delete all your listeners and its services via Oracle Net Configuration Assistant.

                            And then after you have no more listeners os services you create it and test it pointing the ip address.

                            keen

                            Edited by: KeenOnOracle on Nov 10, 2011 10:49 AM
                            • 11. Re: ORA-12571 TNS packet writer failure
                              TheHades0210
                              Aloha!

                              Thanks all for the time and effort give to my issue. I solved if by creating a new Listener with a different port and deleted the the old one. after which i edited the newly created Listener, change the port to the normal 1521 port, and everything works well.

                              Once again thank you very much.

                              Regards,
                              Hades