This discussion is archived
7 Replies Latest reply: Oct 15, 2012 11:51 PM by 966743 RSS

SQL Developer - Failed - The network adapter could not establish connection

964955 Newbie
Currently Being Moderated
I have a new install of SuSE Linux Enterprise Server 11 SP2, and a new install of Oracle 11g R2 Enterprise Server, both are up and running. I just installed SQL Developer 3.2.10.09, and went to create its 1st connection, and I run a test connection and get this error:

Status : Failure -Test failed: The Network Adapter could not establish the connection

The listener is up
The Database is started

I can connect to the DB via SQLPlus and as sysdba.

With SQL Developer I tried to connect with a oracle user account 'oracle'

Connection name: Prometheus
Username: oracle
Password: ********
Connection type: Basic Role Type: Default
Hostname: prometheus.gateway.2wire.net
Port: 1521
Service name: orcl

Please let me know what other details I can share or results I can copy/paste to learn more of the configuration so this issue can be resolved.

Thanks, user5454437
  • 1. Re: SQL Developer - Failed - The network adapter could not establish connection
    964955 Newbie
    Currently Being Moderated
    Just giving this a bump, and adding new info

    here is my /pfile init.ora.824201220113 contents


    ##############################################################################
    # Copyright (c) 1991, 2001, 2002 by Oracle Corporation
    ##############################################################################

    ###########################################
    # Cache and I/O
    ###########################################
    db_block_size=8192

    ###########################################
    # Cursors and Library Cache
    ###########################################
    open_cursors=300db_domain=""
    db_name=orcl

    ###########################################
    # File Configuration
    ###########################################
    control_files=("/opt/oracle/oradata/orcl/control01.ctl", "/opt/oracle/flash_recovery_area/orcl/control02.ctl")
    db_recovery_file_dest=/opt/oracle/flash_recovery_area
    db_recovery_file_dest_size=4070572032

    ###########################################
    # Miscellaneous
    ###########################################
    compatible=11.2.0.0.0
    diagnostic_dest=/opt/oracle
    memory_target=2401239040processes=150

    ###########################################
    # Security and Auditing
    ###########################################
    audit_file_dest=/opt/oracle/admin/orcl/adump
    audit_trail=db
    remote_login_passwordfile=EXCLUSIVE

    ###########################################
    # Shared Server
    ###########################################
    dispatchers="(PROTOCOL=TCP) (SERVICE=orclXDB)"

    ###########################################
    # System Managed Undo and Rollback Segments
    ###########################################
    undo_tablespace=UNDOTBS1

    Here is my init.ora file contents:

    db_name='ORCL'
    memory_target=1G
    processes = 150
    audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
    audit_trail ='db'
    db_block_size=8192
    db_domain=''
    db_recovery_file_dest='<ORACLE_BASE>/flash_recovery_area'
    db_recovery_file_dest_size=2G
    diagnostic_dest='<ORACLE_BASE>'
    dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
    open_cursors=300
    remote_login_passwordfile='EXCLUSIVE'
    undo_tablespace='UNDOTBS1'
    # You may want to ensure that control files are created on separate physical
    # devices
    control_files = (ora_control1, ora_control2)
    compatible ='11.2.0'

    Here is my listener status:
    ./lsnrctl status

    LSNRCTL for Linux: Version 11.2.0.1.0 - Production on 28-SEP-2012 10:26:02

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

    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
    STATUS of the LISTENER
    ------------------------
    Alias LISTENER
    Version TNSLSNR for Linux: Version 11.2.0.1.0 - Production
    Start Date 28-SEP-2012 10:25:53
    Uptime 0 days 0 hr. 0 min. 9 sec
    Trace Level off
    Security ON: Local OS Authentication
    SNMP OFF
    Listener Parameter File /opt/oracle/11gR2db/network/admin/listener.ora
    Listener Log File /opt/oracle/diag/tnslsnr/Prometheus/listener/alert/log.xml
    Listening Endpoints Summary...
    (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(KEY=EXTPROC1521)))
    (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=Prometheus.gateway.2wire.net)(PORT=1521)))
    The listener supports no services
    The command completed successfully


    Please let me know what else I can provide for help!

    Thanks, Jay
  • 2. Re: SQL Developer - Failed - The network adapter could not establish connection
    Jim Smith Expert
    Currently Being Moderated
    This error usually means that there is a fundamental network error (wrong hostname, wrong port etc).

    Can you ping prometheus.gateway.2wire.net?

    Can you telnet to prometheus.gateway.2wire.net on port 21?

    IF you do, tnsping servicename (whatever service name you use when connection through sqlplus) do the values returned match what you have put in your sqldeveloper connection definition.
  • 3. Re: SQL Developer - Failed - The network adapter could not establish connection
    964955 Newbie
    Currently Being Moderated
    Thanks for replying--

    I pinged prometheus and got no response:

    Prometheus:/opt/oracle/11gR2db/bin> ping prometheus.gateway.2wire.net
    PING prometheus.gateway.2wire.net (192.168.0.2) 56(84) bytes of data.
    From 12.83.34.137: icmp_seq=6 Destination Net Unreachable

    I tried to telnet with no success:

    telnet> open
    (to) prometheus
    Trying 192.168.1.66...
    telnet: connect to address 192.168.1.66: Connection refused
    Prometheus:/opt/oracle/11gR2db/bin> ./tnsping orcl

    I did a tnsping:

    TNS Ping Utility for Linux: Version 11.2.0.1.0 - Production on 28-SEP-2012 15:10:31

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

    Used parameter files:
    /opt/oracle/11gR2db/network/admin/sqlnet.ora


    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = prometheus)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (110 msec)

    And here is the content of that sqlnet.ora file:
    Prometheus:/opt/oracle/11gR2db/bin> cat /opt/oracle/11gR2db/network/admin/sqlnet.ora
    # sqlnet.ora Network Configuration File: /opt/oracle/11gR2db/network/admin/sqlnet.ora
    # Generated by Oracle configuration tools.

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    ADR_BASE = /opt/oracle


    This is what I input into SQL Developer to attempt to connect to the DB:

    Conection name: Prometheus
    Username: oracle
    password: ********
    Connection type: Basic Role: Default
    Hostname: Prometheus.gateway.2wire.net
    port: 1521
    Service anme: orcl

    And it fails as previously mentioned. The failure to ping Prometheus and fail at the telnet connection is not good, and I'm sure explains a lot. Any ideas as to where to start to get this thing connecting?

    Whats odd is the server side, I can get out to the Internet. There server side, I can startup and shutdown with out error, and connect to it with SQLPlus / as sysdaba no problem.

    I'm willing to bet something in the network config files used by oracle perhaps, but not sure what or where.
  • 4. Re: SQL Developer - Failed - The network adapter could not establish connection
    rp0428 Guru
    Currently Being Moderated
    >
    I did a tnsping:

    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = prometheus)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))
    OK (110 msec)
    >
    And the result was OK when you used HOST = prometheus.

    So why did you use this in sql developer?
    >
    Hostname: Prometheus.gateway.2wire.net
    >
    Also - your listener status results show
    >
    The listener supports no services
    >
    So use the correct host name and make sure the database is up and running.

    If the above doesn't fix the problem post on the 'General Database' forum. Ed Stevens is an expert on connectivity issues and is active in that forum. You should also read his articles dealing with connection issues.
    Here are two of them (there are more on his site)

    'Help! I can’t connect to my database'
    http://edstevensdba.wordpress.com/2011/02/09/sqlnet_overview/

    ora-12154/tns-03505
    http://edstevensdba.wordpress.com/2011/02/26/ora-12154tns-03505/
  • 5. Re: SQL Developer - Failed - The network adapter could not establish connection
    964955 Newbie
    Currently Being Moderated
    Thanks for your feedback rp0428, this were the issues.I had the listener up at the right times in the past, but didnt then. The main problem was not using the same exact hostname. Also, I had previously made a basic oracle user account, long story short, it didnt work. So with SQLplus command lines, I created a new user, and password, and then used that to login to the system. All is well! This has been quite a journey getting everything in place. Thanks!
  • 6. Re: SQL Developer - Failed - The network adapter could not establish connection
    rp0428 Guru
    Currently Being Moderated
    Glad you found the problem. Please mark the question ANSWERED.
  • 7. Re: SQL Developer - Failed - The network adapter could not establish connection
    966743 Newbie
    Currently Being Moderated
    hii all i am also getting sam e error here ia m pasting my sql.net ora,tnsname.ora and listener.ora


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

    ADR_BASE_AMPLEX_GRAND1 = C:\app1\Administrator

    SID_LIST_LISTENER =
    (SID_LIST =
    (SID_DESC =
    (SID_NAME = CLRExtProc)
    (ORACLE_HOME = C:\app1\Administrator\product\11.2.0\dbhome_1)
    (PROGRAM = extproc)
    (ENVS = "EXTPROC_DLLS=ONLY:C:\app1\Administrator\product\11.2.0\dbhome_1\bin\oraclr11.dll")
    )
    (SID_DESC =
    (GLOBAL_DBNAME = Grand1)
    (ORACLE_HOME = C:\app1\Administrator\product\11.2.0\dbhome_1)
    (SID_NAME = Grand1)
    )
    )

    LISTENER =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
    )

    ADR_BASE_LISTENER = C:\app1\Administrator

    AMPLEX_GRAND1 =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )

    # sqlnet.ora Network Configuration File: C:\app1\Administrator\product\11.2.0\dbhome_1\network\admin\sqlnet.ora
    # Generated by Oracle configuration tools.

    # This file is actually generated by netca. But if customers choose to
    # install "Software Only", this file wont exist and without the native
    # authentication, they will not be able to connect to the database on NT.

    SQLNET.AUTHENTICATION_SERVICES= (NTS)

    NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)

    # tnsnames.ora Network Configuration File: C:\app1\Administrator\product\11.2.0\dbhome_1\network\admin\tnsnames.ora
    # Generated by Oracle configuration tools.

    GRAND1 =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = Grand1)
    )
    )

    ORACLR_CONNECTION_DATA =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
    )
    (CONNECT_DATA =
    (SID = CLRExtProc)
    (PRESENTATION = RO)
    )
    )

    LISTENER_GRAND1 =
    (ADDRESS = (PROTOCOL = TCP)(HOST = HEMANT-PC.mshomenet)(PORT = 1521))


    help me what to do

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points