Understand Redhat Yum mirrors issues - linux

I'm using RHVH to manage my infrastructure VMs.
I've two bare metal servers in two different network subnets with same release version of RHVH.
I use an automated script to deploy VMs on both, and provision a docker repository file there on VMs.
The issue I'm facing is when I'm trying to query container-selinux package. It works on VMs from one of my bare metal servers, and not from the other.
first sever's VM:
[root#cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
container-selinux|2|2.107|1.el7_6|noarch|extras
container-selinux|2|2.107|3.el7|noarch|extras
[root#cpu-node0 ~]#
Second server's VM :
[root#cpu-node0 ~]# /bin/repoquery --show-duplicates --plugins --disablerepo '' --enablerepo '' --qf '%{name}|%{epoch}|%{version}|%{release}|%{arch}|%{repoid}' container-selinux
Could not match packages: failure: repodata/repomd.xml from docker-engine: [Errno 256] No more mirrors to try.
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
[root#cpu-node0 ~]#
The yum repo configuration on both VMs running on each bare metal server:
[root#cpu-node0 ~]# ll /etc/yum.repos.d/
total 44
-rw-r--r--. 1 root root 1664 5 sept. 13:05 CentOS-Base.repo
-rw-r--r--. 1 root root 1309 5 sept. 13:05 CentOS-CR.repo
-rw-r--r--. 1 root root 649 5 sept. 13:05 CentOS-Debuginfo.repo
-rw-r--r--. 1 root root 314 5 sept. 13:05 CentOS-fasttrack.repo
-rw-r--r--. 1 root root 630 5 sept. 13:05 CentOS-Media.repo
-rw-r--r--. 1 root root 1331 5 sept. 13:05 CentOS-Sources.repo
-rw-r--r--. 1 root root 6639 5 sept. 13:05 CentOS-Vault.repo
-rw-r--r--. 1 root root 369 2 mars 23:31 docker.repo
-rw-r--r--. 1 root root 1050 17 sept. 23:25 epel.repo
-rw-r--r--. 1 root root 1149 17 sept. 23:25 epel-testing.repo
[root#cpu-node0 ~]#
docker.repo file content on both VMs :
[root#cpu-node0 ~]# cat /etc/yum.repos.d/docker.repo
[docker-ce]
name=Docker-CE Repository
baseurl=https://download.docker.com/linux/centos/7/$basearch/stable
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://download.docker.com/linux/centos/gpg
[docker-engine]
name=Docker-Engine Repository
baseurl=https://yum.dockerproject.org/repo/main/centos/7
enabled=1
gpgcheck=1
keepcache=1
gpgkey=https://yum.dockerproject.org/gpg
[root#cpu-node0 ~]#
Repo list on the first VM :
[root#cpu-node0 ~]# yum repolist
id du dépôt nom du dépôt statut
base/7/x86_64 CentOS-7 - Base 10 097
docker-ce/x86_64 Docker-CE Repository 68
!docker-engine Docker-Engine Repository 110
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13 199
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1 478
repolist: 25 275
[root#cpu-node0 ~]#
Yum repo list on the second VM:
[root#cpu-node0 ~]# yum repolist
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
To address this issue please refer to the below wiki article
https://wiki.centos.org/yum-errors
If above article doesn't help to resolve this issue please use https://bugs.centos.org/.
docker-ce/x86_64/primary_db | 40 kB 00:00:05
https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml: [Errno 14] HTTPS Error 404 - Not Found
Essai d'un autre miroir.
id du dépôt nom du dépôt statut
base/7/x86_64 CentOS-7 - Base 10 097
docker-ce/x86_64 Docker-CE Repository 68
docker-engine Docker-Engine Repository 0
epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 13 199
extras/7/x86_64 CentOS-7 - Extras 323
updates/7/x86_64 CentOS-7 - Updates 1 478
repolist: 25 165
[root#cpu-node0 ~]#
I also get the message below when trying to curl the repository URL :
[root#cpu-node0 ~]#curl https://yum.dockerproject.org/repo/main/centos/7/repodata/repomd.xml
<!doctype html>
<html lang="en">
<head></head>
<body>
<h1>Notice: Shutting down dockerproject.org APT and YUM repos 2020-03-31</h1>
<p>Docker will be shutting down the deprecated APT and YUM repositories hosted at "dockerproject.org" and "dockerproject.com" on the 31st of March 2020.</p>
<p>We noticed that this project is referencing one of these repositories, and recommend updating to use the "download.docker.com" repository to prevent disruption.</p>
<p>More info: https://www.docker.com/blog/changes-dockerproject-org-apt-yum-repositories/ </p>
</body>
</html>
Looks like docker does not want anyone to use this repo anymore. Probably they started issuing the error from today I guess.
Of course the two VMs do not have subscription-manager package installed, neither subscription attached, they don't need actually in our context, but why is there a mirror issue on one VM and not on the other, whose OS and system configuration is the same on both, except that they are locate in two different networks?

Looks like yum docker-engine querying came back to a normal state
Even docker project url curling is working without the warning message seen in my first post
Looks like the deployment process hit a bad state in the public repo and hence caused these errors.

Related

dpkg error trying to install packages- "unable to open files list file for package linux-headers-generic: No such device or address"

Trying to run routine updates using Mint-update (19.3 Tricia) and I'm running into an issue I haven't seen before.
When I try to install, I get the following:
dpkg: unrecoverable fatal error, aborting:
unable to open files list file for package 'linux-headers-generic': No such device or address
E: Sub-process /usr/bin/dpkg returned an error code (2)
After some Googling, I tried to manually repair by running
sudo apt-get install --reinstall linux-headers-$(uname -r)
But got the same error.
I suspect the problem is a broken link or reference, as I was dropped into initramfs on boot yesterday, which required some repairs to proceed. I have no idea what links or problems to look for since I've never poked around in that sort of thing for the OS, but I did see the following:
linux-headers-generic.list looks ok in /var/lib/dpkg/info:
b-w-rwx-wx 1 20033 root 243, 10 Jul 21 08:15 linux-headers-generic.list
-rw-r--r-- 1 root root 163 Jul 9 16:21 linux-headers-generic.md5sums
I also saw the following files for my current kernel if this helps:
-rw-r--r-- 1 root root 803877 Jul 21 08:15 linux-headers-4.15.0-151-generic.list
-rw-r--r-- 1 root root 820163 Jul 9 16:19 linux-headers-4.15.0-151-generic.md5sums
-rwxr-xr-x 1 root root 259 Jul 9 16:19 linux-headers-4.15.0-151-generic.postinst
-rw-r--r-- 1 root root 1179614 Jul 21 08:15 linux-headers-4.15.0-151.list
-rw-r--r-- 1 root root 1482865 Jul 9 16:19 linux-headers-4.15.0-151.md5sums
No idea if this problem is connected, but these are the first install errors I've seen in a LONG time.

"yum repolist" showing repo list but there is NO repo file in /etc/yum.repo.d

Could any one look into the issue and help ?
I have a Red Hat server which has Red Hat subscription and I tried to get all Security patches list using /usr/bin/yum list-security --security.
After executing above command, I see all the packages that listed are SuSE packages. Not sure why.
[root#test ~]# /usr/bin/yum list-security --security
Loaded plugins: rhnplugin, security
slessp3-bash-9740 security bash-3.2-147.20.1.x86_64
slessp3-bash-9780 security bash-3.2-147.22.1.x86_64
slessp3-binutils-201501-10214 security binutils-2.23.1-0.23.15.x86_64
Tried to verify the yum repository using yum repolist and I see the SuSE repo is enabled. But I didn't see repo file under yum.repos.d to disable.
[root#test ~]# yum repolist
Loaded plugins: rhnplugin, security
repo id repo name status
rhel-source Red Hat Enterprise Linux 5Server - Source enabled: 5,076
rpmforge RHEL 5Server - RPMforge.net - dag enabled: 11,403
sles11-sp3-pool-x86_64 SLES11-SP3-Pool for x86_64 enabled: 2,862
sles11-sp3-suse-manager-tools-x86_64 SLES11-SP3-SUSE-Manager-Tools x86_64 enabled: 121
sles11-sp3-updates-x86_64 SLES11-SP3-Updates for x86_64 enabled: 3,618
repolist: 23,080
[root#test yum.repos.d]# ls -lrt
total 28
-rw-r--r-- 1 root root 561 Jan 14 2015 rhel-debuginfo.repo
-rw-r--r-- 1 root root 1128 Mar 15 2012 rpmforge.repo
-rw-r--r-- 1 root root 728 Mar 15 2012 mirrors-rpmforge-testing
-rw-r--r-- 1 root root 739 Mar 15 2012 mirrors-rpmforge
-rw-r--r-- 1 root root 222 Sep 17 12:20 rhel-source.repo

Jenkins build from git repository in Dropbox

I have a main Git bare repository in my Dropbox folder and I'm using a headless Debian server which runs Jenkins to build my projects.
Until now I've been using this approach to build my projects: I created a bare git repository on my headless server and configured the Jenkins job to pull the sources from this repository with the following URL: /var/cache/git/project. So when I want Jenkins to build my changes, I have to push them to this repository. This works fine, but it's not very convenient because I have to manually push to two repositories (Dropbox and Debian) and also when I want to add a new project, I need to create a new repository on the Debian server.
So I decided to configure the Jenkins jobs to pull directly from the Dropbox repositories. I've set up Dropbox on my Debian server at /home/jardo/Dropbox.
But when I try to configure the Jenkins job to pull drom URL /home/jardo/Dropbox/git/project.git, I get the following error:
Failed to connect to repository : Command "git ls-remote -h /home/jardo/Dropbox/git/project.git HEAD" returned status code 128:
stdout:
stderr: fatal: '/home/jardo/Dropbox/git/project.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
How come Jenkins is able to clone from /var/cache/git/project, but not from my Dropbox folder? Dropbox is completely synced and the repository content looks ok. I've set permissions on the whole repository recursively to 777 and that didn't help.
Here is the output of ls -l on my Dropbox repository:
-rwxrwxrwx 1 jardo jardo 104 Dec 15 21:10 config
-rwxrwxrwx 1 jardo jardo 73 Dec 15 21:10 description
-rwxrwxrwx 1 jardo jardo 23 Dec 15 21:10 HEAD
drwxrwxrwx 2 jardo jardo 4096 Dec 24 13:16 hooks
drwxrwxrwx 2 jardo jardo 4096 Dec 24 13:01 info
drwxrwxrwx 150 jardo jardo 4096 Dec 24 13:01 objects
drwxrwxrwx 4 jardo jardo 4096 Dec 24 12:59 refs
It turned out that user Jenkins could not access the GIT repository, which was owned by user Jardo, even when I tried to set its permissions recursively to 777. The solution was to setup Dropbox also for user Jenkins.

Redmine installation

i have been fighting for many years to install Redmine on Debian/Wheezy.
I followed the following tutorial: enter link description here.
But when I restart my Apache server, the redmine web page only displays the list of the files of the Remdine directory.
Could you please help to solve this problem?
Thank you
EDIT:
I am making progress... Phusion Passenger was not installed, so I did it.
But, I still have another error which is displayed when I connect to my Redmine web page:
Permission denied - /etc/redmine/default/database.yml (Errno::EACCES)
/usr/lib/ruby/vendor_ruby/rails/application/configuration.rb:115:in `read'
/usr/lib/ruby/vendor_ruby/rails/application/configuration.rb:115:in `database_configuration'
/usr/lib/ruby/vendor_ruby/active_record/railtie.rb:78:in `block (2 levels) in <class:Railtie>'
The permissions are the following ones:
-rw-r--r-- 1 www-data www-data 112 août 8 18:11 database.yml
-rw-r--r-- 1 www-data www-data 911 août 8 18:11 session.yml
I finally successed to install and run Redmine.
The permission on the database.yml file was correct but not on the parent directory.
Now it works.

Git connection error : HTTP request failed

I've got a problem with git, which I used for years without problem, and which suddenly doesn't work anymore for any operation concerning remote repository (pull, push, clone).
Any of these operations returns :
error: couldn't connect to host while accessing https://me#bitbucket.org/me/myrepo.git/info/refs
fatal: HTTP request failed
I also tried with a repo hosted on github, it's the same.
BUT it works as sudo for example sudo git pull.
It really annoy me since it has always worked perfectly, and since I don't remember doing anything that could affect its behaviour (no system updates, no change of network configuration)
I already had a look to similar questions (this one and this another one) but it didn't help.
My config:
git version 1.7.9.5
Linux Mint 13 Maya
EDIT :
permissions of ~/.ssh and ~/.ssh/*
drwx------ 2 quentin quentin 4096 déc. 7 21:35 .ssh
-rw------- 1 quentin quentin 1766 déc. 7 21:34 id_rsa
-rw-r--r-- 1 quentin quentin 401 déc. 7 21:16 id_rsa.pub
-rw-r--r-- 1 quentin quentin 4968 déc. 7 21:32 known_hosts
EDIT 2:
Here's the result of strace git pull : http://pastebin.com/bAvBac22
Thanks to everyone that have an idea of what is wrong

Resources