LoginSignup
0
1

More than 5 years have passed since last update.

Jenkins が yum update できない問題のメモ書き

Last updated at Posted at 2017-10-26

久しぶりに Jenkins をアップデートしようとしましたが、問題が発生したので対策のメモ書きです。

現象

下記の環境で Jenkins をアップデートしようとすると、パッケージのダウンロード接続先が Timeout になりました。

OS: Amazon Linux AMI release 2017.09
パッケージ管理: yum-3.4.3-150.70.amzn1.noarch at 2017-08-13 02:16

Downloading packages:
jenkins-2.86-1.1.noarch.rpm    FAILED
http://pkg.jenkins.io/redhat/jenkins-2.86-1.1.noarch.rpm: [Errno 12] Timeout on http://pkg.jenkins.io/redhat/jenkins-2.86-1.1.noarch.rpm: (28, 'Connection timed out after 5000 milliseconds')
Trying other mirror.

Jenkins のインストールは http://pkg.jenkins-ci.org/redhat/ に書いてある手順を実行しました。
Java8 など必要なツールは別途インストール済みです。

> sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat/jenkins.repo
> sudo rpm --import https://pkg.jenkins.io/redhat/jenkins.io.key
> sudo yum install jenkins

原因

このあたりの Issue が該当するようです。
INFRA-153: Official Redhat yum repo (and mirrors) missing required repomd.xml

http がブロックされており、設定ファイルでは http で接続するようになっているためのようです。

対策

ダウンロード接続先を https 化してみました。
具体的には、 /etc/yum.repos.d/jenkins.repo を下記のように書き換えました。
baseurlhttp から https に書き換えただけです。

/etc/yum.repos.d/jenkins.repo(修正前)
[jenkins]
name=Jenkins
baseurl=http://pkg.jenkins.io/redhat
gpgcheck=1
/etc/yum.repos.d/jenkins.repo(修正後)
[jenkins]
name=Jenkins
baseurl=https://pkg.jenkins.io/redhat
gpgcheck=1

おわりに

上記の対策で Jenkins のアップデートができるようになりました。
Google も https 化を推進しているので、 その流れの一環なのでしょうか?

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1