公司代理背后的Vagrant虚拟集群

时间:2016-10-20 14:47:47

标签: vagrant virtual-machine cloudera ubuntu-16.04 vagrant-plugin

我正在尝试使用Vagrant和Cloudera Manager按照以下说明在我的笔记本电脑上运行虚拟Apache Hadoop集群:

http://blog.cloudera.com/blog/2014/06/how-to-install-a-virtual-apache-hadoop-cluster-with-vagrant-and-cloudera-manager/

我正在使用配备16GB内存的Dell Precision M4800工作站笔记本电脑,它运行的是Ubuntu 16.04 LTS(Xenial Xerus)操作系统。

我成功设法安装VirtualBox和Vagrant,但我无法连接到我的群集的节点,我做的是:

  1. 配置CLI工具的代理设置:

    $export http_proxy="http://user:password@proxy_server:port"
    $export https_proxy="https://user:password@proxy_server:port""
    
  2. 进入项目目录

  3. 更新每台活动计算机上的hosts文件:

    $vagrant hostmanager
    
  4. 根据Vagrantfile

    创建和配置来宾计算机
    $vagrant up
    
  5. 尝试浏览http://vm-cluster-node1:7180,但收到错误“找不到服务器”
  6. 由于我在公司代理服务器后面,我安装了 vagrant proxyconf插件,如下所示:How to use vagrant in a proxy environment?

    并且我更改了 Vagrantfile ,添加以下行:

    if Vagrant.has_plugin?("vagrant-proxyconf")
      config.proxy.http     = "http://user:password@proxy_server:port" 
      config.proxy.https    = "https://user:password@proxy_server:port"
      config.proxy.no_proxy = "localhost,127.0.0.1"
    end
    

    现在的问题是,在 vagrant up 命令后,我收到以下错误:

    ==> master: Failed to fetch http://archive.cloudera.com/cm5/ubuntu/precise/amd64/cm/pool/contrib/e/enterprise/cloudera-manager-daemons_5.8.2-1.cm582.p0.17~precise-cm5_all.deb  Connection failed
    ==> master: Failed to fetch http://archive.cloudera.com/cm5/ubuntu/precise/amd64/cm/pool/contrib/o/oracle-j2sdk1.7/oracle-j2sdk1.7_1.7.0+update67-1_amd64.deb  Connection failed
    ==> master: E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    ==> master: cloudera-scm-server-db: unrecognized service
    ==> master: cloudera-scm-server-db: unrecognized service
    ==> master: cloudera-scm-server: unrecognized service
    The SSH command responded with a non-zero exit status. Vagrant assumes 
    that this means the command failed. The output for this command should be 
    in the log above. Please read the output to determine what went wrong.
    

    我做错了什么?

1 个答案:

答案 0 :(得分:0)

事实证明,这不是代理配置问题(配置是正确的),但这是企业防火墙问题,防火墙只允许下载某些软件包。

我已经通过使用我的手机作为热点安装Cloudera Manager来“解决”了这个问题。

在群集上安装Cloudera Manager和Hadoop堆栈后,您可以使用Cloudera Manager Web GUI并在corportate环境中管理群集。

唯一的问题是一些重要的集群功能,例如时钟同步在公司环境中无法正常工作,特别是我发现我公司的防火墙阻止了NTP(问题在这里有更好的描述:https://askubuntu.com/questions/429306/ntpdate-no-server-suitable-for-synchronization-found

相关问题