Kubernetes 1.6 install issue with centos 7 - kubernetes

I am trying to install kubernetes on my centos 7 machine. added below yum repo. when I install the package its giving version 1.6 & 1.5.
unable to install the kubernetes package in my master server.
[root#centos-master yum.repos.d]# yum list|grep kube
kubeadm.x86_64 1.6.2-0 #kubernetes
kubectl.x86_64 1.6.2-0 #kubernetes
kubelet.x86_64 1.6.2-0 #kubernetes
kubernetes-cni.x86_64 0.5.1-0 #kubernetes
cockpit-kubernetes.x86_64 135-4.el7.centos extras
kubernetes.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-client.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-master.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-node.x86_64 1.5.2-0.5.gita552679.el7 extras
kubernetes-unit-test.x86_64 1.5.2-0.5.gita552679.el7 extras
rkt.x86_64 1.25.0-1 kubernetes
here is the report for api server.
# yum provides kube-apiserver
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
kubernetes-master-1.3.0-0.3.git86dc49a.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.4.0-0.1.git87d9d8d.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.2.gitc55cf2b.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64 : Kubernetes services for master host
Repo : extras
Matched from:
Filename : /usr/bin/kube-apiserver
repo added.
# cat kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=http://yum.kubernetes.io/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg
https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
how can I install 1.6 version. here is the error message.
yum install kubernetes
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
* base: mirror.dallas-tx.riverfrontnetworks.com
* extras: cosmos.illinois.edu
* updates: mirror.solarvps.com
Resolving Dependencies
--> Running transaction check
---> Package kubernetes.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-node = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Processing Dependency: kubernetes-master = 1.5.2-0.5.gita552679.el7 for package: kubernetes-1.5.2-0.5.gita552679.el7.x86_64
--> Running transaction check
---> Package kubernetes-master.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Processing Dependency: kubernetes-client = 1.5.2-0.5.gita552679.el7 for package: kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64
---> Package kubernetes-node.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Running transaction check
---> Package kubernetes-client.x86_64 0:1.5.2-0.5.gita552679.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
===============================================================================================================================================================================================================
Package Arch Version Repository Size
===============================================================================================================================================================================================================
Installing:
kubernetes x86_64 1.5.2-0.5.gita552679.el7 extras 36 k
Installing for dependencies:
kubernetes-client x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
kubernetes-master x86_64 1.5.2-0.5.gita552679.el7 extras 25 M
kubernetes-node x86_64 1.5.2-0.5.gita552679.el7 extras 14 M
Transaction Summary
===============================================================================================================================================================================================================
Install 1 Package (+3 Dependent packages)
Total download size: 53 M
Installed size: 302 M
Is this ok [y/d/N]: y
Downloading packages:
(1/4): kubernetes-1.5.2-0.5.gita552679.el7.x86_64.rpm | 36 kB 00:00:00
(2/4): kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:07
(3/4): kubernetes-master-1.5.2-0.5.gita552679.el7.x86_64.rpm | 25 MB 00:00:12
(4/4): kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64.rpm | 14 MB 00:00:06
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 3.8 MB/s | 53 MB 00:00:14
Running transaction check
Running transaction test
Transaction check error:
file /usr/bin/kubectl from install of kubernetes-client-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubectl-1.6.2-0.x86_64
file /usr/bin/kubelet from install of kubernetes-node-1.5.2-0.5.gita552679.el7.x86_64 conflicts with file from package kubelet-1.6.2-0.x86_64
Thanks
SR

For kubernetes 1.6.2 we need only these rpms. when we run the
kubeadm init
command. it starts other process automatically.
# rpm -qa |grep kube
kubelet-1.6.2-0.x86_64
kubeadm-1.6.2-0.x86_64
kubernetes-cni-0.5.1-0.x86_64
kubectl-1.6.2-0.x86_64
More info here:
https://kubernetes.io/docs/getting-started-guides/kubeadm/
Thanks
SR

You seem to have installed kubelet & kubectl 1.5.2 already.You can uninstall 1.5.2 and retry the install of 1.6.x.
Yum normally installs the latest version of a package, regardless of which repository provides it.In this case it has a conflicting package already installed.
Edit: Removed the Centos extras reference as it was out of context.

Related

Could not access file "pglogical" while trying to install pglogical

I'm following instructions from https://github.com/2ndQuadrant/pglogical to install pglogical on postgres 12 on Centos 8. The install seems be successful:
yum -y install postgresql12-pglogical
Last metadata expiration check: 0:21:30 ago on Wed 30 Sep 2020 09:32:13 PM CDT.
Dependencies resolved.
=====================================================================================================================================================================================================================================================
Package Architecture Version Repository Size
=====================================================================================================================================================================================================================================================
Installing:
postgresql12-pglogical x86_64 2.3.2-1.el8 2ndquadrant-dl-default-release-pg12 145 k
Installing dependencies:
postgresql12 x86_64 12.4-1PGDG.rhel8 pgdg12 1.6 M
postgresql12-server x86_64 12.4-1PGDG.rhel8 pgdg12 5.2 M
Transaction Summary
=====================================================================================================================================================================================================================================================
Install 3 Packages
Total download size: 7.0 M
Installed size: 29 M
Downloading Packages:
(1/3): postgresql12-12.4-1PGDG.rhel8.x86_64.rpm 1.5 MB/s | 1.6 MB 00:01
(2/3): postgresql12-pglogical-2.3.2-1.el8.x86_64.rpm 117 kB/s | 145 kB 00:01
(3/3): postgresql12-server-12.4-1PGDG.rhel8.x86_64.rpm 4.0 MB/s | 5.2 MB 00:01
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total 5.3 MB/s | 7.0 MB 00:01
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : postgresql12-12.4-1PGDG.rhel8.x86_64 1/3
Running scriptlet: postgresql12-12.4-1PGDG.rhel8.x86_64 1/3
failed to link /usr/bin/psql -> /etc/alternatives/pgsql-psql: /usr/bin/psql exists and it is not a symlink
failed to link /usr/bin/clusterdb -> /etc/alternatives/pgsql-clusterdb: /usr/bin/clusterdb exists and it is not a symlink
failed to link /usr/bin/createdb -> /etc/alternatives/pgsql-createdb: /usr/bin/createdb exists and it is not a symlink
failed to link /usr/bin/createuser -> /etc/alternatives/pgsql-createuser: /usr/bin/createuser exists and it is not a symlink
failed to link /usr/bin/dropdb -> /etc/alternatives/pgsql-dropdb: /usr/bin/dropdb exists and it is not a symlink
failed to link /usr/bin/dropuser -> /etc/alternatives/pgsql-dropuser: /usr/bin/dropuser exists and it is not a symlink
failed to link /usr/bin/pg_basebackup -> /etc/alternatives/pgsql-pg_basebackup: /usr/bin/pg_basebackup exists and it is not a symlink
failed to link /usr/bin/pg_dump -> /etc/alternatives/pgsql-pg_dump: /usr/bin/pg_dump exists and it is not a symlink
failed to link /usr/bin/pg_dumpall -> /etc/alternatives/pgsql-pg_dumpall: /usr/bin/pg_dumpall exists and it is not a symlink
failed to link /usr/bin/pg_restore -> /etc/alternatives/pgsql-pg_restore: /usr/bin/pg_restore exists and it is not a symlink
failed to link /usr/bin/reindexdb -> /etc/alternatives/pgsql-reindexdb: /usr/bin/reindexdb exists and it is not a symlink
failed to link /usr/bin/vacuumdb -> /etc/alternatives/pgsql-vacuumdb: /usr/bin/vacuumdb exists and it is not a symlink
Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Installing : postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Running scriptlet: postgresql12-server-12.4-1PGDG.rhel8.x86_64 2/3
Installing : postgresql12-pglogical-2.3.2-1.el8.x86_64 3/3
Running scriptlet: postgresql12-pglogical-2.3.2-1.el8.x86_64 3/3
Verifying : postgresql12-pglogical-2.3.2-1.el8.x86_64 1/3
Verifying : postgresql12-12.4-1PGDG.rhel8.x86_64 2/3
Verifying : postgresql12-server-12.4-1PGDG.rhel8.x86_64 3/3
Installed:
postgresql12-12.4-1PGDG.rhel8.x86_64 postgresql12-pglogical-2.3.2-1.el8.x86_64 postgresql12-server-12.4-1PGDG.rhel8.x86_64
Complete!
But when I try to restart postgres, I get this error
systemctl restart postgresql
Job for postgresql.service failed because the control process exited with error code.
See "systemctl status postgresql.service" and "journalctl -xe" for details.
Relevant portions of the journalctl -xe
-- Unit postgresql.service has begun starting up.
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] FATAL: could not access file "pglogical": No such file or directory
Sep 30 21:54:59 aba postmaster[305963]: 2020-10-01 02:54:59.825 UTC [305963] LOG: database system is shut down
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Main process exited, code=exited, status=1/FAILURE
Sep 30 21:54:59 aba systemd[1]: postgresql.service: Failed with result 'exit-code'.
Sep 30 21:54:59 aba systemd[1]: Failed to start PostgreSQL database server.
-- Subject: Unit postgresql.service has failed
-- Defined-By: systemd
-- Support: https://access.redhat.com/support
--
-- Unit postgresql.service has failed.
--
-- The result is failed.
I am lost!
Your session log tells the the server was installed as a prerequisite, but the "link" messages insinuate that there was already an incompatible client version in place. Probably you had installed PostgreSQL from the CentOS packages, but the pglogical RPMs pulled in the PGDG packages.
The error message probably means that shared_preload_libraries contains pglogical, but pglogical.so could not be found in the lib directory.
Presumably the installation process edited the configuration in your old server installation, but installed the shared object in the new one.
Upshot: you cannot use those pglogical binaries with your installation. Either switch to the PGDG RPMs or build pglogical from source.
You see that there is a certain amount of conjecture in my deductions, but that should help you solve the problem.

RPMs for Kubernetes do not exist anymore on https://packages.cloud.google.com/

After following the Kubernetes installation guide I found than all the RPMS were removed from the YUM repository https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64/Packages. However, on the release notes page you can see the links to binaries but not RPMs (for example: https://dl.k8s.io/v1.18.0/kubernetes-server-linux-amd64.tar.gz).
Can someone point me to the location of the RPMs? I'm aware Fedora comes with their own RPMS but these are older compared to the ones offered from the website (For example, Fedora 29 offers 1.10 while the website offers 1.18).
Thanks in advance.
--Jose
They are not gone, they are just not visible with the web browser (I dunno why). If you follow instructions on adding yum repository to your system, you will be able to install RPMs from that repository. Although kubernetes server related RPMs are not there.
$cat /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=0
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
$dnf list --disablerepo='*' --enablerepo=kubernetes --available
Last metadata expiration check: 0:06:26 ago on Mon 13 Jul 2020 21:24:45 CEST.
Available Packages
cri-tools.x86_64 1.13.0-0 kubernetes
kubeadm.x86_64 1.18.5-0 kubernetes
kubelet.x86_64 1.18.5-0 kubernetes
kubernetes-cni.x86_64 0.8.6-0 kubernetes
rkt.x86_64 1.27.0-1 kubernetes
Thanks, I did this on a CentOS 8.2 but had to make one tweak.
In this file
/etc/yum.repos.d/kubernetes.repo
I changed this line to have it enabled, so I changed it from:
enabled=0
to:
enabled=1
So my /etc/yum.repos.d/kubernetes.repo file looks like:
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
I then was able to do (for CentOS 8.x or Red Hat 8.x you can use dnf instead of yum, the actual command is dnf but on 8.x they do an alias of some sort to point yum to dnf)
mkdir /tmp/k8s
yum -y install --downloadonly --downloaddir=/tmp/k8s kubeadm kubelet kubectl
This downloaded the 3 rpms and dependencies. So my output was
14bfe6e75a9efc8eca3f638eb22c7e2ce759c67f95b43b16fae4ebabde1549f3-cri-tools-1.13.0-0.x86_64.rpm
b1b077555664655ba01b2c68d13239eaf9db1025287d0d9ccaeb4a8850c7a9b7-kubectl-1.19.2-0.x86_64.rpm
conntrack-tools-1.4.4-10.el8.x86_64.rpm
d0ba40edfc0fdf3aeec3dd8e56c01ff0d3a511cc0012aabce55d9a83d9bf2b69-kubeadm-1.19.2-0.x86_64.rpm
d9d997cdbfd6562824eb7786abbc7f4c6a6825662d0f451793aa5ab8c4a85c96-kubelet-1.19.2-0.x86_64.rpm
db7cb5cb0b3f6875f54d10f02e625573988e3e91fd4fc5eef0b1876bb18604ad-kubernetes-cni-0.8.7-0.x86_64.rpm
libnetfilter_cthelper-1.0.0-15.el8.x86_64.rpm
libnetfilter_cttimeout-1.0.0-11.el8.x86_64.rpm
libnetfilter_queue-1.0.2-11.el8.x86_64.rpm
socat-1.7.3.3-2.el8.x86_64.rpm
An alternate way, I also did the following
yum install -y yum-utils
then ran these 3 commands
yumdownloader kubeadm
yumdownloader kubelet
yumdownloader kubectl
This got me these 3 files in the current directory that you ran the command from
-rw-r--r-- 1 root root 9450186 Oct 8 10:11 b1b077555664655ba01b2c68d13239eaf9db1025287d0d9ccaeb4a8850c7a9b7-kubectl-1.19.2-0.x86_64.rpm
-rw-r--r-- 1 root root 8725678 Oct 8 10:10 d0ba40edfc0fdf3aeec3dd8e56c01ff0d3a511cc0012aabce55d9a83d9bf2b69-kubeadm-1.19.2-0.x86_64.rpm
-rw-r--r-- 1 root root 20438926 Oct 8 10:11 d9d997cdbfd6562824eb7786abbc7f4c6a6825662d0f451793aa5ab8c4a85c96-kubelet-1.19.2-0.x86_64.rpm
FYI to download a specific version of kubectl run this command
yum --showduplicates list kubectl
This will show you all the versions available in the 2nd column. The syntax to download a specific version is:
yumdownloader <packagename>-<version number>.x86_64
So for example to download kubectl version 1.18.9.0 for the x86_64 platform run
yumdownloader kubectl-1.18.9-0.x86_64
See here on how to download specific versions of packages
https://www.thegeekdiary.com/centos-rhel-how-to-install-a-specific-version-of-rpm-package-using-yum
For completeness, I decided to post how to get the RPMS using DNF:
sudo dnf install kubelet kubeadm kubectl --disableexcludes=kubernetes -v --downloaddir=/tmp/k8s --downloadonly
Dependencies resolved.
Excludes in repo kubernetes: kubeadm, kubectl, kubelet
===========================================================================================================================================================================================================
Package Arch Version Repository Size
===========================================================================================================================================================================================================
Installing:
kubeadm x86_64 1.19.2-0 kubernetes 8.3 M
kubectl x86_64 1.19.2-0 kubernetes 9.0 M
kubelet x86_64 1.19.2-0 kubernetes 19 M
Installing dependencies:
cri-tools x86_64 1.13.0-0 kubernetes 5.1 M
kubernetes-cni x86_64 0.8.7-0 kubernetes 19 M
conntrack-tools x86_64 1.4.4-8.fc29 strike-os 200 k
ebtables x86_64 2.0.10-28.fc29 strike-os 132 k
libnetfilter_cthelper x86_64 1.0.0-14.fc29 strike-os 22 k
libnetfilter_cttimeout x86_64 1.0.0-12.fc29 strike-os 22 k
libnetfilter_queue x86_64 1.0.2-12.fc29 strike-os 26 k
Transaction Summary
===========================================================================================================================================================================================================
Install 10 Packages
Total size: 61 M
Installed size: 261 M
DNF will only download packages for the transaction.
Is this ok [y/N]:
The rpms will be waiting for you on /tmp/k8s

error while running the comannd 'psql' Error: You must install at least one postgresql-client-<version> package

When I run vagrant ssh and login successfully then try the ~$psql command, I get this error: Error: You must install at least one postgresql-client-<version> package.
I saw a similar question here and I ran this command:
~$ sudo apt-get install postgresql-client
The output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
libpq5 postgresql-client-9.1
Suggested packages:
postgresql-9.1 postgresql-doc-9.1
The following NEW packages will be installed:
libpq5 postgresql-client postgresql-client-9.1
0 upgraded, 3 newly installed, 0 to remove and 66 not upgraded.
Need to get 1,057 kB/1,063 kB of archives.
After this operation, 3,448 kB of additional disk space will be used.
Do you want to continue [Y/n]? Y
Err http://us.archive.ubuntu.com/ubuntu/ precise-updates/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.91.23 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main libpq5 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Err http://security.ubuntu.com/ubuntu/ precise-security/main postgresql-client-9.1 amd64 9.1.5-0ubuntu12.04
404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/libpq5_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
Failed to fetch http://security.ubuntu.com/ubuntu/pool/main/p/postgresql-9.1/postgresql-client-9.1_9.1.5-0ubuntu12.04_amd64.deb 404 Not Found [IP: 91.189.88.149 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
I tried the suggested fix missing too but didn't work.
How can I install a postgresql package successfully? And mainly how can I get the $psql command to give me the desired output showed in the picture?
(Edit) I tried the first answer's suggestion:
vagrant#precise64:~$ apt-get update
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied)
E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?
Then tried the solutions mentioned here :
vagrant#precise64:~$ ps aux | grep apt
vagrant 1144 0.0 0.2 11676 948 pts/0 S+ 18:59 0:00 grep --color=auto apt
I don't understand so I don't know what's next.
looks like you had some trouble installing several packages 404 Not Found.
Do sudo apt-get update and then retry the install.

yum installation manager not working in centos 6.6

I'm facing a problem with yum installation manager in centos 6.6
root#mmopuru:~ # cat /etc/*release
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
CentOS release 6.6 (Final)
root#mmopuru:~ # uname -a
Linux mmopuru.puppetlabs.vm 2.6.32-504.el6.i686 #1 SMP Wed Oct 15 03:02:07 UTC 2014 i686 i686 i386 GNU/Linux
Its throwing following err. I tried clean all but no use.
root#mmopuru:~ # yum install python-pip
Loaded plugins: fastestmirror, security
Setting up Install Process
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
* epel: ftp.cuhk.edu.hk
* ius: ftp.neowiz.com
* remi-safe: mirror.innosol.asia
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
Error: Cannot retrieve repository metadata (repomd.xml) for repository: addons. Please verify its path and try again
How to resolve this?
When I run yum repolist
root#mmopuru:~ # yum repolist
Loaded plugins: fastestmirror, security
Repository 'updates' is missing name in configuration, using id
Loading mirror speeds from cached hostfile
epel/metalink | 4.0 kB 00:00
* epel: ftp.cuhk.edu.hk
* ius: mirror.amsiohosting.net
* remi-safe: mirrors.thzhost.com
* update: mirror.nbrc.ac.in
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
http://mirror.centos.org/centos/6/addons/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
Trying other mirror.
epel | 4.3 kB 00:00
epel/primary_db | 4.9 MB 00:05
ius | 2.2 kB 00:00
ius/primary_db | 194 kB 00:01
remi-safe | 2.9 kB 00:00
remi-safe/primary_db | 22 kB 00:00
update | 3.4 kB 00:00
update/primary_db | 3.7 MB 00:01
repo id repo name status
addons CentOS-6 - Addons 0
*epel Extra Packages for Enterprise Linux 6 - i386 9,857
ius IUS Community Packages for Enterprise Linux 6 - i386 356
remi-safe Safe Remi's RPM repository for Enterprise Linux 6 - i386 32
update CentOS-6 - Updates 989
repolist: 11,234
The content of /etc/yum.repos.d/centos-internal.repo is
root#mmopuru:~ # cat /etc/yum.repos.d/centos-internal.repo
# CentOS-Base.repo
#
# This file uses a new mirrorlist system developed by Lance Davis for CentOS.
# The mirror system uses the connecting IP address of the client and the
# update status of each mirror to pick mirrors that are updated to and
# geographically close to the client. You should use this for CentOS updates
# unless you are manually picking other mirrors.
#
# If the mirrorlist= does not work for you, as a fall back you can try the
# remarked out baseurl= line instead.
#
#
[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#released updates
enabled=0
[update]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#packages used/produced in the build but not released
[addons]
name=CentOS-$releasever - Addons
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=addons
#baseurl=http://mirror.centos.org/centos/$releasever/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#additional packages that extend functionality of existing packages
enabled=0
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
#contrib - packages by Centos Users
[contrib]
name=CentOS-$releasever - Contrib
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=contrib
#baseurl=http://mirror.centos.org/centos/$releasever/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.centos.org/centos/PM-GPG-KEY-CentOS-6
Remove the "addons" repository definition, which doesn't exists for CentOS 6 (it only exists for CentOS 5, but is empty).
I have just answered a similar question i.e. same error but for EPEL repo. I am answering here, may be it can come helpful for some future SO user.
Solution: The quick fix is to update your SSL certificates:
yum -y upgrade ca-certificates
Chances are the above error may also occur while certificate update, if so, just disable the repo i.e. addons which is causing the error, use the following command:
yum -y upgrade ca-certificates --disablerepo=addons
In case you're getting this same error for a different repo, just put it's name against the --disablerepo=<repo-name> flag.
Note: use sudo if you're not the root user.

Centos yum shows different latest versions

i have two servers running centos, they are located in the same Data Center
i want to update my mod-pagespeed module
Server 1:
[root#web2 11]# yum update mod-pagespeed
Loaded plugins: auto-update-debuginfo, fastestmirror, priorities, security
Loading mirror speeds from cached hostfile
* base: centos.mirror.linuxwerk.com
* epel: mirrors.n-ix.net
* extras: mirror.softaculous.com
* updates: centosmirror.netcup.net
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mod-pagespeed-beta.x86_64 0:1.7.30.4-3847 will be updated
---> Package mod-pagespeed-beta.x86_64 0:1.9.32.2-4321 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
=================================================================================================================================================================================================
Package Arch Version Repository Size
=================================================================================================================================================================================================
Updating:
mod-pagespeed-beta x86_64 1.9.32.2-4321 mod-pagespeed 5.8 M
Transaction Summary
=================================================================================================================================================================================================
Upgrade 1 Package(s)
Server 2
[root#web ~]# yum update mod-pagespeed
Loaded plugins: auto-update-debuginfo, fastestmirror, priorities, security
Determining fastest mirrors
epel/metalink | 26 kB 00:00
* base: ftp.plusline.de
* epel: mirrors.n-ix.net
* extras: ftp.plusline.de
* updates: ftp.plusline.de
10gen | 951 B 00:00
base | 3.7 kB 00:00
cr | 3.3 kB 00:00
dag | 1.9 kB 00:00
extras | 3.4 kB 00:00
mod-pagespeed | 951 B 00:00
rbel5 | 1.9 kB 00:00
updates | 3.4 kB 00:00
varnish-3.0 | 951 B 00:00
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package mod-pagespeed-stable.x86_64 0:1.7.30.4-3847 will be updated
---> Package mod-pagespeed-stable.x86_64 0:1.8.31.5-4307 will be an update
--> Finished Dependency Resolution
Dependencies Resolved
================================================================================
Package Arch Version Repository Size
================================================================================
Updating:
mod-pagespeed-stable x86_64 1.8.31.5-4307 mod-pagespeed 5.4 M
Transaction Summary
================================================================================
Upgrade 1 Package(s)
so you see server2 says the latest version is 1.8.* server 1 says 1.9.* is
they differ in base, epel, extras mirrors,
how can i load the same version on server2 ?
mod-pagespeed-beta and mod-pagespeed-stable are not the same package. Install whichever of those you want on both servers and you will likely have the same version. Assuming the mirrors are both up-to-date as you were told on the version of this question you posted to serverfault.