What is the cause of this problem "IO Error: The Network Adapter could not establish the connection" on Sql Developer?

13,279

You're trying to connect to a machine on a network that SQL Developer is unable to reach.

For a TNS connection, Look at the appropriate TNSNames entry (you will have a tnsnames.ora) file, and find the IP address or network name associated with the connection you're trying to establish -

enter image description here And then start by trying to ping that resource.

In this case, i'm trying to talk to a database on MY machine, on port 1521. Yours should look quite different.

If you're using a basic connection, then you can look at the connection properties and see what machine/port you're trying to communicate with.

Ping

enter image description here

If you can't reach that machine from your machine, there's zero chance you can connect to a database there.

So, always start with a ping.

Once you see that you can get to that machine, if you're still getting that message, the next thing to think about is blocked ports, the listener defaults to port 1521, but you'll see that in the TNS descriptor as well.

Share:
13,279

Related videos on Youtube

Boonrung Kasemsak
Author by

Boonrung Kasemsak

Updated on June 04, 2022

Comments

  • Boonrung Kasemsak
    Boonrung Kasemsak about 2 years

    I make a connection for connect to the Database Server (other machine). Then I found "An error was encountered performing the requested operation: IO Error: The Network Adapter could not establish the connection Vendor code 17002".

    Please look the picture in URL below.

    error message

    I tried to make a connection but can't access but my team can access it. My friend used TNS connection type and I did everthing similar him but can't access. I tried to use JDBC thin for connect but can't also.

    I had the old connection which I can connect but why I can't connect the new connection.

    • deHaar
      deHaar over 4 years
      Can you show us the code that connects?
    • Boonrung Kasemsak
      Boonrung Kasemsak over 4 years
      @deHaar I used GUI for make a connection, Do you need the capture ?
    • deHaar
      deHaar over 4 years
      Do you mean this is not about Java code? Don't you have the Java code that tries to connect?
    • Boonrung Kasemsak
      Boonrung Kasemsak over 4 years
      Yes,I'm not. No, I'm not. Just GUI on sql developer.
    • deHaar
      deHaar over 4 years
      Well, since the message is talking about a Network Adapter, I guess you have to check the LAN connectivity of the computer you are using.
    • Boonrung Kasemsak
      Boonrung Kasemsak over 4 years
      I double checked already about LAN cable, I can ping to that mchine.
  • Boonrung Kasemsak
    Boonrung Kasemsak over 4 years
    I can ping to that machine. Is it possible my machine has been block or something like that ? Because my team can connect normally but can't connect only me laptop. I tried to fix this for 2 day ago.
  • thatjeffsmith
    thatjeffsmith over 4 years
    Are you on the same network as your team? Yes, it's possible the listener port is protected by a firewall
  • Gangnus
    Gangnus about 4 years
    @thatjeffsmith Thank you, Jeff. +1. I have allowed my ports by rules in the firewall. And still, I have no connection to host/port by telnet. Can something else prevent me from connecting? My remote host should be connected by VPN. And I can ping to it.
  • thatjeffsmith
    thatjeffsmith about 4 years
    you'll get the same error if your PORT number is wrong. say i have the listener running on port 1521, but in my connection i put 1522 - it has the same effect. Make sure your port is correct