If you search for the Oracle error “Io Exception: The Network Adapter could not establish the connection” (ORA-17002) you will find plenty of discussion on the web. It usually comes down to what the message says, that it is a network issue. But the error can also be caused by e.g. incompatible jar files. In my case, however, I was trying to access a 11g R2 instance from SQL Developer and during initial setup everything had worked. And local access, also with SQL Developer, worked absolutely fine.
Solution: Replace “simple” DB hostname with the fully qualified one. I am not sure why this changed the behavior. I can think of either a DNS setup issue (although my search list included the domain) or some kind of reverse lookup logic that is being applied. Anyway, I wanted to share this finding and also record it for my own future use.
30 thoughts on “Oracle Error 17002 “Io Exception: The Network Adapter could not establish the connection””
Thanks for the tip, it worked for me too !!
Even, I changed localhost to my machine name, it worked, and it was still working when I reverted to localhost. There must be some strange network behaviour beneath.
thank you very much!
I tried a lot of complex solutions and this was the winner, now I can continue my work, thanks again
thank you very much …!
other solution :
you make sure that you have the right DNS on your IP Address this is happened if you have 2 network
It didn’t work for me.
Thank you very much, it helped me to solve the problem I had
Thank you so much for your helping me.
it worked fo me too ! merci beacoup !!
Awesome tip! worked for me too…it was a dns issue
Hey, what’s the difference between “simple DB hostname” and “fully qualified DB hostname”? some example pls because I’m not sure did I understand it right? 🙂
Simple name is e.g. “dbserver” whereas fully qualified one is “dbserver.mycomany.com”. Does that help?
Where can I find fully qualified name? I tried with select * from global_name, but I got same name as simple name….
The fully qualified hostname is part of the machine’s network setup and only indirectly part of Oracle
It worked like a charm!!!Thanks
Awesome tip!!! It worked for me..
I tried everything, it doesn’t work. Finally i tried by using connection type as local/Bequeath. Then it worked for me.
Other solution: In your application data-source change the connect string from
“jdbc:oracle:thin:@host:port:sid” (short connection string)
“jdbc:oracle:thin:@(DESCRIPTION= (ADDRESS = (PROTOCOL = TCP)
(HOST = host)
(PORT = port)
)” (full server string)
Super… Used the fully qualified hostname and it worked. Thanks.
Thanks worked for me 🙂
Hello All ,
I have tried all these techniques but still my facing same issue.
1- I have data source on my local websphere6.1 and when do test connection from web console server ,it was successful but when i tried to do the same it giving me error
” java.sql.SQLException: Io exception: The Network Adapter could not establish the connectionDSRA0010E: SQL State = null, Error Code = 17,002″
Note : I am connection to remote oracle db.
in my machine , i have only raid & web sphere installed.
Please any body help me.
Advance thank you
It c an be bacause of the wrong credentials of the service name. I changed my system credentials which i was using for the service, the moment i updated that it worked for me. Thanks..!!
@Lucas Silva: perfect, your my hero!
I got this error but the hostname is the fully one
I changed to localhost and it worked fine
Thanks a lot Sir
It worked for me.Thanks
Best solution. Thanks
i tried this solution but it did not work for me.
but…after many tests i found out that it was the antivirus’s web protection that was preventing the sockets connection.
after disactivating web protection service, connection to DB became succesful
9 YEARS AFTER, AND IT STILLS HELPING! ISSUE SOLVED! “OBRIGADO” FROM BRAZIL!
Check if you are connected to any vendor VPN. They too block the connection network.