当我尝试添加存储库时,为什么 ubuntu 的密钥服务器超时了?

当我尝试添加存储库时,为什么 ubuntu 的密钥服务器超时了?

有些原因导致无法从 keyserver.ubuntu.com 接收密钥,我甚至不知道从哪里开始尝试解决这个问题。

作为示例,我们将使用此处的 Spotify Linux 应用程序:http://www.spotify.com/us/download/previews/

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv-keys 4E9CFF4E
gpg: requesting key 4E9CFF4E from hkp server keyserver.ubuntu.com
gpg: keyserver timed out
gpg: keyserver receive failed: keyserver error

不过要明确的是,这与 Spotify 无关。每次我尝试从 ubuntu 获取密钥时,都会得到相同的结果。我这边出了问题。一如既往,任何帮助追踪此事的帮助都会很感激。


在提交此信息之前,我发现问题出在我的 DNS 和/或路由器上。目前,我的路由器配置为使用 Google DNS(8.8.8.8 / 8.8.4.4),并且在我的路由器日志中,我收到大量 DNS 错误。以下是摘录:

(GMT-06:00)02:48:10 Tue Sep 06 2011 syslog: failed dns request len=145,srcip=8.8.4.4, url=_pgpkey-http._tcp.keyserver.ubuntu.com  
(GMT-06:00)02:48:12 Tue Sep 06 2011 syslog: No response for DNS request to server 68.94.156.1 yet. 
(GMT-06:00)02:48:14 Tue Sep 06 2011 syslog: No response for DNS request to server 68.94.157.1 yet. 
(GMT-06:00)02:48:14 Tue Sep 06 2011 syslog: failed dns request len=83,srcip=192.168.0.1, url=keyserver.ubuntu.com.domain.actdsltmp  
(GMT-06:00)02:48:14 Tue Sep 06 2011 syslog: All DNS servers tried, no response. 
(GMT-06:00)02:48:14 Tue Sep 06 2011 syslog: failed dns request len=158,srcip=8.8.4.4, url=keyserver.ubuntu.com.domain.actdsltmp  
(GMT-06:00)02:49:02 Tue Sep 06 2011 syslog: failed dns request len=145,srcip=8.8.4.4, url=_pgpkey-http._tcp.keyserver.ubuntu.com  
(GMT-06:00)02:49:05 Tue Sep 06 2011 syslog: No response for DNS request to server 68.94.156.1 yet. 
(GMT-06:00)02:49:07 Tue Sep 06 2011 syslog: failed dns request len=158,srcip=8.8.4.4, url=keyserver.ubuntu.com.domain.actdsltmp  
(GMT-06:00)02:49:08 Tue Sep 06 2011 syslog: No response for DNS request to server 68.94.157.1 yet. 
(GMT-06:00)02:49:08 Tue Sep 06 2011 syslog: failed dns request len=83,srcip=192.168.0.1, url=keyserver.ubuntu.com.domain.actdsltmp  
(GMT-06:00)02:49:08 Tue Sep 06 2011 syslog: All DNS servers tried, no response. 

非常困惑。我甚至不确定我现在是否在正确的 StackExchange 网站上发布了这篇文章。

答案1

(OP 已解决该问题并以评论形式发布答案)

显然,答案是花几个小时进行无数次故障排除,结果却发现你通过防火墙阻止了自己。DNS 错误会从防火墙阻止中传播,这似乎仍然很奇怪,但唉……它成功了

相关内容