Support Questions

Find answers, ask questions, and share your expertise

sudo yum install ambari-agent fails on ambari host

avatar
Explorer

Can an ambari agent be installed alongside ambari server?

I have an ambari server running with agents. I want to add the server as another agent.

On the ambar-server:

sudo yum install ambari-agent

Fails with the following output:

ambari-2.6.1.0                                                                                                                                                    | 2.9 kB  00:00:00
beats                                                                                                                                                             | 2.5 kB  00:00:00
bintray--sbt-rpm                                                                                                                                                  | 1.3 kB  00:00:00
chef                                                                                                                                                              | 2.9 kB  00:00:00
epel/x86_64/metalink                                                                                                                                              |  16 kB  00:00:00
ius                                                                                                                                                               | 2.9 kB  00:00:00
rsyslog_v8                                                                                                                                                        | 2.9 kB  00:00:00
Resolving Dependencies
--> Running transaction check
---> Package ambari-agent.x86_64 0:2.6.1.0-143 will be installed
--> Finished Dependency Resolution


Dependencies Resolved


=========================================================================================================================================================================================
 Package                                      Arch                                   Version                                        Repository                                      Size
=========================================================================================================================================================================================
Installing:
 ambari-agent                                 x86_64                                 2.6.1.0-143                                    ambari-2.6.1.0                                  90 M


Transaction Summary
=========================================================================================================================================================================================
Install  1 Package


Total download size: 90 M
Installed size: 125 M
Is this ok [y/d/N]: y
Downloading packages:
warning: /var/cache/yum/x86_64/7Server/ambari-2.6.1.0/packages/ambari-agent-2.6.1.0-143.x86_64.rpm: Header V4 RSA/SHA1 Signature, key ID 07513cad: NOKEY  32 MB/s |  80 MB  00:00:00 ETA
Public key for ambari-agent-2.6.1.0-143.x86_64.rpm is not installed
ambari-agent-2.6.1.0-143.x86_64.rpm                                                                                                                               |  90 MB  00:00:01
Retrieving key from http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenk...
Importing GPG key 0x07513CAD:
 Userid     : "Jenkins (HDP Builds) <jenkin@hortonworks.com>"
 Fingerprint: df52 ed4f 7a3a 5882 c099 4c66 b973 3a7a 0751 3cad
 From       : http://public-repo-1.hortonworks.com/ambari/centos7/2.x/updates/2.6.1.0/RPM-GPG-KEY/RPM-GPG-KEY-Jenk...
Is this ok [y/N]: y
Running transaction check
Running transaction test




Transaction check error:
  file /usr/lib/python2.6/site-packages from install of ambari-agent-2.6.1.0-143.x86_64 conflicts with file from package ambari-server-2.6.1.0-0.x86_64


Error Summary
-------------
1 ACCEPTED SOLUTION

avatar
Master Mentor

@Leonardo Apolonio

We see the error as conflict between packages:

file /usr/lib/python2.6/site-packages from install of ambari-agent-2.6.1.0-143.x86_64 conflicts with file from package ambari-server-2.6.1.0-0.x86_64

.

This error indicates that you have AmbariServer package of version 2.6.1.0.0 but trying to install Ambari-Agent of version 2.6.1.0-143 (slightly higher). Which is causing the conflict.

.

Please check if you have duplicate ambari repos like (2.6.1.0-143 as well as 2.6.1.0.0 both) on the same host?

In that case remove the Old unwanted ambari repo from the mentioned dir and then perform a yum clean.

# grep baseurl /etc/yum.repos.d/*  | grep ambari

So can you please try this:

# yum clean all

.

Then retry the agent installation or try the "yum upgrade ambari-server" first and then upgrade the agent.

# sudo yum upgrade ambari-server 
# sudo yum upgrade ambari-agent

.

View solution in original post

1 REPLY 1

avatar
Master Mentor

@Leonardo Apolonio

We see the error as conflict between packages:

file /usr/lib/python2.6/site-packages from install of ambari-agent-2.6.1.0-143.x86_64 conflicts with file from package ambari-server-2.6.1.0-0.x86_64

.

This error indicates that you have AmbariServer package of version 2.6.1.0.0 but trying to install Ambari-Agent of version 2.6.1.0-143 (slightly higher). Which is causing the conflict.

.

Please check if you have duplicate ambari repos like (2.6.1.0-143 as well as 2.6.1.0.0 both) on the same host?

In that case remove the Old unwanted ambari repo from the mentioned dir and then perform a yum clean.

# grep baseurl /etc/yum.repos.d/*  | grep ambari

So can you please try this:

# yum clean all

.

Then retry the agent installation or try the "yum upgrade ambari-server" first and then upgrade the agent.

# sudo yum upgrade ambari-server 
# sudo yum upgrade ambari-agent

.