【发布时间】:2017-03-02 15:33:20
【问题描述】:
我正在尝试按照以下说明使用 Vagrant 和 Cloudera Manager 在我的笔记本电脑上运行虚拟 Apache Hadoop 集群:
我使用的是戴尔 Precision M4800 工作站笔记本电脑,内存为 16GB,运行 Ubuntu 16.04 LTS (Xenial Xerus) 操作系统。
我成功安装了 VirtualBox 和 Vagrant,但我无法连接到集群的节点,我所做的是:
-
为 CLI 工具配置代理设置:
$export http_proxy="http://user:password@proxy_server:port" $export https_proxy="https://user:password@proxy_server:port"" 进入项目目录
-
更新每台活动机器上的主机文件:
$vagrant hostmanager -
根据 Vagrantfile 创建和配置客户机
$vagrant up - 尝试浏览http://vm-cluster-node1:7180,但出现“找不到服务器”错误
由于我使用的是公司代理,因此我安装了 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.
我做错了什么?
【问题讨论】:
-
我稍微更改了 Vagrantfile 中的代理配置,现在在 vargant up 之后我没有收到任何错误消息,但我仍然无法连接到vm-cluster-node1:7180
-
您可以检查一下:它是否已在 VM 上启动并运行?运行 vagrant 主机管理器后 /etc/hosts 文件是否正确更新?
-
@FrédéricHenri 是的,在我运行 vargant hostmanager 后,/etc/host 文件已正确更新,并且我使用 VirtualBox GUI 检查了 VM 是否已启动并正在运行
-
我认为问题在于 Vagrantfile 中的这一行: apt-get -q -y --force-yes install oracle-j2sdk1.7 cloudera-manager-server- db cloudera-manager-server cloudera-manager-daemons
-
如果我将我的手机配置为便携式热点并使用它的网络来完成它的工作,那么这肯定是与网络代理有关的问题。谁能帮帮我?
标签: vagrant virtual-machine cloudera ubuntu-16.04 vagrant-plugin