Dataproc 集群无法初始化
Dataproc cluster fails to initialize
使用标准 dataproc 映像 1.5(Debian 10、Hadoop 2.10、Spark 2.4),无法创建 dataproc 集群。区域设置为 europe-west-2
.
堆栈驱动程序日志说:
"Failed to initialize node <name of cluster>-m: Component hdfs failed to activate See output in: gs://.../dataproc-startup-script_output"
扫描输出 (gs://.../dataproc-startup-script_output),我可以看到 hdfs 激活失败:
Aug 18 13:21:59 activate-component-hdfs[2799]: + exit_code=1
Aug 18 13:21:59 activate-component-hdfs[2799]: + [[ 1 -ne 0 ]]
Aug 18 13:21:59 activate-component-hdfs[2799]: + echo 1
Aug 18 13:21:59 activate-component-hdfs[2799]: + log_and_fail hdfs 'Component hdfs failed to activate' 1
Aug 18 13:21:59 activate-component-hdfs[2799]: + local component=hdfs
Aug 18 13:21:59 activate-component-hdfs[2799]: + local 'message=Component hdfs failed to activate'
Aug 18 13:21:59 activate-component-hdfs[2799]: + local error_code=1
Aug 18 13:21:59 activate-component-hdfs[2799]: + local client_error_indicator=
Aug 18 13:21:59 activate-component-hdfs[2799]: + [[ 1 -eq 2 ]]
Aug 18 13:21:59 activate-component-hdfs[2799]: + echo 'StructuredError{hdfs, Component hdfs failed to activate}'
Aug 18 13:21:59 activate-component-hdfs[2799]: StructuredError{hdfs, Component hdfs failed to activate}
Aug 18 13:21:59 activate-component-hdfs[2799]: + exit 1
我错过了什么?
编辑
正如@Dagang 所建议的,我通过 ssh 连接到主节点并 运行 grep "activate-component-hdfs" /var/log/dataproc-startup-script.log
。输出为 here.
所以问题是有一个名为“pete{”的用户名,hadoop fs -mkdir -p
命令失败。这些具有特殊字符的用户名,尤其是左括号,例如,"()[]{}" 可能会在集群创建期间导致 HDFS 激活步骤失败。
所以简单的解决方案就是删除那些意外创建的用户。
使用标准 dataproc 映像 1.5(Debian 10、Hadoop 2.10、Spark 2.4),无法创建 dataproc 集群。区域设置为 europe-west-2
.
堆栈驱动程序日志说:
"Failed to initialize node <name of cluster>-m: Component hdfs failed to activate See output in: gs://.../dataproc-startup-script_output"
扫描输出 (gs://.../dataproc-startup-script_output),我可以看到 hdfs 激活失败:
Aug 18 13:21:59 activate-component-hdfs[2799]: + exit_code=1
Aug 18 13:21:59 activate-component-hdfs[2799]: + [[ 1 -ne 0 ]]
Aug 18 13:21:59 activate-component-hdfs[2799]: + echo 1
Aug 18 13:21:59 activate-component-hdfs[2799]: + log_and_fail hdfs 'Component hdfs failed to activate' 1
Aug 18 13:21:59 activate-component-hdfs[2799]: + local component=hdfs
Aug 18 13:21:59 activate-component-hdfs[2799]: + local 'message=Component hdfs failed to activate'
Aug 18 13:21:59 activate-component-hdfs[2799]: + local error_code=1
Aug 18 13:21:59 activate-component-hdfs[2799]: + local client_error_indicator=
Aug 18 13:21:59 activate-component-hdfs[2799]: + [[ 1 -eq 2 ]]
Aug 18 13:21:59 activate-component-hdfs[2799]: + echo 'StructuredError{hdfs, Component hdfs failed to activate}'
Aug 18 13:21:59 activate-component-hdfs[2799]: StructuredError{hdfs, Component hdfs failed to activate}
Aug 18 13:21:59 activate-component-hdfs[2799]: + exit 1
我错过了什么?
编辑
正如@Dagang 所建议的,我通过 ssh 连接到主节点并 运行 grep "activate-component-hdfs" /var/log/dataproc-startup-script.log
。输出为 here.
所以问题是有一个名为“pete{”的用户名,hadoop fs -mkdir -p
命令失败。这些具有特殊字符的用户名,尤其是左括号,例如,"()[]{}" 可能会在集群创建期间导致 HDFS 激活步骤失败。
所以简单的解决方案就是删除那些意外创建的用户。