Меню

Временная ошибка при разрешении security debian org

Всем привет!
В общем недавно появилась такая проблема, имеется несколько серверов на debain 9, и не один из них не пингует домены ни ya.ru, ни deb.debain.org соответственно ни скачать, ни обновить пакеты я не могу.
Предыстория: Есть сервер на windows server 2016 standart на котором развернута hyper-v, внутри которого работают 4 сервера под deban 9, 1 на CentOS 7, 1 openwrt который соответственно и раздает интернет всему, что есть вообще в локальной сети.
На debain крутятся сервера с 1-jabber, 2-open-vpn, 3-icecast, 4-ut99, которые как были настроены так и забыты, с периодичностью обновления пакетов (apt updateupgrade)в какой-то момент заметил что нет соединения до репозитория deb.debain.org а так же squrity и т.д.

root@icecast2:/home/esmertec# apt update
Ошк:1 http://security.debian.org/debian-security stretch/updates InRelease
  Временная ошибка при попытке получить IP-адрес «security.debian.org»
Ошк:2 http://deb.debian.org/debian stretch InRelease
  Временная ошибка при попытке получить IP-адрес «deb.debian.org»
Ошк:3 http://deb.debian.org/debian stretch-updates InRelease
  Временная ошибка при попытке получить IP-адрес «deb.debian.org»
Чтение списков пакетов... Готово
Построение дерева зависимостей
Чтение информации о состоянии... Готово
Все пакеты имеют последние версии.
W: Не удалось получить http://deb.debian.org/debian/dists/stretch/InRelease  Временная ошибка при попытке получить IP-адрес «deb.debian.org»
W: Не удалось получить http://security.debian.org/debian-security/dists/stretch/updates/InRelease  Временная ошибка при попытке получить IP-адрес «security.debian.org»
W: Не удалось получить http://deb.debian.org/debian/dists/stretch-updates/InRelease  Временная ошибка при попытке получить IP-адрес «deb.debian.org»
W: Некоторые индексные файлы не скачались. Они были проигнорированы или вместо них были использованы старые версии.
root@icecast2:/home/esmertec#

Но самое смешное что интернет им предоставляется, т.е. icecast2 свободно стримит музыку «в мир», к джабберу можно подключиться и т.д.
Подскажите в чем может быть проблема? IP прописаны статически, конфликтов нет, dns так же прописаны верно, sources list не изменялся
P.S. CentOS 7 в сети чувствует себя отлично, т.е. его эта проблема не касается ни как, все работает штатно, на самом win сервере так же все отлично работает….

У меня есть приложение Rails , которое я хочу развернуть с помощью Docker на сервере Ubuntu . У меня уже настроен Dockerfile для приложения, сейчас я хочу просмотреть conf nginx в его контейнере.

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

docker run -i -t nginx:latest /bin/bash

Сейчас я пытаюсь установить редактор nano, чтобы просмотреть конфигурацию для nginx конфигурации (nginx.conf), используя следующие команды:

apt-get update
apt-get install nano
export TERM=xterm

Однако когда я запускаю первую команду apt-get update, я получаю сообщение об ошибке ниже:

Err:1 http://security.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian buster InRelease                  
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian buster-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done    
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

Я очень хорошо проверил, это не имеет ничего общего с сетевым подключением. Мне нужна помощь. Спасибо.

2 ответа

Я легко решил это с помощью .

- docker exec -it nginx bash (Go inside container)
- ping google.com (if not working)
- exit (Exit from container)
- sudo service docker restart

Пожалуйста, подтвердите также /etc/sysctl.conf

- net.ipv4.ip_forward = 1

sudo sysctl -p /etc/sysctl.conf


0

Jaydip Chabhadiya
3 Май 2020 в 04:57

Вот как я это решил :

Запустите Docker-контейнер для приложения в интерактивном режиме, в моем случае это контейнер nginx:

docker run -i -t nginx:latest /bin/bash

Выполните команду ниже, чтобы предоставить read разрешение роли others для файла resolv.conf:

chmod o+r /etc/resolv.conf

Примечание . Если эта проблема возникает на вашем хост-компьютере (ОС Ubuntu Linux), а не на контейнерах Docker, выполните ту же команду, добавив sudo к ней в терминале хост-машины:

sudo chmod o+r /etc/resolv.conf

Постарайтесь выйти из интерактивного терминала bash после запуска этого:

exit

А затем откройте новый интерактивный терминал bash и снова запустите команды:

apt-get update
apt-get install nano
export TERM=xterm

Теперь все должно работать нормально.

Ссылка на это в Цифровом океане: Apt ошибка: временная ошибка при разрешении deb.debian.org

Вот и все.

Надеюсь, это поможет


0

Promise Preston
2 Май 2020 в 22:58

So I denied everything except DNS, HTTPS and HTTP in the gufw firewall. ufw status verbose looks good with no DENY for port 53 and only allows at the bottom of it. I even executed sudo ufw allow 53/udp and also tried setting the DNS nameserver to 8.8.8.8. Still it doesn’t work: apt-get update gives me «Temporary failure resolving ‘security.debian.org'». Pings don’t work either.

In /var/log/syslog it also says:

WARNING: Can’t read main.cvd header from db.local.clamav.net (IP: )
WARNING: Can’t query current.cvd.clamav.net
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): ERROR: Can’t get information about database.clamav.net: Temporary failure in name resolution.

and

Activating service name=’org.kde.powerdevil.backlighthelper’ (using servicehelper)

avahi-daemon is set to DENY in case that matters.
Also a ClamAV scan found the same as listed in my question here

It worked earlier using iptables which basically had the same rules for DNS.

I’m running a freshly installed Debian 9.1 with KDE.

Any ideas what might be causing this? How can I get it working?

So I denied everything except DNS, HTTPS and HTTP in the gufw firewall. ufw status verbose looks good with no DENY for port 53 and only allows at the bottom of it. I even executed sudo ufw allow 53/udp and also tried setting the DNS nameserver to 8.8.8.8. Still it doesn’t work: apt-get update gives me «Temporary failure resolving ‘security.debian.org'». Pings don’t work either.

In /var/log/syslog it also says:

WARNING: Can’t read main.cvd header from db.local.clamav.net (IP: )
WARNING: Can’t query current.cvd.clamav.net
WARNING: Invalid DNS reply. Falling back to HTTP mode.
Reading CVD header (main.cvd): ERROR: Can’t get information about database.clamav.net: Temporary failure in name resolution.

and

Activating service name=’org.kde.powerdevil.backlighthelper’ (using servicehelper)

avahi-daemon is set to DENY in case that matters.
Also a ClamAV scan found the same as listed in my question here

It worked earlier using iptables which basically had the same rules for DNS.

I’m running a freshly installed Debian 9.1 with KDE.

Any ideas what might be causing this? How can I get it working?

I installed debian 11 Bullseye and here is my source.list file:

deb http://deb.debian.org/debian bullseye main contrib non-free
deb-src http://deb.debian.org/debian bullseye main contrib non-free

deb http://security.debian.org/debian-security bullseye-security main contrib non-free
deb-src http://security.debian.org/debian-security bullseye-security main contrib non-free

deb http://deb.debian.org/debian bullseye-updates main contrib non-free
deb-src http://deb.debian.org/debian bullseye-updates main contrib non-free

deb http://deb.debian.org/debian bullseye-backports main contrib non-free
deb-src http://deb.debian.org/debian bullseye-backports main contrib non-free

While I try to update with apt update, here are the errors I get:

Err:1 http://deb.debian.org/debian bullseye InRelease
Could not resolve 'deb.debian.org'
Err:2 http://security.debian.org.debian-security bullseye InRelease
Could not resolve 'deb.debian.org'
Err:3 http://deb.debian.org/debian bullseye-updates InRelease
Could not resolve 'deb.debian.org'
Err:4 http://security.debian.org.debian bullseye-backports InRelease
Could not resolve 'deb.debian.org'
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
All packages are up to date.
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/bullseye-security/InRelease Could not resolve 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-updates/InRelease Could not resolve 'deb.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/bullseye-backports/InRelease Could not resolve 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

What is wrong with my source.list file? Is there anything else to set up?

I have a Rails application that I want to deploy using Docker on an Ubuntu server. I have the Dockerfile for the application already set up, right now I want to view the nginx conf in its container.

I ran the command below to start an nginx container in an interactive mode:

docker run -i -t nginx:latest /bin/bash

Right now I am trying to install nano editor in order to view the configuration for nginx configuration (nginx.conf) using the commands below:

apt-get update
apt-get install nano
export TERM=xterm

However, when I run the first command apt-get update, I get the error below:

Err:1 http://security.debian.org/debian-security buster/updates InRelease
  Temporary failure resolving 'security.debian.org'
Err:2 http://deb.debian.org/debian buster InRelease                  
  Temporary failure resolving 'deb.debian.org'
Err:3 http://deb.debian.org/debian buster-updates InRelease
  Temporary failure resolving 'deb.debian.org'
Reading package lists... Done    
W: Failed to fetch http://deb.debian.org/debian/dists/buster/InRelease  Temporary failure resolving 'deb.debian.org'
W: Failed to fetch http://security.debian.org/debian-security/dists/buster/updates/InRelease  Temporary failure resolving 'security.debian.org'
W: Failed to fetch http://deb.debian.org/debian/dists/buster-updates/InRelease  Temporary failure resolving 'deb.debian.org'
W: Some index files failed to download. They have been ignored, or old ones used instead.

I have checked very well it has nothing to do with network connectivity. I would need some help. Thank you.

asked May 2, 2020 at 22:58

Promise Preston's user avatar

Promise PrestonPromise Preston

20.8k11 gold badges125 silver badges128 bronze badges

1

Try restarting docker. Worked for me.

sudo service docker restart or sudo /etc/init.d/docker restart

Prior to bumping into this issue, docker was working fine. If you never had docker working in the first place, you probably have a different issue.

answered Sep 24, 2020 at 20:14

Mario Olivio Flores's user avatar

4

Perhaps the network on the VM is not communicating with the default network created by docker during the build (bridge), so try «host» network :

docker build --network host -t [image_name]

answered Mar 19, 2021 at 20:00

manumazu's user avatar

manumazumanumazu

6034 silver badges2 bronze badges

6

If you have VPN running, stop it and try again. It solved for me!

answered Aug 14, 2020 at 15:26

Francisco Cardoso's user avatar

1

Here’s how I solved it:

Start the docker container for the application in an interactive mode, in my case it an nginx container :

docker run -i -t nginx:latest /bin/bash

Run the command below to grant read permission to the others role for the resolv.conf file:

chmod o+r /etc/resolv.conf

Note: If you are having this issue on your host machine (Ubuntu Linux OS) and not for the Docker containers, then run the same command adding sudo to it in the host machine terminal:

sudo chmod o+r /etc/resolv.conf

Endeavour to exit your bash interactive terminal once you run this:

exit

And then open a new bash interactive terminal and run the commands again:

apt-get update
apt-get install nano
export TERM=xterm

Everything should work fine now.

Reference to this on Digital Ocean: Apt error: Temporary failure resolving ‘deb.debian.org’

That’s all.

Asclepius's user avatar

Asclepius

54.3k16 gold badges156 silver badges139 bronze badges

answered May 2, 2020 at 22:58

Promise Preston's user avatar

Promise PrestonPromise Preston

20.8k11 gold badges125 silver badges128 bronze badges

1

sudo vi /etc/docker/daemon.json

and check flag of iptables, aslo add DNS if not added

{...., "iptables":true,"dns": ["8.8.8.8", "8.8.4.4"]}

then

sudo service docker restart

solved me

answered Apr 14, 2022 at 10:23

Victor Orletchi's user avatar

Victor OrletchiVictor Orletchi

4211 gold badge4 silver badges14 bronze badges

I had the same problem and in my case it was file access control.

I uses extended acls on the docker root folder and did not realize it, because they where inherited from the folder above (stupid idea to test docker in a «scratch» directory where permissions are set via extended acls).

This lead to the situation that «/etc/resolv.conf» had setting «640» inside the running docker container with a «+» marking the extended acls. But the image did not have extended acls installed and could not handle it.

The weird thing was that, as far as I can see, all other network tools worked (e.g. ping) but only apt could no access the DNS resolver.

After removing the extended acls from the docker root and setting the usual acls, everything worked inside the running container.

Similar to the answer of «Promise Prestion», but solved permanently for new containers, too.

answered Mar 25, 2021 at 14:50

Marco's user avatar

MarcoMarco

7496 silver badges11 bronze badges

0

Run this command:

echo -e «nameserver 8.8.8.8nnameserver 8.8.4.4» |sudo tee -a /etc/resolv.conf

After that run-

sudo apt-get update

This worked for me.

answered May 20, 2022 at 6:30

Md Ashikuzzaman 's user avatar

1

I easily resolved it via:

- docker exec -it nginx bash (Go inside container)
- ping google.com (if not working)
- exit (Exit from container)
- sudo service docker restart

Please also confirms /etc/sysctl.conf

- net.ipv4.ip_forward = 1

sudo sysctl -p /etc/sysctl.conf

answered May 3, 2020 at 4:57

Jaydip Chabhadiya's user avatar

Under Debian, as root, I’ve ran:

/etc/init.d/docker restart

This solved the issue for me.

Then build and run the container again.

sɐunıɔןɐqɐp's user avatar

sɐunıɔןɐqɐp

3,11915 gold badges34 silver badges39 bronze badges

answered Jan 27, 2021 at 19:17

JemmyX's user avatar

I was having the wrong DNS IP address in my /etc/docker/daemon.json. In my case, it was my home router DNS IP address and I was trying from the office network.
I found out my office DNS and updated with that.

{ 
  "dns": ["192.168.1.1"] 
}

Eric Aya's user avatar

Eric Aya

69k35 gold badges179 silver badges250 bronze badges

answered Jun 29, 2022 at 17:59

shubham rasal's user avatar

1

Similar issue, under debian.
Root cause was a bad DOCKER-USER rule in iptables chain

Those rules have been haded

iptables -I DOCKER-USER -i eno1 -j DROP
iptables -I DOCKER-USER -s 90.62.xxx.xx/32 -i eno1 -j ACCEPT

so removing temporarily following rule fix the point

iptables -D DOCKER-USER -i eno1 -j DROP

answered Jul 15, 2021 at 13:35

c-tools's user avatar

Coming here from some docker cross compiling headache:

While forking some repo I manually downloaded its root folder containing confd stuff and added it just like the original maintainer did.

ADD root /

after this I was not able to apt update anymore.

I found that the permission of my root named folder was wrong. stat -f "%OLp" root revealed it is 700, but must be 755 to work.

answered Oct 9, 2021 at 22:02

Max's user avatar

MaxMax

4822 gold badges4 silver badges14 bronze badges

I had a similar issue, I tried many suggested solutions, but my issue was gone after I rebooted my VM.

Asclepius's user avatar

Asclepius

54.3k16 gold badges156 silver badges139 bronze badges

answered Sep 2, 2020 at 14:30

babis21's user avatar

babis21babis21

1,2651 gold badge15 silver badges27 bronze badges

I’m using Arch version 6.0.11 and docker version 20.10.21, and having this issues inside docker containers.

Thanks to @Marco, that was the initial hint to solve this. The problem is related to the use of extended ACLs in the host system.

The docker root folder has ACLs, you can see this as it has a plus sign at the end of permissions «+»:

$ sudo ls -lh /var/lib/docker
drw-rw-r--+    3 root root 4.0K Nov 24  2021 network

And what is the problem? Some docker images does not have ACLs installed, so as it was pointed this causes an issue.

Other network tools like curl resolved DNS properly, but apt or git have problems with DNS resolution.


TLDR; Where is the fix? Modify ACL to set default rx to others.

setfacl -R -d -m o::rx /var/lib/docker

After that, all network tools will be able to perform DNS resolution.

Credits:

Marco comment

Closed git issue in docker

Antoine's user avatar

Antoine

1,3674 gold badges20 silver badges26 bronze badges

answered Dec 11, 2022 at 18:55

A.Rodriguez's user avatar

  • Печать

Страницы: [1]   Вниз

Тема: Новичёк Debian: apt-get update — Не нашёл IP  (Прочитано 5243 раз)

0 Пользователей и 1 Гость просматривают эту тему.

Оффлайн
Petro78


Оффлайн
Quixotic


Оффлайн
Petro78

там форум «менее живой»


Пользователь решил продолжить мысль 21 Февраля 2011, 10:54:52:


нужен Tomcat из репозитария и JDK6

« Последнее редактирование: 21 Февраля 2011, 10:54:52 от Petro78 »


Оффлайн
easy2002

Tempora mutantur et nos mutantur in illis


Оффлайн
Petro78

3 строки нарыл в инете.
Мне нужен лист для минимальной конфигурации (у прова стоит Debian6 mini)
Т.е. можно оставить 1 строку для безопасности и потом добавить для томката и java
PS/
Сеть на статичных IP сделал, но всё равно ошибка


Оффлайн
лесной_зонтик

Моя мечта поставить на комп Linux, Unix, *BSD, Mac OS X, OpenSolaris, OS/2, Windows.
Не спрашивайте зачем. Сам не знаю ???


Оффлайн
Petro78


Оффлайн
easy2002

deb http://ftp.ru.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ squeeze-proposed-updates main contrib non-free

Tempora mutantur et nos mutantur in illis


Оффлайн
Petro78

deb http://ftp.ru.debian.org/debian/ squeeze main contrib non-free
deb http://security.debian.org/ squeeze/updates main contrib non-free
deb http://ftp.ru.debian.org/debian/ squeeze-proposed-updates main contrib non-free

# apt-get update
Ош  http://ftp.ru.debian.org squeeze Release.gpg                                           
  Не удалось найти IP адрес для ftp.ru.debian.org
тут, может у меня с dnshosts… что не так?


Пользователь решил продолжить мысль 21 Февраля 2011, 15:05:55:


спс за ссылки.
Заработало (часть проблем было из за нестабильного выхода в инет)
Java поставил так:
apt-get install sun-java6-jre

« Последнее редактирование: 21 Февраля 2011, 15:05:55 от Petro78 »


  • Печать

Страницы: [1]   Вверх

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

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

А вот еще интересные материалы:

  • Яшка сломя голову остановился исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного исправьте ошибки
  • Ясность цели позволяет целеустремленно добиваться намеченного где ошибка
  • Временная ошибка при разрешении ftp debian org
  • Временная ошибка при разрешении deb debian org