google云引擎:在hadoop的命令行安装期间libsnappy没有安装errur

u59ebvdq  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(353)

我正在尝试使用命令行选项在google计算引擎上安装一个自定义hadoop实现(>2.0)。我的bdutil_env.sh文件的修改参数如下:

GCE_IMAGE='ubuntu-14-04'
GCE_MACHINE_TYPE='n1-standard-1'
GCE_ZONE='us-central1-a'
DEFAULT_FS='hdfs'
HADOOP_TARBALL_URI='gs://<mybucket>/<my_hadoop_tar.gz>'

./bdutil部署失败,退出代码为1。我在生成的debug.info文件中发现以下错误:

ssh: connect to host 130.211.161.181 port 22: Connection refused
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
ssh: connect to host 104.197.63.39 port 22: Connection refused
ssh: connect to host 104.197.7.106 port 22: Connection refused
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [255].
.....
.....
Connection to 104.197.7.106 closed.
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [123].
Connection to 104.197.63.39 closed.
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [123].
Connection to 130.211.161.181 closed.
ERROR: (gcloud.compute.ssh) [/usr/bin/ssh] exited with return code [123].
...
...
hadoop-w-1: ==> deploy-core-setup_deploy.stderr <==
....
....
hadoop-w-1: dpkg-query: package 'libsnappy1' is not installed and no information is available
hadoop-w-1: Use dpkg --info (= dpkg-deb --info) to examine archive files,
hadoop-w-1: and dpkg --contents (= dpkg-deb --contents) to list their contents.
hadoop-w-1: dpkg-preconfigure: unable to re-open stdin: No such file or directory
hadoop-w-1: dpkg-query: package 'libsnappy-dev' is not installed and no information is available
hadoop-w-1: Use dpkg --info (= dpkg-deb --info) to examine archive files,
hadoop-w-1: and dpkg --contents (= dpkg-deb --contents) to list their contents.
hadoop-w-1: dpkg-preconfigure: unable to re-open stdin: No such file or directory
hadoop-w-1: ./hadoop-env-setup.sh: line 612: Package:: command not found
....
....
hadoop-w-1: find: `/home/hadoop/hadoop-install/lib': No such file or directory

我不明白为什么会给出初始ssh错误;我可以看到vm并从ui正确地登录到它们;我的tar.gz也被复制到适当的地方。
我也不明白为什么没有安装libsnappy;我有什么特别需要做的吗?shell脚本似乎有命令来安装它,但是不知怎么的它失败了。
我检查了所有的虚拟机;hadoop没有启动。
edit:为了解决ssh问题,我运行了以下命令:
gcutil--project=addfirewall--允许=tcp:22 default-ssh
没什么区别。

tkclm6bt

tkclm6bt1#

查看错误代码,似乎必须在类路径中下载snappy库。如果您使用的是java,那么您可以从这个路径下载您的库https://github.com/xerial/snappy-java. 或尝试此链接https://code.google.com/p/snappy/.

vddsk6oq

vddsk6oq2#

在本例中,ssh和libsnappy错误是一个小问题;当vms不能立即ssh时,bdutil轮询了一段时间,直到它应该打印出如下内容:

...Thu May 14 16:52:23 PDT 2015: Waiting on async 'wait_for_ssh' jobs to finish. Might take a while...
...
Thu May 14 16:52:33 PDT 2015: Instances all ssh-able

同样,您看到的libsnappy错误也是一个错误,因为它来自对的调用 dpkg -s 尝试确定是否确实安装了软件包,如果未安装,请安装:https://github.com/googlecloudplatform/bdutil/blob/master/libexec/bdutil_helpers.sh#l163
我们将努力清理这些错误消息,因为它们可能会产生误导。同时,这里的主要问题是,ubuntu在历史上并不是 bdutil ; 我们彻底验证了centos和debian映像,但没有验证ubuntu映像,因为它们只是在2014年11月作为gce选项添加的。对于任何debian-7或centos-6映像,您的部署都可以与自定义tarball配合使用。我们在github上提交了一个问题来跟踪ubuntu对bdutil的支持:https://github.com/googlecloudplatform/bdutil/issues/29
编辑:这个问题已经被ubuntu解决了,现在它在主存储库中得到了支持;你可以在这里下载最新的提交。

相关问题