Forum Stats

  • 3,825,487 Users
  • 2,260,518 Discussions
  • 7,896,547 Comments

Discussions

IO Error Establishing connection Network Adapter Could not

neeshu
neeshu Member Posts: 18
edited May 22, 2012 4:05AM in SQL Developer
I am now getting 12514 error please read the bottom of the page if you wish to help thanks


Hi,
I have downloaded sql developer 3.1.07 and jdk 7u4 i am running oracle 10g on red hat linux
The sql plus works fine but when i tried to connect with sql developer software it gave me an error saying


Status: Failure - Test Failed: Io exception: The Network Adapter could not establish the connection

i tried pinging the localhost it was fine
but when i tried pinging

tnsping localhost <-- no listner
tnsping orcl <-- no listner

i got above errors

how should i approach the problem please help me i am new to oracle




*********************************************************************
One of the solutions said that you need to copy everything from listener.ora but i it didn't work am i doing things right

sid -->PLSExtProc
host--> localhost.localdomain

**********************************************************************

# listener.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/listener.ora
# Generated by Oracle configuration tools.

SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = PLSExtProc)
(ORACLE_HOME = /u01/app/oracle/product/10.2.0/db_1)
(PROGRAM = extproc)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
)
)

Edited by: 891355 on May 17, 2012 6:47 AM

Edited by: neeshu on May 19, 2012 11:28 AM
Tagged:

Best Answer

  • Jim Smith
    Jim Smith Member Posts: 2,873 Silver Trophy
    Answer ✓
    Providing both database and listner are running you should be able to connect through sql developer, specifying localhost.localdomain, 1521 and orcl in the connection properties.

    You can set up the listener and database to start on boot. This is well documented in the manuals and around the web. Try googling "autostart oracle database linux" and "autostart listener linux"
«1

Answers

  • Jim Smith
    Jim Smith Member Posts: 2,873 Silver Trophy
    It likely that SQL*PLus is using a direct connection to ORACLE_SID and isn't using a listener. To use JDBC connections through SQL Developer you need a listener.

    As the oracle user on the database server, try
    lsnrctl status
    If that shows that a listener isn't running, try
    lsnrctl start
    Jim Smith
  • 938329
    938329 Member Posts: 1
    hi,
    i have install sql developer in window 7 and tried to create database but its show error as Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection
    please help me out.

    Thanks & Regards,
    Jeevan
  • neeshu
    neeshu Member Posts: 18
    Thanks a lot Jim I will try that and let you know if it worked or not
  • neeshu
    neeshu Member Posts: 18
    I ran the status which gave an error saying no listener then i ran the start lsnrctl command and it worked after which when I tried connecting with SQLDeveloper
    I was given an error saying

    Status : Failure -Test failed: Listener refused the connection with the following error:
    ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
  • Gary Graham-Oracle
    Gary Graham-Oracle Member Posts: 3,256 Bronze Crown
    Hi,

    Now that your listener is running, executing lsnrctl status will show you all available services. From your earlier post I would guess ORCL may not be there, but possibly XE ? Hopefully you will see a familiar service in the list. If not, since this is the SQL Developer forum, let's try investigating this problem with the SQL Developer tool itself.

    Right click on the connection of interest in the Navigator tree and select Properties. I assume the Connection Type is Basic. If you switch to a Connection Type of TNS, the Network Alias drop-down should display the available TNS names of the services your listener knows about. The list of names should be similar to what lsnrctl status displays.

    If you are unable to connect using any of these TNS Aliases, make sure you don't have multiple tnsnames.ora* files. SQL Developer's tendency to read all such files can cause confusion. If this is the case remove the extra files or, if they are in multiple directories, at least use Tools|Preferences|Database|Advanced|Tnsnames Directory to limit the search to a single directory. If none of this works, then perhaps your tnsnames is not configured correctly and you need to use something like the Net Configuration Assistant to correct it.

    Hope this helps,
    Gary
    Gary Graham-Oracle
  • neeshu
    neeshu Member Posts: 18
    edited May 19, 2012 2:27PM
    Thanks Gary I tried the lsnrctl status command and it gave me the listener as PLSExtProc

    Then when i tried logging in with the tns connection type there were 3 tns name servers ==> Book orcl and PLSExtProc

    I went to the tnsnames.ora and removed the code of book and the other name server with just orcl left and left the backup on desktop
    but this time, sql developer showed me 2 instances of orcl and the other two book and plsextproc as well

    I am getting 12514 error should i post the tnsname.ora file here

    I tried setting the tools>database>preferences to admin folder but it picked up multiple instances of the tnsnames now I have 6 tns names ==> 2 book 2 orcl and 2 prlsext



    Here is tnsnames.ora file contents


    # tnsnames.ora Network Configuration File: /u01/app/oracle/product/10.2.0/db_1/network/admin/tnsnames.ora
    # Generated by Oracle configuration tools.

    BOOK =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = book)
    )
    )

    ORCL =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost.localdomain)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = orcl)
    )
    )

    EXTPROC_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
    )
    (CONNECT_DATA =
    (SID = PLSExtProc)
    (PRESENTATION = RO)
    )
    )


    Please help thank you

    Edited by: neeshu on May 19, 2012 11:25 AM
  • Jim Smith
    Jim Smith Member Posts: 2,873 Silver Trophy
    edited May 20, 2012 8:12AM
    It may be that your databaase service isn't running, and is therefore not registered with the listener.

    In a command window, try
     sqlplus "/ as sysdba"
    SQL> startup
    exit
    Edited by: Jim Smith on May 20, 2012 1:12 PM
  • neeshu
    neeshu Member Posts: 18
    hi jim i am able to connect to database using sqlplus startup works fine and so does shut down do you think the problem has something to do with red hat
  • Jim Smith
    Jim Smith Member Posts: 2,873 Silver Trophy
    Start up the database, then wait a minute of so, and then try 'lsnrctl status', and post the output here.

    Once the database is up, it should resgister itself as a service with the listener and you should be able to see what you should be trying to connect to.

    Note that on Linux, SIDs are case sensitive,so ORCL isn't the same as orcl. Services should be case INsensitive.
  • neeshu
    neeshu Member Posts: 18
    edited May 20, 2012 9:14AM
    This is the error i got


    LSNRCTL for Linux: Version 10.2.0.1.0 - Production on 20-MAY-2012 18:29:14

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=localhost.localdomain)(PORT=1521)))
    TNS-12541: TNS:no listener
    TNS-12560: TNS:protocol adapter error
    TNS-00511: No listener
    Linux Error: 111: Connection refused



    here is the screenshot

    [http://imageshack.us/photo/my-images/717/screenshotxls.jpg/]

    Edited by: neeshu on May 20, 2012 6:13 AM
This discussion has been closed.