繁体   English   中英

无法在 rhel8 中使用 yum 更新 jenkins

[英]Unable to update jenkins using yum in rhel8

我已经按照他们的文档安装了 jenkins。 然后当我尝试更新 jenkins 时,它给出了这些奇怪的错误。 端口 443 和 80 已打开。 可以在这个问题上提供任何帮助。

日志:

[root@server ~]# cat /etc/yum.repos.d/jenkins.repo
[jenkins]
name=Jenkins-stable
baseurl=http://pkg.jenkins.io/redhat-stable
gpgcheck=1 
[root@server ~]# cat /etc/yum.conf                                                                                           
[main]
gpgcheck=1
installonly_limit=3
clean_requirements_on_remove=True
best=True
skip_if_unavailable=False
ip_resolve=4
[root@mcdefrapl008 ~]#
[root@server ~]# yum update                                                                                                
Jenkins-stable                                                                                     0.0  B/s |   0  B     00:00    
Errors during downloading metadata for repository 'jenkins':
  - Curl error (56): Failure when receiving data from the peer for http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml [Recv fa
ilure: Connection reset by peer]
Error: Failed to download metadata for repo 'jenkins': Cannot download repomd.xml: Cannot download repodata/repomd.xml: All mirrors
 were tried
[root@server ~]# curl http://pkg.jenkins.io/redhat-stable/repodata/repomd.xml -v
*   Trying 151.101.2.133...
* TCP_NODELAY set
* Connected to pkg.jenkins.io (151.101.2.133) port 80 (#0)
> GET /redhat-stable/repodata/repomd.xml HTTP/1.1
> Host: pkg.jenkins.io
> User-Agent: curl/7.61.1
> Accept: */*
> 
* Recv failure: Connection reset by peer
* Closing connection 0
curl: (56) Recv failure: Connection reset by peer
[root@mcdefrapl008 ~]#

顺便提一下,当我在浏览器中打开 url 时,它会重定向到 https。

yum不会自动重定向到https 所以在你的 repo https中设置并重试。

[jenkins]
name=Jenkins-stable
baseurl=https://pkg.jenkins.io/redhat-stable
gpgcheck=1 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM