ambari-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dmitry Sen <>
Subject Re: Issue with deploying Cluster through Ambari Agent behind proxy
Date Fri, 21 Aug 2015 09:45:36 GMT
Hi Konrad,

There are a lot o ways to setup user environment in Linux. Please create new issue at
if you think, there is a bug in ambari agent, also add detailed steps how you setup environmental
variables, ambari and OS versions.

You can not rely on environmental variables, but edit apt.conf configuration file.

echo 'Acquire::http::Proxy "http://<proxy_host>:<proxy_port>/";' >> /etc/apt/apt.conf



Dmytro Sen


From: Konrad Hübner <>
Sent: Friday, August 21, 2015 10:32 AM
To: Dmitry Sen
Subject: Re: Issue with deploying Cluster through Ambari Agent behind proxy


setting up a proxy on all agents had been done before and did not help. What I finally figured
out was that by manipulating the script on each agent to export the proxy environment
variables before actually executing the commands helped. I have not gone into further analysis,
but it seems that the script kills the users environment variables, at least those on /etc/environment.
Maybe that is worth a ticket. Will see if I can figure out in more detail what's going wrong.


2015-08-20 9:44 GMT+02:00 Dmitry Sen <<>>:


There are 2 options

1. Setup apt to use proxy on all agents (not sure if it works is your local DNS doesn't resolve
public hostnames)

echo 'Acquire::http::Proxy "http://<proxy_host>:<proxy_port>/";' >> /etc/apt/apt.conf

2. Create a local copy of repositories, required for installing Hadoop Stack

From: Konrad Hübner <<>>
Sent: Thursday, August 20, 2015 10:20 AM
Subject: Fwd: Issue with deploying Cluster through Ambari Agent behind proxy


I try to deploy a HDP 2.3 Cluster with Ambari 2.1. By force I am behind a proxy server. The
proxy is configured both systemwide in /etc/env, including export of environment variables
for sudoers and in /etc/apt/apt.conf.d with Accquire::proxy command. Ambari Server was configured
to use a non-root users with sudo privilege. Installing ambari client worked, but when starting
the deployment of the cluster through the agent, the agent runs apt-get install and that failes
when resolving the hostname. This looks like it is not using the proxy. Please find the log
output below. Any help is appreciated!


2015-08-20 06:53:13,299 - Package['unzip'] {}
2015-08-20 06:53:13,310 - Installing package unzip ('/usr/bin/apt-get -q -o Dpkg::Options::=--force-confdef
--allow-unauthenticated --assume-yes install unzip')
2015-08-20 06:53:13,514 - Execution of '['/usr/bin/apt-get', '-q', '-o', 'Dpkg::Options::=--force-confdef',
'--allow-unauthenticated', '--assume-yes', 'install', 'unzip']' returned 100. Reading package
Building dependency tree...
Reading state information...
Suggested packages:
The following NEW packages will be installed:
0 upgraded, 1 newly installed, 0 to remove and 7 not upgraded.
Need to get 157 kB of archives.
After this operation, 391 kB of additional disk space will be used.
Err trusty-updates/main unzip amd64 6.0-9ubuntu1.3
  Could not resolve '<>'
Err trusty-security/main unzip amd64 6.0-9ubuntu1.3
  Could not resolve '<>'
E: Failed to fetch
 Could not resolve '<>'

E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
2015-08-20 06:53:13,514 - Failed to install package unzip. Executing `/usr/bin/apt-get update
2015-08-20 06:53:14,780 - Retrying to install package unzip

View raw message