Временная ошибка при разрешении linux

Fixing Temporary failure in name Resolution in Linux(Debian or Ubuntu based)

Step1:

Check if /etc/resolv.conf file is empty or lacking permissions

if it’s empty: create the file,

sudo nano /etc/resolv.conf

Then add,

nameserver (your default gateway ip)

If you don’t know what your default gateway is type in,

Or, simply add nameserver 8.8.8.8 and save the file

Restart network manager,

service network-manager restart for old distros

sudo service NetworkManager restart for new distros

If your /etc/resolv.conf is lacking permissions, type in chmod o+r /etc/resolv.conf or delete that file and create a new one.

Still having issues follow step2

Step2:

Check if your NetworkManager.service is masked.

For new distros,

systemctl list-unit-files | grep NetworkManager.service

For old distros,

systemctl list-unit-files | grep network-manager.service

look for masked within the output

if NetworkManager.service is masked then unmasking it will eventually remove the service from the /etc/systemd/system directory.

So, It’s better not to unmask it. else installing the network-manager package will fix it.

First we gotta enable the internet access from terminal. Type in.

dhclient Your-Interface-Name

dhclient eth0 for example. If you only have WIFI as a resource and don’t have the GUI thing set up, follow
connect wifi from terminal
then type in dhclient wlan0

Finally, install the network manager package and restart the service

For new distros,

sudo apt install network-manager
sudo service NetworkManager restart
sudo service NetworkManager status

For old distros,

sudo apt install network-manager
sudo service network-manager restart
sudo service network-manager status

To install the GUI, sudo apt install network-manager-gnome. To open it type in
nm-connection-editor from terminal.

And, this should fix your issue :)

I am getting the following error from ubuntu 20.04 terminal, connected via wired ethernet connection:
When I type the following command which I am using in a bash script:

ping -c 1 google.com

for a health check to ensure it has access, I get the following error:

ping: google.com: Temporary failure in name resolution

Some background

I overwrote my older gaming rig to be a ubuntu multi purpose server (including smart home automation) in my home network. It used to be windows 10, but I formatted the drive and installed ubuntu on it.

I have not yet been able to access the internet with ubuntu, however, I do know that the equipment works because I left the internet wired in, I actually downloaded ubuntu via that machine onto the usb before installing.

Now I cannot see or connect to the ubuntu server from other devices and cannot reach the internet to download even basic tools like netstat.

At this point, I feel like I’ve bashed my head against a wall and scoured the internet (and lots of other stack overflow threads) and tried a bunch of things that didn’t work.

Any help would be greatly appreciated!

Edit: As requested in comments, I am attaching a screenshot, since I am not able access the computer via any network. Only via hdmi.

enter image description here

Edit 2: Second screenshot as requested.

enter image description here

Недавно в тестируемой Matuntu-K на основе Ubuntu 22.10 появилась проблема резолвинга имён ДНС, например, в выводе команды ping ya.ru появилось уведомление: Временный сбой в разрешении имён.
Рабочим оказалось решение, описанное на убунтовском форуме пользователем winhex.

Помогло отключение службы systemd-resolved:

sudo systemctl disable systemd-resolved

sudo systemctl stop systemd-resolved
В файле /etc/NetworkManager/NetworkManager.conf в секции [main]

sudo pluma /etc/NetworkManager/NetworkManager.confменяем значение dns так (по причине отсутствия этого параметра я просто добавила эту строку):

dns=default
Удаляем файл resolv.conf:

sudo rm /etc/resolv.conf
Перезапускаем NetworkManager:

sudo systemctl restart NetworkManager
Файл /etc/resolv.conf появится снова, но уже с «правильным» неймсервером.

После этого проблема исчезла.

Источник — https://askubuntu.com/questions/907246/how-to-disable-systemd-resolved-in-ubuntu

« Последнее редактирование: 06 Октября 2022, 17:14:02 от vita »


Записан

Делай с нами, делай как мы, делай лучше нас!

Introduction

The «Temporary failure in name resolution» error occurs when the system cannot translate a website name into an IP address. While the error sometimes appears due to a lost internet connection, there are multiple reasons why it may show up on your system.

This tutorial will guide you through troubleshooting and fixing the «Temporary failure in name resolution» error.

How to resolve the "Temporary failure in name resolution" error

Prerequisites

  • Sudo or root privileges
  • A working internet connection

The error appears when a user attempts to communicate with a website using a command such as ping:

ping phoenixnap.com

The system cannot communicate with the DNS server and returns the error.

Pinging a website unsuccessfully.

The most common cause of this error are the resolv.conf network configuration file and a misconfigured firewall. The steps to fix the error in both cases are given below.

Method 1: Badly Configured resolv.conf File

resolv.conf is a file for configuring DNS servers on Linux systems.

To start, open the file in a text editor such as nano.

sudo nano /etc/resolv.conf

Make sure the resolv.conf file contains at least one nameserver. The lines listing nameservers should look like this:

nameserver 8.8.8.8

If you do not have a nameserver listed in the file, add at least one. 8.8.8.8 and 8.8.4.4 are the popular nameservers owned by Google, but you can add any functional DNS server to this list.

The /etc/resolv.conf file in nano editor.

Save the file and exit.

Then, restart the DNS resolver service.

sudo systemctl restart systemd-resolved.service

If successful, the command above returns no output. Test that your new nameservers are correctly configured by pinging a website:

ping phoenixnap.com

If you see the ping command transmitting and receiving data, your DNS server is working properly.

Successfully pinging a website.

Misconfigured Permissions

If your resolv.conf file contains valid DNS servers, but the error persists, it may be due to misconfigured file permissions. Change ownership of the file to the root user with the following command:

sudo chown root:root /etc/resolv.conf

Modify the user permissions to allow everybody on the system to read the file:

sudo chmod 644 /etc/resolv.conf

Ping a website again.

ping phoenixnap.com

If wrong file permissions caused the error, the commands above successfully resolve it.

Method 2: Firewall Restrictions

Another reason for the «Temporary failure in name resolution» error may be a firewall blocking one or both of the following ports:

  • port 43, used for whois lookup
  • port 53, used for domain name resolution

Open the ports in UFW Firewall

Type the following command to allow traffic on port 43 using UFW firewall:

sudo ufw allow 43/tcp

UFW confirms the rule is successfully updated.

Allowing port 43 in UFW.

Repeat the command for port 53.

sudo ufw allow 53/tcp

Reload UFW with the following command:

sudo ufw reload

The output confirms the operation was successful.

Reloading UFW firewall.

Open the ports in firewalld

Some Linux distributions such as CentOS use firewalld as their default firewall. The syntax to open port 43 in firewalld is:

sudo firewall-cmd --add-port=43/tcp --permanent

firewalld outputs the word success.

Allowing port 43 in firewalld.

Repeat the command for port 53.

sudo firewall-cmd --add-port=53/tcp --permanent

Reload the firewall.

sudo firewall-cmd --reload
Reloading firewalld firewall.

Test the connection by pinging a website.

ping phoenixnap.com

Conclusion

This article provided ways to troubleshoot and fix the «Temporary failure in name resolution» error on Linux. To learn more about diagnosing DNS-related problems, read How to Use Linux dig Command.

Sometimes when you try to ping a website, update a system or perform any task that requires an active internet connection, you may get the error message ‘temporary failure in name resolution’ on your terminal.

For example, when you try to ping a website, you might bump into the error shown:

[email protected]:~$ ping google.com
ping: tecmint.com: Temporary failure in name resolution

This is usually a name resolution error and shows that your DNS server cannot resolve the domain names into their respective IP addresses. This can present a grave challenge as you will not be able to update, upgrade, or even install any software packages on your Linux system.

In this article, we will look at some of the causes of the ‘temporary failure in name resolution‘ error and solutions to this issue.

1. Missing or Wrongly Configured resolv.conf File

The /etc/resolv.conf file is the resolver configuration file in Linux systems. It contains the DNS entries that help your Linux system to resolve domain names into IP addresses.

If this file is not present or is there but you are still having the name resolution error, create one and append the Google public DNS server as shown

nameserver 8.8.8.8

Save the changes and restart the systemd-resolved service as shown.

$ sudo systemctl restart systemd-resolved.service

It’s also prudent to check the status of the resolver and ensure that it is active and running as expected:

$ sudo systemctl status systemd-resolved.service

Then try pinging any website and the issue should be sorted out.

[email protected]:~$ ping google.com

2. Firewall Restrictions

If the first solution did not work for you, firewall restrictions could be preventing you from successfully performing DNS queries. Check your firewall and confirm if port 53 (used for DNS – Domain Name Resolution ) and port 43 (used for whois lookup) are open. If the ports are blocked, open them as follows:

For UFW firewall (Ubuntu / Debian and Mint)

To open ports 53 & 43 on the UFW firewall run the commands below:

$ sudo ufw allow 53/tcp
$ sudo ufw allow 43/tcp
$ sudo ufw reload
For firewalld (RHEL / CentOS / Fedora)

For Redhat based systems such as CentOS, invoke the commands below:

$ sudo firewall-cmd --add-port=53/tcp --permanent
$ sudo firewall-cmd --add-port=43/tcp --permanent
$ sudo firewall-cmd --reload

It’s our hope that you now have an idea about the ‘temporary failure in name resolution‘ error and how you can go about fixing it in a few simple steps. As always, your feedback is much appreciated.

If you read this far, tweet to the author to show them you care. Tweet a thanks

Photo of author

This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I’m not running commands on the terminal, I’m taking listening to some cool music. taking a casual stroll or watching a nice movie.


Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Содержание

  1. Как решить проблему «Временный сбой в разрешении имен»
  2. 1. Отсутствующий или неправильно настроенный файл resolv.conf
  3. 2. Ограничения брандмауэра
  4. 🛠️ Как решить ошибку «Temporary failure in name resolution»
  5. 1. Отсутствующий или неправильно настроенный файл resolv.conf
  6. 2. Ограничения межсетевого экрана
  7. Для брандмауэра UFW (Ubuntu / Debian и Mint)
  8. Ubuntu Server 18.04 Временный сбой в разрешении имен
  9. 3 ответа
  10. Ubuntu Server 18.04 Временный сбой в разрешении имен
  11. 3 ответа
  12. Wicd или проблемы с DNS

Как решить проблему «Временный сбой в разрешении имен»

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

Например, когда вы пытаетесь проверить связь с веб-сайтом, вы можете столкнуться с показанной ошибкой:

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса. Это может стать серьезной проблемой, поскольку вы не сможете обновлять, обновлять или даже устанавливать какие-либо программные пакеты в вашей системе Linux.

В этой статье мы рассмотрим некоторые причины ошибки «временный сбой при разрешении имен» и решения этой проблемы.

1. Отсутствующий или неправильно настроенный файл resolv.conf

Если этот файл отсутствует или существует, но ошибка разрешения имени все еще возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано

Сохраните изменения и перезапустите службу systemd-resolved, как показано.

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

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

2. Ограничения брандмауэра

Чтобы открыть порты 53 и 43 на брандмауэре UFW, выполните следующие команды:

Для систем на основе Redhat, таких как CentOS, выполните следующие команды:

Мы надеемся, что теперь у вас есть представление об ошибке «временный сбой при разрешении имен» и о том, как ее исправить, выполнив несколько простых шагов. Как всегда, мы будем благодарны за ваши отзывы.

Источник

🛠️ Как решить ошибку «Temporary failure in name resolution»

troubleshoot

Иногда, когда вы пытаетесь проверить связь с веб-сайтом, обновить систему или выполнить какую-либо задачу, требующую активного подключения к Интернету, вы можете получить сообщение об ошибке “temporary failure in name resolution” на вашем терминале.

Например, когда вы пытаетесь проверить связь с веб-сайтом, вы можете столкнуться с указанной ошибкой:

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса.

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

В этой статье мы рассмотрим некоторые из причин ошибки «temporary failure in name resolution» и решения этой проблемы.

1. Отсутствующий или неправильно настроенный файл resolv.conf

Файл /etc/resolv.conf – это файл конфигурации резолвера в системах Linux.

Он содержит записи DNS, которые помогают вашей системе Linux преобразовывать доменные имена в IP-адреса.

Если этот файл отсутствует или существует, но ошибка разрешения имени все еще возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано далее:

Сохраните изменения и перезапустите службу systemd-resolved, как показано.

2. Ограничения межсетевого экрана

Если первое решение вам не помогло, значит ограничения брандмауэра могут помешать вам успешно выполнять DNS-запросы.

Проверьте свой брандмауэр и убедитесь, что порт 53 (используется для DNS ) и порт 43 (используется для поиска whois) открыты.

Если порты заблокированы, откройте их следующим образом:

Для брандмауэра UFW (Ubuntu / Debian и Mint)

Чтобы открыть порты 53 и 43 на брандмауэре UFW, выполните следующие команды:

Источник

Ubuntu Server 18.04 Временный сбой в разрешении имен

Я только что установил Ubuntu Server 18.04 и настроил SSH, чтобы я мог продолжить настройку через свой рабочий стол, но у меня возникли некоторые проблемы, которые я не могу решить.

но постоянно получал ошибки:

Временная ошибка при разрешении archive.ubuntu.com

Я проверил, было ли у меня интернет-соединение нормально, запустив

и я получил ответ, все хорошо там.

Я подозревал, что, возможно, мой DNS не был настроен правильно, поэтому я попытался

Временный сбой в разрешении имен

Итак, я решил, что это на самом деле какая-то проблема DNS, но все «ответы», которые я пробовал, не сработали для меня.

Я пробовал редактировать /etc/resolv.conf без удачи, как представляется, символическая ссылка.

Я нашел ответ, который работает, только если я запускаю из-под root, то есть:

Но он дает указание отменить изменения впоследствии:

Если я это сделаю, я снова потеряю связь.

3 ответа

В Ubuntu Server 18-04 с установленными xorg lightdm lightdm-gtk-greeter и xfce4 GUI при загрузке системы единственный способ, с помощью которого я понял, чтобы запустить проводную сеть, это:

отлично работает, однако, это должно быть сделано вручную после каждой загрузки и после каждого отключения / повторного подключения к сети, так что это работает, но это ручное решение, а не постоянное решение;

чтобы запустить беспроводную сеть автоматически, просто:

вам, вероятно, придется перезагрузиться; тогда вы сможете использовать значок беспроводной сети, который появляется в области уведомлений на панели управления (убедитесь, что область уведомлений добавлена ​​на панель), чтобы выбрать беспроводную сеть; после этого он автоматически восстановит соединение;

однако для автоматического восстановления проводной сети я попытался установить avahi-daemon и avahi-autoipd, но, видимо, это не помогает; даже попробовал

в основном, если вы устанавливаете дистрибутив, такой как рабочий стол Xubuntu, устанавливается соответствующий инструмент (ы)/daemon/config, и сеть обнаруживается автоматически, когда он подключен без какой-либо пользовательской конфигурации; было бы неплохо узнать, какой инструмент /daemon/config/setting это делает.

Источник

Ubuntu Server 18.04 Временный сбой в разрешении имен

Я только что установил Ubuntu Server 18.04 и настроил SSH, чтобы я мог продолжить настройку через свой рабочий стол, но у меня возникли некоторые проблемы, которые я, похоже, не могу решить.

Я пытался запустить

, но постоянно получал ошибки:

Временная ошибка при разрешении archive.ubuntu.com

Я проверил, в порядке ли мое интернет-соединение, запустив

и получил ответ, все в порядке.

Я подозревал, что, возможно, мой DNS не был настроен правильно, поэтому я попытался

Временный сбой в разрешении имени

Хорошо, поэтому я решил, что это на самом деле какая-то проблема DNS, но все «ответы», которые я пробовал, не сработали для меня.

Я попытался отредактировать /etc/resolv.conf без удачи, так как он выглядит как символическая ссылка.

Я нашел здесь ответ, который работает, только если я запускаю из-под root, то есть:

Но он дает указание отменить изменения впоследствии:

Если я это сделаю тем не менее, я снова теряю связь.

3 ответа

В Ubuntu Server 18-04 с установленными xorg lightdm lightdm-gtk-greeter и xfce4 GUI при загрузке системы единственный способ, с помощью которого я понял, чтобы запустить проводную сеть, это:

прекрасно работает, однако, это должно быть сделано вручную после каждой загрузки и после каждого отключения / повторного подключения к сети, так что это работает, но это ручное решение, а не постоянное решение;

чтобы получить беспроводной сеть собирается автоматически, просто:

вам, вероятно, придется перезагрузиться; тогда вы сможете использовать значок беспроводной сети, который появляется в области уведомлений на панели управления (убедитесь, что область уведомлений добавлена ​​на панель), чтобы выбрать беспроводную сеть; после этого он будет автоматически подключаться;

однако для автоматического восстановления проводной сети я попытался установить avahi-daemon и avahi-autoipd, но, очевидно, это не помогает; даже пытался:

в основном, если вы устанавливаете дистрибутив, такой как рабочий стол Xubuntu, устанавливается соответствующий инструмент (ы) / daemon / config, и сеть обнаруживается автоматически, когда он подключен без какого-либо пользователя. конфигурации; было бы неплохо узнать, какой инструмент / daemon / config / setting это делает.

Источник

Wicd или проблемы с DNS

Обновил gentoo. Ранее проблем не было. Теперь установлен wicd 1.7.3. Ping 8.8.8.8 проходит нормально. Однако Интернета по факту нет. Ping www.linux.org.ru пишет «unknown host», с остальными так же. IPшник и все остальное получаю по DHCP. traceroute www.linux.org.ru выдает:

www.linux.org.ru: Временный сбой в разрешении имен
Cannot handle «host» cmdline arg ‘www.linux.org.ru’ on position 1 (argc 1)

Думал проблема в роутере, но после его замены ситуация осталась на месте. Другие устройства ходят нормально. На роутер по IPшнику прохожу спокойно. Пробовал откатываться назад и ставить предыдущую версию wicd, но доступ в Интернет то появляется по непонятным причинам после пересборки wicd, то полностью пропадает вновь.

resolv.conf должен быть пустым при нормальной работе wicd? Он у меня пустой и wicd его постоянно сбрасывает.

Перезапуск демона не помогает.

127781:1142005906

96843:955143001

Ping 8.8.8.8 проходит нормально. Однако Интернета по факту нет. Ping www.linux.org.ru пишет «unknown host», с остальными так же

это значит, что интернет по факту есть, но не работает DNS

resolv.conf должен быть пустым при нормальной работе wicd?

нет, не должен. пропиши там nameserver 8.8.8.8 в кач-ве workaround, а потом покопайся в настройках wicd, чтобы он обновлял resolv.conf сам

127781:1142005906

Прописал «nameserver 8.8.8.8», но ситуация та же.

127781:1142005906

56337:1521526582

какой dhcp клиент используется? wicd сам не является dhcp, он использует системный, это может быть dhclient или dhcpcd

Источник

Browsing the internet is perhaps the most important aspect of using any operating system. Opening various websites on browsers are extremely common as they contain all sorts of content. As we attempt to browse through the internet and these various websites using the Linux terminal, there is a very common issue that may be invoked with the statement “Temporary failure in name resolution“.

This article will elaborate further on the main reasoning causing this error and also demonstrate how this problem can be fixed on any system.

Resolve the “Temporary failure in name resolution” Problem

There exist a couple of major causes that will cause this problem to be invoked. This problem is mostly invoked if the user attempts to ping a certain website using the following terminal command:

$ ping google.com

Let’s look at the major reasons for this issue.

Reason 1: The resolv.conf File Not Set Up

This file is utilized to configure the DNS on your system. What this means is that when a ping command is issued, this file will resolve the name of the domain to the IP address of that domain, which means that it contains the data that attaches the domain to their respective IP Address. Once this happens, the website will be located, and then the system will be able to ping that website. If this file is missing or it is not set up correctly, then this error will be prompted as demonstrated below:

This is James, a certified Linux administrator and a tech enthusiast who loves keeping in touch with emerging trends in the tech world. When I’m not running commands on the terminal, I’m taking listening to some cool music. taking a casual stroll or watching a nice movie.


Each tutorial at TecMint is created by a team of experienced Linux system administrators so that it meets our high-quality standards.

Содержание

  1. Как решить проблему «Временный сбой в разрешении имен»
  2. 1. Отсутствующий или неправильно настроенный файл resolv.conf
  3. 2. Ограничения брандмауэра
  4. 🛠️ Как решить ошибку «Temporary failure in name resolution»
  5. 1. Отсутствующий или неправильно настроенный файл resolv.conf
  6. 2. Ограничения межсетевого экрана
  7. Для брандмауэра UFW (Ubuntu / Debian и Mint)
  8. Ubuntu Server 18.04 Временный сбой в разрешении имен
  9. 3 ответа
  10. Ubuntu Server 18.04 Временный сбой в разрешении имен
  11. 3 ответа
  12. Wicd или проблемы с DNS

Как решить проблему «Временный сбой в разрешении имен»

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

Например, когда вы пытаетесь проверить связь с веб-сайтом, вы можете столкнуться с показанной ошибкой:

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса. Это может стать серьезной проблемой, поскольку вы не сможете обновлять, обновлять или даже устанавливать какие-либо программные пакеты в вашей системе Linux.

В этой статье мы рассмотрим некоторые причины ошибки «временный сбой при разрешении имен» и решения этой проблемы.

1. Отсутствующий или неправильно настроенный файл resolv.conf

Если этот файл отсутствует или существует, но ошибка разрешения имени все еще возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано

Сохраните изменения и перезапустите службу systemd-resolved, как показано.

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

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

2. Ограничения брандмауэра

Чтобы открыть порты 53 и 43 на брандмауэре UFW, выполните следующие команды:

Для систем на основе Redhat, таких как CentOS, выполните следующие команды:

Мы надеемся, что теперь у вас есть представление об ошибке «временный сбой при разрешении имен» и о том, как ее исправить, выполнив несколько простых шагов. Как всегда, мы будем благодарны за ваши отзывы.

Источник

🛠️ Как решить ошибку «Temporary failure in name resolution»

troubleshoot

Иногда, когда вы пытаетесь проверить связь с веб-сайтом, обновить систему или выполнить какую-либо задачу, требующую активного подключения к Интернету, вы можете получить сообщение об ошибке “temporary failure in name resolution” на вашем терминале.

Например, когда вы пытаетесь проверить связь с веб-сайтом, вы можете столкнуться с указанной ошибкой:

Обычно это ошибка разрешения имен, которая показывает, что ваш DNS-сервер не может преобразовать доменные имена в соответствующие IP-адреса.

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

В этой статье мы рассмотрим некоторые из причин ошибки «temporary failure in name resolution» и решения этой проблемы.

1. Отсутствующий или неправильно настроенный файл resolv.conf

Файл /etc/resolv.conf – это файл конфигурации резолвера в системах Linux.

Он содержит записи DNS, которые помогают вашей системе Linux преобразовывать доменные имена в IP-адреса.

Если этот файл отсутствует или существует, но ошибка разрешения имени все еще возникает, создайте его и добавьте общедоступный DNS-сервер Google, как показано далее:

Сохраните изменения и перезапустите службу systemd-resolved, как показано.

2. Ограничения межсетевого экрана

Если первое решение вам не помогло, значит ограничения брандмауэра могут помешать вам успешно выполнять DNS-запросы.

Проверьте свой брандмауэр и убедитесь, что порт 53 (используется для DNS ) и порт 43 (используется для поиска whois) открыты.

Если порты заблокированы, откройте их следующим образом:

Для брандмауэра UFW (Ubuntu / Debian и Mint)

Чтобы открыть порты 53 и 43 на брандмауэре UFW, выполните следующие команды:

Источник

Ubuntu Server 18.04 Временный сбой в разрешении имен

Я только что установил Ubuntu Server 18.04 и настроил SSH, чтобы я мог продолжить настройку через свой рабочий стол, но у меня возникли некоторые проблемы, которые я не могу решить.

но постоянно получал ошибки:

Временная ошибка при разрешении archive.ubuntu.com

Я проверил, было ли у меня интернет-соединение нормально, запустив

и я получил ответ, все хорошо там.

Я подозревал, что, возможно, мой DNS не был настроен правильно, поэтому я попытался

Временный сбой в разрешении имен

Итак, я решил, что это на самом деле какая-то проблема DNS, но все «ответы», которые я пробовал, не сработали для меня.

Я пробовал редактировать /etc/resolv.conf без удачи, как представляется, символическая ссылка.

Я нашел ответ, который работает, только если я запускаю из-под root, то есть:

Но он дает указание отменить изменения впоследствии:

Если я это сделаю, я снова потеряю связь.

3 ответа

В Ubuntu Server 18-04 с установленными xorg lightdm lightdm-gtk-greeter и xfce4 GUI при загрузке системы единственный способ, с помощью которого я понял, чтобы запустить проводную сеть, это:

отлично работает, однако, это должно быть сделано вручную после каждой загрузки и после каждого отключения / повторного подключения к сети, так что это работает, но это ручное решение, а не постоянное решение;

чтобы запустить беспроводную сеть автоматически, просто:

вам, вероятно, придется перезагрузиться; тогда вы сможете использовать значок беспроводной сети, который появляется в области уведомлений на панели управления (убедитесь, что область уведомлений добавлена ​​на панель), чтобы выбрать беспроводную сеть; после этого он автоматически восстановит соединение;

однако для автоматического восстановления проводной сети я попытался установить avahi-daemon и avahi-autoipd, но, видимо, это не помогает; даже попробовал

в основном, если вы устанавливаете дистрибутив, такой как рабочий стол Xubuntu, устанавливается соответствующий инструмент (ы)/daemon/config, и сеть обнаруживается автоматически, когда он подключен без какой-либо пользовательской конфигурации; было бы неплохо узнать, какой инструмент /daemon/config/setting это делает.

Источник

Ubuntu Server 18.04 Временный сбой в разрешении имен

Я только что установил Ubuntu Server 18.04 и настроил SSH, чтобы я мог продолжить настройку через свой рабочий стол, но у меня возникли некоторые проблемы, которые я, похоже, не могу решить.

Я пытался запустить

, но постоянно получал ошибки:

Временная ошибка при разрешении archive.ubuntu.com

Я проверил, в порядке ли мое интернет-соединение, запустив

и получил ответ, все в порядке.

Я подозревал, что, возможно, мой DNS не был настроен правильно, поэтому я попытался

Временный сбой в разрешении имени

Хорошо, поэтому я решил, что это на самом деле какая-то проблема DNS, но все «ответы», которые я пробовал, не сработали для меня.

Я попытался отредактировать /etc/resolv.conf без удачи, так как он выглядит как символическая ссылка.

Я нашел здесь ответ, который работает, только если я запускаю из-под root, то есть:

Но он дает указание отменить изменения впоследствии:

Если я это сделаю тем не менее, я снова теряю связь.

3 ответа

В Ubuntu Server 18-04 с установленными xorg lightdm lightdm-gtk-greeter и xfce4 GUI при загрузке системы единственный способ, с помощью которого я понял, чтобы запустить проводную сеть, это:

прекрасно работает, однако, это должно быть сделано вручную после каждой загрузки и после каждого отключения / повторного подключения к сети, так что это работает, но это ручное решение, а не постоянное решение;

чтобы получить беспроводной сеть собирается автоматически, просто:

вам, вероятно, придется перезагрузиться; тогда вы сможете использовать значок беспроводной сети, который появляется в области уведомлений на панели управления (убедитесь, что область уведомлений добавлена ​​на панель), чтобы выбрать беспроводную сеть; после этого он будет автоматически подключаться;

однако для автоматического восстановления проводной сети я попытался установить avahi-daemon и avahi-autoipd, но, очевидно, это не помогает; даже пытался:

в основном, если вы устанавливаете дистрибутив, такой как рабочий стол Xubuntu, устанавливается соответствующий инструмент (ы) / daemon / config, и сеть обнаруживается автоматически, когда он подключен без какого-либо пользователя. конфигурации; было бы неплохо узнать, какой инструмент / daemon / config / setting это делает.

Источник

Wicd или проблемы с DNS

Обновил gentoo. Ранее проблем не было. Теперь установлен wicd 1.7.3. Ping 8.8.8.8 проходит нормально. Однако Интернета по факту нет. Ping www.linux.org.ru пишет «unknown host», с остальными так же. IPшник и все остальное получаю по DHCP. traceroute www.linux.org.ru выдает:

www.linux.org.ru: Временный сбой в разрешении имен
Cannot handle «host» cmdline arg ‘www.linux.org.ru’ on position 1 (argc 1)

Думал проблема в роутере, но после его замены ситуация осталась на месте. Другие устройства ходят нормально. На роутер по IPшнику прохожу спокойно. Пробовал откатываться назад и ставить предыдущую версию wicd, но доступ в Интернет то появляется по непонятным причинам после пересборки wicd, то полностью пропадает вновь.

resolv.conf должен быть пустым при нормальной работе wicd? Он у меня пустой и wicd его постоянно сбрасывает.

Перезапуск демона не помогает.

127781:1142005906

96843:955143001

Ping 8.8.8.8 проходит нормально. Однако Интернета по факту нет. Ping www.linux.org.ru пишет «unknown host», с остальными так же

это значит, что интернет по факту есть, но не работает DNS

resolv.conf должен быть пустым при нормальной работе wicd?

нет, не должен. пропиши там nameserver 8.8.8.8 в кач-ве workaround, а потом покопайся в настройках wicd, чтобы он обновлял resolv.conf сам

127781:1142005906

Прописал «nameserver 8.8.8.8», но ситуация та же.

127781:1142005906

56337:1521526582

какой dhcp клиент используется? wicd сам не является dhcp, он использует системный, это может быть dhclient или dhcpcd

Источник

Browsing the internet is perhaps the most important aspect of using any operating system. Opening various websites on browsers are extremely common as they contain all sorts of content. As we attempt to browse through the internet and these various websites using the Linux terminal, there is a very common issue that may be invoked with the statement “Temporary failure in name resolution“.

This article will elaborate further on the main reasoning causing this error and also demonstrate how this problem can be fixed on any system.

Resolve the “Temporary failure in name resolution” Problem

There exist a couple of major causes that will cause this problem to be invoked. This problem is mostly invoked if the user attempts to ping a certain website using the following terminal command:

$ ping google.com

Let’s look at the major reasons for this issue.

Reason 1: The resolv.conf File Not Set Up

This file is utilized to configure the DNS on your system. What this means is that when a ping command is issued, this file will resolve the name of the domain to the IP address of that domain, which means that it contains the data that attaches the domain to their respective IP Address. Once this happens, the website will be located, and then the system will be able to ping that website. If this file is missing or it is not set up correctly, then this error will be prompted as demonstrated below:

Solution: Configure the File

The most effective solution to this issue is to create the “resolv.conf” file on your system and set it up in the correct way to make it functional. The first step is to create the file within the “etc” directory as demonstrated below:

$ sudo vi /etc/resolv.conf

This command will either open up the file that currently exists or it will make a new file. Once the file opens, scroll down and find the following line to check if it exists:

If you can locate this inside your file, then skip to the next possible reason for this issue. Otherwise, continue with these steps. The next step is to open this file in an editor and add the following line to your file if it does not already exist:

$ sudo gedit /etc/resolv.conf

The file shown above will open up. Add the command shown below into that file, then save and exit as shown:

nameserver 8.8.8.8

After saving, utilize the ping once again, and you will see that the error has been resolved as shown below:

Reason 2: Firewall Problem

The second possible reason behind this issue is that certain firewall settings are stopping your command from working. These firewall settings revolve around port 53 and port 43. The 53 is utilized for DNS in your system, whereas the 43 is used for whois lookup, which is a protocol that is used for answering various TCP-based queries which is a standard protocol for various requests that are made.

Solution: Turn Off the Firewall Setting

To resolve this issue, the user simply needs to turn off the firewall for port numbers 53 and 43. This will enable those two settings and hence allow the DNS and whois to be utilized by the system. To disable the firewall for these ports, simply run the commands below:

$ sudo ufw allow 53/tcp

This command enables port 53, meaning that the firewall will no longer block the DNS on your system.

$ sudo ufw allow 43/tcp

This command enables port 43, meaning that the firewall will no longer block the protocol for blocking TCP queries.

$ sudo ufw reload

This command is used to reload the firewall on your system to apply the changes that are made to the system. All the commands mentioned above are demonstrated below:

Once reloaded, the error should no longer occur on your system.

Conclusion

The “Temporary failure in name resolution” problem is invoked due to 2 major reasons. One is that the “resolve.conf” file does not have its configuration completed correctly on your system. The other reason is that the firewall blocks ports “53” and “43” on your system. To fix this error, enable ports 53 and 43 on your firewall using the terminal. The other solution is to configure the “resolv.conf” correctly. This article has given a detailed guide on the reasoning behind this issue and demonstrated how it could be fixed.

DNS errors such as temporary failure in name resolution can easily cripple your server. You will not be able to install any yum packages, you will even not be able to ping google.com, because as you can see this is a name resolution error, which means your server can not resolve domain names to their respective IP Addresses (if you know about DNS, you will know that this is something the whole internet relies on).

In this article we will see how to resolve temporary failure in name resolution error, we will discuss various reasons and their respective solutions.


Missing DNS Server IPs

Every server needs IP of DNS servers to which they can send their DNS queries. So if IPs of DNS servers are not configured then your server doesn’t know how to resolve domain names to IP Address thus you will end up getting temporary failure in name resolution.

In UNIX based system (Linux servers). DNS servers are usually configured in a file called /etc/resolv.conf. So if you don’t have this file or it is empty then you can not resolve domain names, make sure to create one and put the following contents in it:

nameserver 1.1.1.1
nameserver 8.8.8.8

Network Manager

Recently most of the Linux based servers are shipped with NetworkManager. NetworkManager help your connect your server automatically to the internet, for this task network manager auto-generates some configuration files. NetworkManager reads your interface file (eth0 or ifcfg) and then auto-generates /etc/resolv.conf file.

Now if you have not defined DNS servers in your /etc/sysconfig/network-scripts file, then /etc/resolv.conf will remain empty, thus you end up getting temporary failure in name resolution error. You can also fix this issue by just populating /etc/resolv.conf file as described above.

Also, make sure that in your /etc/sysconfig/network-scripts file set NM_CONTROLLED=no. So that NetworkManager will not update your /etc/resolv.conf file again.

Having issues installing packages on Ubuntu

You might see something like

Err:1 http://security.ubuntu.com/ubuntu xenial-security InRelease
Temporary failure resolving ‘security.ubuntu.com’
Err:2 http://dl.google.com/linux/mod-pagespeed/deb stable InRelease
Temporary failure resolving ‘dl.google.com’
Err:3 http://mirrors.digitalocean.com/ubuntu xenial InRelease
Temporary failure resolving ‘mirrors.digitalocean.com’
Err:4 http://mirrors.digitalocean.com/ubuntu xenial-updates InRelease
Temporary failure resolving ‘mirrors.digitalocean.com’
Err:5 http://mirrors.digitalocean.com/ubuntu xenial-backports InRelease
Temporary failure resolving ‘mirrors.digitalocean.com’
Err:6 https://repos.sonar.digitalocean.com/apt main InRelease
Could not resolve host: repos.sonar.digitalocean.com

This is an example of temporary failure in name resolution error, as apt can not resolve these mentioned domains to their IP Address. Make sure to allow these ports in UFW using the command below :

sudo ufw allow out 53,113,123/udp


Restrictions in your Firewall

There might also be a firewall restriction preventing your DNS queries. That is why we always recommend installing CyberPanel for free, CyberPanel will open all default ports for you, it will also help you run a super-fast website. Install CyberPanel for free using the install guide. You can also learn how CyberPanel will help you run the super fast website by reading our OpenLiteSpeed vs NGINX article.

Let see if this is actually a firewall error by stopping the firewall.

Firewalld

systemctl stop firewalld

Or CSF

csf -f

Now test and see if your issue is resolved if so, it means that your firewall is preventing your DNS queries.

Fix for Firewalld

You can add port 53 (UDP) and 43 (whois) to your firewalld. Following commands can be used

firewall-cmd — permanent — add-port=56/udp

firewall-cmd — permanent — add-port=43/tcp

This will open DNS related ports in FirewallD. If you are using CyberPanel you can easily go to CyberPanel firewalld interface and add these ports without going to CLI.

Go to -> https://<IP Address>:8090/firewall/

There you can easily open these two ports.

Fix for CSF

Open file /etc/CSF/csf.conf, then find the line containing TCP_IN and TCP_OUT then add your desired ports. Once your desired ports are added simply restart CSF so that your changes can take effect

csf -r

To remove any ports, you can just remove those ports from same lines and restart CSF.

Again if you are using CyberPanel and you have installed CSF (this will disable Firewalld interface). You can easily go to -> https://<IP Address>:8090/firewall/csf

From there you can add your ports and CyberPanel will take care of everything.


Wrong permissions on /etc/resolv.conf file

In some rare cases it is possible that your resolver file have wrong owner or permissions, execute following commands to implement correct permissions

chown root:root /etc/resolv.conf

chmod 644 /etc/resolv.conf

This should fix any permissions related issues with the resolver file.


Conclusions

I hope by now you have a general idea of what actually is a temporary failure in name resolution error because to fix any error we first need to know what actually it is. Then we’ve also discussed various ways to fix this error in different situations.

If you are a system administrator, then the first rule to solving any problem is stay calm and debug the problem. However, if you don’t have much time and looking for experts to manage your server, you are in the right place, you can hire our managed vps service. We offer 3 days free trial (no credit card required).

Возможно, вам также будет интересно:

  • Время безжалостно к нашим ошибкам
  • Временная ошибка при разрешении ftp debian org
  • Время автономной работы истекло ошибка 478 что это значит
  • Временная ошибка при разрешении download astralinux ru
  • Время автономной работы истекло ошибка 478 меркурий что это

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

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