The network adapter could not establish the connection как исправить

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 badges277 silver badges330 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

94713 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


Автор:

Morris Wright


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

1 Апрель 2021


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

21 Май 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. Теперь, когда служба слушателя запущена, открыто приложение и чек чтобы узнать, можно ли установить новое соединение.

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

это

1c222c1f244a441b9c05b54bf6649967.png

.

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

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

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

p.s. ОС Fedora 21.

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 Arrows is a highly experienced and knowledgeable technology specialist with over a decade of industry experience. He holds a Microsoft Certified Technology Specialist (MCTS) certification and has a deep passion for staying up-to-date on the latest tech developments. Kevin has written extensively on a wide range of tech-related topics, showcasing his expertise and knowledge in areas such as software development, cybersecurity, and cloud computing. His contributions to the tech field have been widely recognized and respected by his peers, and he is highly regarded for his ability to explain complex technical concepts in a clear and concise manner.

Back to top button

Понравилась статья? Поделить с друзьями:

Не пропустите также:

  • Как найти число по его дроби пример
  • Как найти радиус окружности черчение
  • Как найти паука в квартире видео
  • Как найти суммарную сеть
  • Как найти по фото свое комнатное растение

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии