Ошибка ввода вывода the network adapter could not establish the connection sql developer

I created a database using SQL developer list of 1000 entries and it created successfully. The connection also succeeded. But today while I’m trying to connect there is an error occurring:

IO Error: The Network Adapter could not establish the connection in SQL developer

I can surely say it is not connecting I tried it in Command prompt also in prompt it is mentioning as Protocol Adapter Error.

What is the problem here?

What is meant by Protocol Adapter Error how can i overcome it?

What is Network Adapter Error?

Aruna's user avatar

Aruna

11.9k3 gold badges28 silver badges42 bronze badges

asked Jul 2, 2014 at 6:56

Dhivya's user avatar

0

Please check the listener to see if it is down:-

ps -ef | grep tns

If you dont find the output of the listener then you have to start it. To do that type start in the LSNRCTL> prompt.

From the Oracle forum:

If the Oracle clients have been installed with 11.1.2.3 the TNS_ADMIN
will be point to user_projectsconfigdbclient In
that folder there should be a tnsnames.ora, if the Oracle DB is on the
same machine you may want to copy the contents of database tnsnames
folder to the TNS_ADMIN folder or as suggested change the environment
variable.

answered Jul 2, 2014 at 7:00

Rahul Tripathi's user avatar

Rahul TripathiRahul Tripathi

167k31 gold badges278 silver badges331 bronze badges

You need to follow few steps .

  1. Go to the directory «C:oraclexeapporacleproduct11.2.0servernetworkADMIN»
  2. Open tnsnames.ora file and change the host. Generally localhost in your case

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
    )
    
  3. Open listener.ora file and change the listener host name to localhost.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )
    
  4. Open command prompt as administrator. Check for the listener status.

    c:> lsnrctl status
    

    If you find listener is up then you can be able to connect to the sql developer. Other wise start the listener by using below command.

    c:> lsnrctl start
    

    Now you can be able to login to sql developer without the above mentioned error.

answered Jun 8, 2018 at 10:14

Ananta Chandra Das's user avatar

1

SQL Developer problem: The network adapter could not establish the connection

  1. Open the file sqldeveloper.conf in wordpad or your favourite text editor. The file is placed in the installation directory, probably:

    %programfiles%sqldevelopersqldeveloperbinsqldeveloper.conf
    
  2. Add the following line at the bottom of the file and save:

    AddVMOption -Djava.net.preferIPv4Stack=true
    
  3. Restart SQL Developer.

answered Apr 10, 2018 at 12:36

Robert's user avatar

1

I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

to

(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))

I also added an entry in the /etc/hosts file.

you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator’s Guide for more information on how to do it using net manager.

Also you can use the service name (database_name.domain_name) instead of SID while making the connnection.

Hope this helps.

answered Dec 16, 2014 at 19:28

scv's user avatar

scvscv

4905 silver badges14 bronze badges

the answer for your question is some times the listener will be shut-down at this point it will not allow you to connect to the database, for example when the machine restarts.
Solution is : Go to services check the Oracle_ora Db —> tns_listener is in running mode are not if not restart the services.

answered Apr 1, 2015 at 9:50

Hemanth Kumar's user avatar

I had a similar issue with oracle running on my suse vm.
This fixed the problem:
1.) Removed the file listener.ora.
2.) Made listener part of tnsnames.ora

LISTENER_MDB1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

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

There may be a better solution though.

answered Jun 30, 2015 at 5:14

ssv's user avatar

ssvssv

1251 silver badge11 bronze badges

3

In my case I need to set Hostname like «my-oracle-server-name», not by ip (192.168.1.23)

answered Oct 9, 2017 at 12:34

Vlad's user avatar

VladVlad

97714 silver badges17 bronze badges

I had this issue but finally found a solution.
Follow the next steps.

  1. Stop all services that you hace runnig about oracle
  2. Please check your ip configuration in a console(windows command ipconfig, linux command ifconfig), save that ip
  3. Change the ip than you have in the following files:
    listener.ora
    tnsnames.ora
  4. Start all services that you stoped

The previous steps should have solved the issue.

Note: if you don’t want to repeat the above steps every time you restart your computer, just put in the ip addresses 127.0.0.1 in the files.

answered Jul 6, 2021 at 14:56

Xavier Angeles's user avatar

Problem

Please note that I changed details for security purposes. However, the problem remains intact.

I installed an Oracle 11g database on a server at location, say, herp-devDV.derp.edu.
Now I have another Oracle 11g database on a server at location, say, derp-db.derp.edu.

I entered the connection name, username, password, hostname, and service name in Oracle SQL developer for both herp-devDV.derp.edu and derp-db.derp.edu. I can connect to schema in derp-db.derp.edu, but not herp-devDV.derp.edu. It gives me this message:

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

Details

I have the following information:

  • Port 1521 is not open for either server when I telnet
  • My listener is up and running for both.
  • I can access derp-db.derp.edu on Oracle SQL Developer.
  • Oracle client is on my local machine + Oracle SQL Developer
  • I can remote desktop to both servers

What I have done

  • Googled
  • Stackoverflow
  • Ran stop and start lnrctl commands
  • On herp-devDB.derp.edu I ran lsnrctl status

I received the following output

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.1.0 - Production
Start Date                03-JUN-2014 13:37:22
Uptime                    6 days 0 hr. 53 min. 4 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   D:oracleproduct11.2.0dbhome_1networkadminlistener.ora
Listener Log File         d:oraclediagtnslsnrHERP-DEVDBlisteneralertlog.xml
Listening Endpoints Summary...
  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=\.pipeEXTPROC1521ipc)))
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=HERP-DEVDB.derp.edu)(PORT=1521)))
Services Summary...
Service "CLRExtProc" has 1 instance(s).
  Instance "CLRExtProc", status UNKNOWN, has 1 handler(s) for this service...
Service "HERPDEVDBXDB" has 1 instance(s).
  Instance "herpdevdb", status READY, has 1 handler(s) for this service...
Service "herpdevdb" has 1 instance(s).
  Instance "herpdevdb", status READY, has 1 handler(s) for this service...
The command completed successfully

I then check out my listener.ora and find

  SID_LIST_LISTENER =
  (SID_LIST =
    (SID_DESC =
      (SID_NAME = CLRExtProc)
      (ORACLE_HOME = D:oracleproduct11.2.0dbhome_1)
      (PROGRAM = extproc)
      (ENVS = "EXTPROC_DLLS=ONLY:D:oracleproduct11.2.0dbhome_1binoraclr11.dll")
    )
  )

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
      (ADDRESS = (PROTOCOL = TCP)(HOST = HERP-DEVDB.derp.edu)(PORT = 1521))
    )
  )

At this point, I confess I am scratching my head as I don’t see anything sticking out and telling me why this should not be working.

The only clue is when I check derp-db.derp.edu and run the command lsnrctl status. Please
see excerpt below:

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=DERP-DB.edu)(PORT=1521)))
STATUS of the LISTENER
------------------------
Alias                     LISTENER
Version                   TNSLSNR for 64-bit Windows: Version 11.2.0.3.0 - Production
Start Date                18-MAY-2014 02:19:01
Uptime                    22 days 12 hr. 23 min. 18 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
---etc----

So I am still scratching my head. Why would derp-db be connecting to the DERP-DB.edu but herp-devDB is connecting to EXTPROC1521? How do I fix this? The listener.ora and other files between these two servers are almost identical except for the name of the instances.
Hmmm.

  • EDIT1: I changed the listener.ora in herp. This didn’t fix it.

  • EDIT2: I cannot telnet into derp-db.derp.edu on port 1521. But I can still connect to it with SQL Developer? Wth?

  • EDIT3 I cannot telnet into herp-devdb.derp.edu on port 1521 either.
  • EDIT4 I cannot ping IP addresses of either server.

Anyway assistance would be greatly appreciated. Thanks

Regards,
Geeky

Всем Доброго времени суток! Взялся за изучение сервлетов, там нужна бд oracle(это принципиально) и вот уже несколько дней пытаюсь перейти от борьбы с ней к самому sql. Итак нужно подключить бд к sql developer получаю вот

это

1c222c1f244a441b9c05b54bf6649967.png

.

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

.
При чем вчера я это сделал, бд подключалось, а сегодня споткнулся о другие грабли, решил проверить работает ли то что вчера делал, а оно не работает.

Подскажите в чем ошибка или в какую сторону копать?
Заранее Спасибо!

p.s. ОС Fedora 21.

Hey guys! Have you ever faced the TNS IO error saying “The network adapter could not establish the connection”? when you are trying to make a new connection in SQL Developer or logging on to the database using SQL*Plus editor. If yes then you are at the right place because here in this blog I am going to show you how you can solve this error. 

sql error the network adapter could not establish connection by manish sharma

So without further ado let’s proceed to solve this badass TNS error.

Step 1: Make sure your entries are correct

First of all to solve “The network adapter could not establish the connection” error, check whether you have entered the correct username and password as well as the correct Hostname and Port number. Though these are small things we cannot avoid them. After all “It’s the small things in a relationship that means the most.” 

For the valid hostname and port number, you can check the Listener.ora if you have access to your server as the listener is a server process. In case you don’t have access to listener.ora file then you can check the tnsnames.ora file.

In case of Listener.ora file check for Host and Port entry in Listener tag for valid hostname and port number. 

sql error the network adapter could not establish connection by manish sharma

Listener.ora

And if you are using TNSnames.ora file for validating the hostname and port number then search for the entry which has the same name as your SID and then check for host and port number entry in that particular tag.

sql error the network adapter could not establish connection by manish sharma

TNSnames.ora

Now try connecting. If this solves your problem then you can avoid the next step. But if “The network adapter could not establish the connection” error is still there, then don’t worry just follow the next step.

Step 2: Is your listener taking a rest?

If your problem is still there and you haven’t gotten rid of that nasty error then there is a possibility that your Listener is not running. To check whether Listener is up and running or not, simply open up your command prompt with Administrative privileges and Write 

C:> lsnrctl status

This command will show you the status of your listener. If the output of this command looks like the one shown in the picture below then it clearly means your listener is not running thus next what you have to do is to start the listener. 

sql error the network adapter could not establish connection by manish sharma

To start the listener you just have to write

C:> lsnrctl start.

This will start your listener and most probably solve your problem.

Info Byte:
In case you are having problems in starting your listener then try starting “OracleOraDb11g_home1TNSListener” windows service. For that open your Run Command and write services.msc this will open your service panel. Here search for the same and right click to start it.

That’s all you have to do. This must solve the “The network adapter could not establish the connection” error. May the force be with you. Enjoy.

Also, click here to learn how to do initial configuration of Orcale Enterprise Manager to start working with it. 

If you find this helpful then please do share it on your social network and help me reach out to more people. Also if you have other queries then reach out to me on my Facebook Page & Twitter. Thanks, guys & have a great day!

SQL Developer FAQ

I created a database using SQL developer list of 1000 entries and it created successfully. The connection also succeeded. But today while I’m trying to connect there is an error occurring:

IO Error: The Network Adapter could not establish the connection in SQL developer

I can surely say it is not connecting I tried it in Command prompt also in prompt it is mentioning as Protocol Adapter Error.

What is the problem here?

What is meant by Protocol Adapter Error how can i overcome it?

What is Network Adapter Error?

Aruna's user avatar

Aruna

11.9k3 gold badges28 silver badges42 bronze badges

asked Jul 2, 2014 at 6:56

Dhivya's user avatar

0

Please check the listener to see if it is down:-

ps -ef | grep tns

If you dont find the output of the listener then you have to start it. To do that type start in the LSNRCTL> prompt.

From the Oracle forum:

If the Oracle clients have been installed with 11.1.2.3 the TNS_ADMIN
will be point to user_projectsconfigdbclient In
that folder there should be a tnsnames.ora, if the Oracle DB is on the
same machine you may want to copy the contents of database tnsnames
folder to the TNS_ADMIN folder or as suggested change the environment
variable.

answered Jul 2, 2014 at 7:00

Rahul Tripathi's user avatar

Rahul TripathiRahul Tripathi

165k31 gold badges271 silver badges327 bronze badges

You need to follow few steps .

  1. Go to the directory «C:oraclexeapporacleproduct11.2.0servernetworkADMIN»
  2. Open tnsnames.ora file and change the host. Generally localhost in your case

    XE =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = XE)
    )
    )
    
  3. Open listener.ora file and change the listener host name to localhost.

    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1))
      (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))
    )
    )
    
  4. Open command prompt as administrator. Check for the listener status.

    c:> lsnrctl status
    

    If you find listener is up then you can be able to connect to the sql developer. Other wise start the listener by using below command.

    c:> lsnrctl start
    

    Now you can be able to login to sql developer without the above mentioned error.

answered Jun 8, 2018 at 10:14

Ananta Chandra Das's user avatar

1

SQL Developer problem: The network adapter could not establish the connection

  1. Open the file sqldeveloper.conf in wordpad or your favourite text editor. The file is placed in the installation directory, probably:

    %programfiles%sqldevelopersqldeveloperbinsqldeveloper.conf
    
  2. Add the following line at the bottom of the file and save:

    AddVMOption -Djava.net.preferIPv4Stack=true
    
  3. Restart SQL Developer.

answered Apr 10, 2018 at 12:36

Robert's user avatar

1

I had a similar issue where I also continuously got the same error. I tried many things like changing the listener port number, turning off the firewall etc. Finally I was able to resolve the issue by changing listener.ora file. I changed the following line:

(ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

to

(ADDRESS = (PROTOCOL = TCP)(HOST = hostname)(PORT = 1521))

I also added an entry in the /etc/hosts file.

you can use Oracle net manager to change the above line in listener.ora file. See Oracle Net Services Administrator’s Guide for more information on how to do it using net manager.

Also you can use the service name (database_name.domain_name) instead of SID while making the connnection.

Hope this helps.

answered Dec 16, 2014 at 19:28

scv's user avatar

scvscv

4905 silver badges14 bronze badges

the answer for your question is some times the listener will be shut-down at this point it will not allow you to connect to the database, for example when the machine restarts.
Solution is : Go to services check the Oracle_ora Db —> tns_listener is in running mode are not if not restart the services.

answered Apr 1, 2015 at 9:50

Hemanth Kumar's user avatar

I had a similar issue with oracle running on my suse vm.
This fixed the problem:
1.) Removed the file listener.ora.
2.) Made listener part of tnsnames.ora

LISTENER_MDB1 =
  (ADDRESS = (PROTOCOL = TCP)(HOST = localhost)(PORT = 1521))

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

There may be a better solution though.

answered Jun 30, 2015 at 5:14

ssv's user avatar

ssvssv

1261 silver badge11 bronze badges

3

In my case I need to set Hostname like «my-oracle-server-name», not by ip (192.168.1.23)

answered Oct 9, 2017 at 12:34

Vlad's user avatar

VladVlad

89912 silver badges17 bronze badges

I had this issue but finally found a solution.
Follow the next steps.

  1. Stop all services that you hace runnig about oracle
  2. Please check your ip configuration in a console(windows command ipconfig, linux command ifconfig), save that ip
  3. Change the ip than you have in the following files:
    listener.ora
    tnsnames.ora
  4. Start all services that you stoped

The previous steps should have solved the issue.

Note: if you don’t want to repeat the above steps every time you restart your computer, just put in the ip addresses 127.0.0.1 in the files.

answered Jul 6, 2021 at 14:56

Xavier Angeles's user avatar

Hey guys! Have you ever faced the TNS IO error saying “The network adapter could not establish the connection”? when you are trying to make a new connection in SQL Developer or logging on to the database using SQL*Plus editor. If yes then you are at the right place because here in this blog I am going to show you how you can solve this error. 

sql error the network adapter could not establish connection by manish sharma

So without further ado let’s proceed to solve this badass TNS error.

Step 1: Make sure your entries are correct

First of all to solve “The network adapter could not establish the connection” error, check whether you have entered the correct username and password as well as the correct Hostname and Port number. Though these are small things we cannot avoid them. After all “It’s the small things in a relationship that means the most.” 

[bctt tweet=”How to solve “The network adapter could not establish the connection” error in just 2 steps” username=”RebellionRider”]

For the valid hostname and port number, you can check the Listener.ora if you have access to your server as the listener is a server process. In case you don’t have access to listener.ora file then you can check the tnsnames.ora file.

In case of Listener.ora file check for Host and Port entry in Listener tag for valid hostname and port number. 

sql error the network adapter could not establish connection by manish sharma

Listener.ora

And if you are using TNSnames.ora file for validating the hostname and port number then search for the entry which has the same name as your SID and then check for host and port number entry in that particular tag.

sql error the network adapter could not establish connection by manish sharma

TNSnames.ora

Now try connecting. If this solves your problem then you can avoid the next step. But if “The network adapter could not establish the connection” error is still there, then don’t worry just follow the next step.

Step 2: Is your listener taking a rest?

If your problem is still there and you haven’t gotten rid of that nasty error then there is a possibility that your Listener is not running. To check whether Listener is up and running or not, simply open up your command prompt with Administrative privileges and Write 

C:> lsnrctl status

This command will show you the status of your listener. If the output of this command looks like the one shown in the picture below then it clearly means your listener is not running thus next what you have to do is to start the listener. 

sql error the network adapter could not establish connection by manish sharma

To start the listener you just have to write

C:> lsnrctl start.

This will start your listener and most probably solve your problem.

Info Byte:
In case you are having problems in starting your listener then try starting “OracleOraDb11g_home1TNSListener” windows service. For that open your Run Command and write services.msc this will open your service panel. Here search for the same and right click to start it.

That’s all you have to do. This must solve the “The network adapter could not establish the connection” error. May the force be with you. Enjoy.

Also, click here to learn how to do initial configuration of Orcale Enterprise Manager to start working with it. 

If you find this helpful then please do share it on your social network and help me reach out to more people. Also if you have other queries then reach out to me on my Facebook Page & Twitter. Thanks, guys & have a great day!

Hi,

I am trying to connect to oracle db using my jdev connection.but its showing me this error each time.

Test failed: IO Error: The Network Adapter could not establish the connection

Even I tried with SQL Developer its also giving same same error.my username and password are correct as its working fine with SQL Plus.

I am using

HostName : localhost

Service Name : orcl

JDBC Port : 1521

I tried these in my command prompt :

C:UsersHP>lsnrctl status

LSNRCTL for 32-bit Windows: Version 11.2.0.1.0 — Production on 14-APR-2014 17:52

:47

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

Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=IPC)(KEY=EXTPROC1521)))

STATUS of the LISTENER

————————

Alias                     LISTENER

Version                   TNSLSNR for 32-bit Windows: Version 11.2.0.1.0 — Produ

ction

Start Date                14-APR-2014 17:10:50

Uptime                    0 days 0 hr. 42 min. 22 sec

Trace Level               off

Security                  ON: Local OS Authentication

SNMP                      OFF

Listener Parameter File   C:appHPproduct11.2.0dbhome_1networkadminlisten

er.ora

Listener Log File         c:apphpdiagtnslsnrHP-HPlisteneralertlog.xml

Listening Endpoints Summary…

  (DESCRIPTION=(ADDRESS=(PROTOCOL=ipc)(PIPENAME=.pipeEXTPROC1521ipc)))

  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1521)))

Services Summary…

Service «CLRExtProc» has 1 instance(s).

  Instance «CLRExtProc», status UNKNOWN, has 1 handler(s) for this service…

The command completed successfully

C:UsersHP>tnsping orcl

TNS Ping Utility for 32-bit Windows: Version 11.2.0.1.0 — Production on 14-APR-2

014 17:59:33

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

Used parameter files:

C:appHPproduct11.2.0dbhome_1networkadminsqlnet.ora

Used TNSNAMES adapter to resolve the alias

Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = localhos

t)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = orcl)))

OK (0 msec)

My jdev version is 11.1.2.4.0 and using oracle 11 g

Any idea what i am doing wrong.

Thanks,

Raul

Most probably you have listener configured wrongly, the hostname you specify in connection string must be the same as in the listener.

First check the Firewall and network related issues.

Check if Oracle Listener service is available and running. If not you may use Oracle Net Configuration Assistant tool to add and register new listener.

If the above steps are ok then you need to configure Oracle Listener appropriately. You may use Oracle Net Manager tool or edit “%ORACLE_HOME%networkadminlistener.ora” file manually.

There are 2 options that need to be considered carefully:
Listening Locations associated with the Listener – Hostname(IP) and Port in Listening Location must exactly match the ones used in the connection string.

For example, if you use 192.168.74.139 as target hostname, then there must be Listening Location registered with the same IP address.

Also make sure the you use the same SID as indicated in Database Service associated with the Listener.

Fix Oracle “IO ERROR: The network adapter could not establish the connection” error

Most probably you have listener configured wrongly, the hostname you specify in connection string must be the same as in the listener.

First check the Firewall and network related issues.

Check if Oracle Listener service is available and running. If not you may use Oracle Net Configuration Assistant tool to add and register new listener.

If the above steps are ok then you need to configure Oracle Listener appropriately. You may use Oracle Net Manager tool or edit “%ORACLE_HOME%networkadminlistener.ora” file manually.

There are 2 options that need to be considered carefully:
Listening Locations associated with the Listener – Hostname(IP) and Port in Listening Location must exactly match the ones used in the connection string.

For example, if you use 192.168.74.139 as target hostname, then there must be Listening Location registered with the same IP address.

Also make sure the you use the same SID as indicated in Database Service associated with the Listener.

Fix Oracle “IO ERROR: The network adapter could not establish the connection” error

Oracle SQL is an Integrated Development Environment that was created for working on Oracle Databases with SQL. This product is developed and provided by Oracle corporation for free and it is based on the Java Development Kit. Quite recently, there have been many reports of an “IO Error: The Network Adapter Could Not Establish The Connection” Error while testing a database connection.

IO ERROR: The network adapter could not establish the connection

What Causes the “The Network Adapter Could Not Establish The Connection” Error?

After receiving numerous reports from multiple users, we decided to investigate the issue and devised a set of solutions to fix it completely. Also, we looked into the reasons due to which this error is triggered and listed them as follows.

  • Incorrect Details: Make sure that the connection details have been entered properly. The Hostname, Port, Username, and password need to be entered correctly in order to establish the connection. If any of these values aren’t entered properly, the error might be triggered.
  • Disabled Service: It is very important that the listener service has been started in the background for the application to work properly, If it hasn’t been started or is disabled, this error might be triggered.

Now that you have a basic understanding of the nature of the problem, we will move on towards the solutions. Make sure to implement these in the specific way in which they are presented to avoid conflict.

Solution 1: Checking Details

It is important that the correct details have been entered for the connection. Sometimes, the details entered don’t match the server configurations and the error is triggered. Therefore, in this step, we will be checking and entering the details again. For that:

  1. Download and install Notepad++ from here.
  2. Navigate to the following address.
    DB Home: C:/app/Username/product/11.2.0(version might differ)/dbhome_1/Network/Admin

    Navigating to the address
  3. Right-click on the “tnsnames.ora” file and select “Open With Notepad ++” option.
    Right-clicking on the file and selecting “Open With Notepad++”
  4. Under the “ORCL=” heading, note the “Port” and the “Host” details.
  5. Also, note the “Service Name“.
    Noting down the details
  6. Enter these details while establishing the network connection and click on “Test“.
  7. Check to see if the issue is solved.

Solution 2: Starting Listener Service

It is possible that the listener service hasn’t been started. This service is required by the application in order to establish a connection. Therefore, in this step, we will be starting the service by entering a command in the Command prompt. For that:

  1. Press “Windows” + “R” to open the Run prompt.
  2. Type in “Cmd” and press “Shift” + “Ctrl” + “Enter” to provide adminsitrative privileges.
    Typing cmd in the Run Prompt and pressing “Shift”+ “Ctrl” + “Enter”
  3. Type in the following command to check if the service is started.
    lsnrctl status
  4. If the result is similar to the image below, it means that the service hasn’t been started.
    This message is displayed if the service hasn’t been started
  5. Enter the following command to start the service manually.
    lsnrctl start

    Typing in the command to start the service
  6. Now that the listener service has been started, open the application and check to see if a new connection can be established.

Photo of Kevin Arrows

Kevin Arrows

Kevin is a dynamic and self-motivated information technology professional, with a Thorough knowledge of all facets pertaining to network infrastructure design, implementation and administration. Superior record of delivering simultaneous large-scale mission critical projects on time and under budget.

Back to top button

Обновлено 2023 января: перестаньте получать сообщения об ошибках и замедлите работу вашей системы с помощью нашего инструмента оптимизации. Получить сейчас в эту ссылку

  1. Скачайте и установите инструмент для ремонта здесь.
  2. Пусть он просканирует ваш компьютер.
  3. Затем инструмент почини свой компьютер.

Oracle SQL — это интегрированная среда разработки, предназначенная для работы с базами данных Oracle с использованием SQL. Этот продукт разработан и бесплатно предоставляется корпорацией Oracle и основан на Java Development Kit. В последнее время появилось много сообщений об «ошибке ввода-вывода: сетевой адаптер может подключиться» при тестировании соединения с базой данных.

В чем причина этой ошибки?

Всякий раз, когда вы видите, что сетевой адаптер не может подключиться, у вас либо неправильный URL-адрес разработчика SQL, либо у вас есть базовая проблема с подключением к SQL * Net! Эта ошибка, скорее всего, вызвана одним из следующих факторов:

  • Вы используете неправильный URL
  • Использован неправильный номер порта или IP-адрес (или имя хоста DNS).
  • Динамик не настроен правильно.
  • Процесс прослушивания (сервис) не выполняется. Вы можете запустить его с помощью команды «lsnrctl start» или перезапустить в Windows, запустив службу Listener.

Обновление за январь 2023 года:

Теперь вы можете предотвратить проблемы с ПК с помощью этого инструмента, например, защитить вас от потери файлов и вредоносных программ. Кроме того, это отличный способ оптимизировать ваш компьютер для достижения максимальной производительности. Программа с легкостью исправляет типичные ошибки, которые могут возникнуть в системах Windows — нет необходимости часами искать и устранять неполадки, если у вас под рукой есть идеальное решение:

  • Шаг 1: Скачать PC Repair & Optimizer Tool (Windows 10, 8, 7, XP, Vista — Microsoft Gold Certified).
  • Шаг 2: Нажмите «Начать сканирование”, Чтобы найти проблемы реестра Windows, которые могут вызывать проблемы с ПК.
  • Шаг 3: Нажмите «Починить все», Чтобы исправить все проблемы.

скачать

Убедитесь, что ваши записи верны.

Чтобы исправить «Сетевой адаптер не может установить соединение”, Сначала убедитесь, что вы ввели правильное имя пользователя и пароль, а также правильное имя хоста и номер порта. Хотя это мелочи, мы не можем их избежать. «Больше всего важны мелочи в отношениях».

Для правильного имени хоста и номера порта вы можете проверить файл Listener.ora, если у вас есть доступ к вашему серверу, потому что Listener — это процесс сервера. Если у вас нет доступа к файлу listener.ora, вы можете проверить файл tnsnames.ora.

В случае файла Listener.ora проверьте запись хоста и порта в метке Listener, чтобы убедиться, что имена хостов и номера портов являются действительными.

И если вы используете файл TNSnames.ora для проверки имени хоста и номера порта, найдите запись с тем же именем, что и ваш SID, а затем найдите запись хоста и номера порта в этом конкретном теге.

Теперь попробуйте подключиться. Если это решит вашу проблему, вы можете избежать следующего шага. Но если ошибка «Сетевому адаптеру не удалось подключиться» все еще присутствует, не беспокойтесь, просто выполните следующий шаг.

Запуск службы прослушивателя

Возможно, что услуга для аудитора не была запущена. Эта услуга требуется приложением для установления соединения. Поэтому на этом этапе мы запустим службу, введя команду в командной строке. Для этого:

  • Нажмите «Windows» + «R», чтобы открыть командную строку «Выполнить».
  • Введите «Cmd» и нажмите «Shift» + «Ctrl» + «Enter», чтобы назначить права администратора.
  • Введите следующую команду, чтобы убедиться, что служба запущена.

lsnrctl Status

  • Если результат похож на изображение ниже, это означает, что служба не была запущена.
  • Введите следующую команду, чтобы запустить службу вручную.

lsnrctl start

  • После запуска службы прослушивания откройте приложение и проверьте, можно ли установить новое соединение.

https://community.oracle.com/thread/2547624

Совет экспертов: Этот инструмент восстановления сканирует репозитории и заменяет поврежденные или отсутствующие файлы, если ни один из этих методов не сработал. Это хорошо работает в большинстве случаев, когда проблема связана с повреждением системы. Этот инструмент также оптимизирует вашу систему, чтобы максимизировать производительность. Его можно скачать по Щелчок Здесь

ed_moyes

CCNA, веб-разработчик, ПК для устранения неполадок

Я компьютерный энтузиаст и практикующий ИТ-специалист. У меня за плечами многолетний опыт работы в области компьютерного программирования, устранения неисправностей и ремонта оборудования. Я специализируюсь на веб-разработке и дизайне баз данных. У меня также есть сертификат CCNA для проектирования сетей и устранения неполадок.

Сообщение Просмотров: 178


Автор:

Morris Wright


Дата создания:

1 Апрель 2021


Дата обновления:

26 Январь 2023

Как исправить «ошибку ввода-вывода: сетевой адаптер не может установить соединение» в Oracle SQL? - Направляющие

Как исправить «ошибку ввода-вывода: сетевой адаптер не может установить соединение» в Oracle SQL? — Направляющие

Oracle SQL — это интегрированная среда разработки, созданная для работы с базами данных Oracle с SQL. Этот продукт разработан и предоставляется корпорацией Oracle бесплатно и основан на Java Development Kit. Совсем недавно появилось много сообщений о «Ошибка ввода-вывода: сетевой адаптер не может установить соединение”Ошибка при проверке подключения к базе данных.

Что вызывает ошибку «Сетевой адаптер не может установить соединение»?

Получив многочисленные сообщения от нескольких пользователей, мы решили изучить проблему и разработали набор решений для ее полного устранения. Кроме того, мы изучили причины, из-за которых возникает эта ошибка, и перечислили их следующим образом.

  • Неверные данные:Убедитесь, что данные подключения введены правильно. Чтобы установить соединение, необходимо правильно ввести имя хоста, порт, имя пользователя и пароль. Если какое-либо из этих значений введено неправильно, может возникнуть ошибка.
  • Служба для инвалидов: Для правильной работы приложения очень важно, чтобы служба прослушивателя была запущена в фоновом режиме. Если она не запущена или отключена, может возникнуть эта ошибка.

Теперь, когда у вас есть базовое представление о природе проблемы, мы перейдем к ее решениям. Убедитесь, что реализовали их определенным образом, чтобы избежать конфликта.

Решение 1. Проверка сведений

Важно, чтобы для подключения были введены правильные данные. Иногда введенные данные не соответствуют конфигурации сервера, и возникает ошибка. Поэтому на этом этапе мы снова будем проверять и вводить данные. Для этого:

  1. Скачать и установите Notepad ++ отсюда.
  2. Перейдите по следующему адресу.

    Главная страница БД: C: /app/Username/product/11.2.0 (версия может отличаться) / dbhome_1 / Network / Admin

  3. Щелкните правой кнопкой мыши значок «tnsnames.ора«Файл и выберите»Открыть с помощью Notepad ++»Вариант.
  4. Под «ORCL =»Обратите внимание на«Порт»И«Хост» подробности.
  5. Также обратите внимание на «обслуживаниеназвание“.
  6. Введите эти данные при установке сетевого подключения и нажмите «Тест“.
  7. Проверьте, решена ли проблема.

Решение 2. Запуск службы прослушивателя

Возможно, служба слушателя не запущена. Эта услуга требуется приложению для установления соединения. Поэтому на этом этапе мы будем запускать службу, введя команду в командной строке. Для этого:

  1. Нажмите «Windows” + “р», Чтобы открыть окно« Выполнить ».
  2. Введите «Cmd»И нажмите«сдвиг” + “Ctrl” + “Войти»Для предоставления административных привилегий.
  3. Введите следующую команду, чтобы проверить, запущена ли служба.

    lsnrctl статус

  4. Если результат похож на изображение ниже, это означает, что служба не имеет было начато.
  5. Войти следующую команду, чтобы запустить службу вручную.

    lsnrctl start

  6. Теперь, когда служба слушателя запущена, открыто приложение и чек чтобы узнать, можно ли установить новое соединение.

SQL Developer is an Integrated Development Environment (IDE) for developing SQL in Oracle database. This is a free tool from Oracle which is used by both developer and database administrator. This article assumes that you have an Oracle database installed on a Linux server. You have installed SQL Developer to connect to the database. SQL Developer requires a minimum of  host name or IP, port, and a database SID and a database user account to make the connection to the database.

Sometime all the information required to make a connection to SQL Developer  are provided even then the connection failed with an error message. This is the most common issue I see with a new Oracle database set up or when something changes on server side. Let’s find out all the breaking points, test them and fix the connection.

 See error message!

Displaying image.png

 status: failure — test failed: IO Error: The network Adapter could not establish the connection
We are now going to troubleshoot this connection issue. Some may know the answers but with this article, we will explore and verify everything that makes this connection. What are few things you need for this connections to succeed beside Oracle user account, host/port and SID?

Verify each listed below for successful connection.

  1. Database host  is up
  2. Oracle SID name
  3. Oracle database is open
  4. Oracle Listener is listening
  5. listening port (1521) 
  6. Oracle user account

Next, we are going to verify each of the above listed steps.

  1. Ping host IP 192.168.1.120  from your pc cmd. This test if the host where the database is installed is up or not.  # verified,
  2. Echo $ORACLE_SID  # verified the name of SID
  3. On sqlplus run ( select status from v$instance;)  # verified the database is open and running
  4. LSNRCTL status  # verified the listener is listening for the above SID
  5. Verify port 1521 is the listening port # verified the listening port
  6. Able to connect to database using the user credential via SQLPlus. 


The listener is up and listening at port 1521

oracle@oracldev etc]$ lsnrctl status
LSNRCTL for Linux: Version 11.2.0.1.0 — Production on 12-JUL-2015 13:25:12
Copyright (c) 1991, 2009, Oracle.  All rights reserved.
Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=oracldev.baniya.com)(PORT=1521)))
STATUS of the LISTENER
————————
Alias                     LISTENER
Version                   TNSLSNR for Linux: Version 11.2.0.1.0 — Production
Start Date                12-JUL-2015 13:15:00
Uptime                    0 days 0 hr. 10 min. 11 sec
Trace Level               off
Security                  ON: Local OS Authentication
SNMP                      OFF
Listener Parameter File   /u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora
Listener Log File         /u01/app/oracle/diag/tnslsnr/oracldev/listener/alert/log.xml
Listening Endpoints Summary…
  (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=oracldev.baniya.com)(PORT=1521)))
Services Summary…
Service «DEV» has 1 instance(s).
  Instance «DEV», status READY, has 1 handler(s) for this service…
Service «DEVXDB» has 1 instance(s).
  Instance «DEV», status READY, has 1 handler(s) for this service…
The command completed successfully
[oracle@oracldev etc]$

The database is up and mounted

QL> select status from v$instance;
STATUS
————
OPEN
SQL>

The host name and port on tnsname.ora

[oracle@oracldev admin]$ cat listener.ora
# listener.ora Network Configuration File:
/u01/app/oracle/product/11.2.0/dbhome_1/network/admin/listener.ora                                                   # Generated by Oracle configuration tools.

LISTENER =
  (DESCRIPTION_LIST =
    (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = oracldev.baniya.com)(PORT = 1521))
    )
  )
ADR_BASE_LISTENER = /u01/app/oracle

Host Name and IP verified.

[oracle@oracldev ~]$ cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.1.120 oracldev.baniya.com

Pinging to 192.168.1.120

Displaying image.png

Everything is verified, the host and oracle database is up but still cannot connect to database using SQL Developer.

  1. Ping host IP 192.168.1.120  from your pc cmd. This test if the host where the database is installed is up or not.  # verified,
  2. Echo $ORACLE_SID  # verified the name of SID
  3. On sqlplus run ( select status from v$instance;)  # verified the database is open and running
  4. LSNRCTL status  # verified the listener is listening for the above SID
  5. Verify port 1521 is the listening port # verified the listening port
  6. Able to connect to database using the user credential via SQLPlus. 

Why is the connection still hesitant? What did we miss to the above list?The only thing we didn’t check was the firewall on the Linux host.  We will first try to disable the firewall if that works we know the problem. Connect to Linux host and disable firewall. You will need to have a root access to make this change.

  1. service iptables stop 
  2. service iptables status

Disabling firewall fixed the connection problem that we are having.  Note that disabling a firewall in a production environment isn’t a good security practice, therefore you will need to open a port 1521 on your Linux server. Below, I will should you how you can open port 1521 on a Linux OS.


How to open port 1521 on linux server?

iptables -A INPUT -m state —state NEW -m tcp -p tcp —dport 1521 -j ACCEPT
service iptables save
open file /etc/sysconfig/iptables:
# vi /etc/sysconfig/iptables
and put the below line of code just above the RECJECT code
-A INPUT -p tcp -m state —state NEW -m tcp —dport 1521 -j ACCEPT
service iptables restart
Check if the rule of 1521 is active
iptables -L -n | grep 1521

The port 1521 is now open on the firewall. This resolved SQL Developer connection issue.

You should be connected by now if you are using a basic thin client connection. The FAT client connection may required some additional troubleshooting steps which we will discuss on next article.

Interested in working with me? I can be reached at pbaniya04[at]gmail.com for any questions, consulting opportunities or you may drop a line to say HELLO. Thank your again for visiting my blog and looking forward to serving you more.

Have a Database-ious Day!

  • Ошибка ввода вывода на устройстве как исправить для hdd флешки ssd
  • Ошибка ввода вывода qbittorrent как убрать
  • Ошибка ввода вывода на устройстве usb
  • Ошибка ввода вывода qbit
  • Ошибка ввода вывода на устройстве sd карта как исправить