Dataproc 集群无法初始化

tak*_*tak 5 google-cloud-platform google-cloud-dataproc

使用标准 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"
Run Code Online (Sandbox Code Playgroud)

扫描输出 (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
Run Code Online (Sandbox Code Playgroud)

我错过了什么?

编辑

正如@Dagang 建议的那样,我通过 SSH 连接到主节点并运行grep "activate-component-hdfs" /var/log/dataproc-startup-script.log. 输出在这里

小智 3

所以问题是有一个名为“pete{”的用户名,hadoop fs -mkdir -p命令在该用户名上失败。此类带有特殊字符(尤其是左括号,例如“()[]{}”)的用户名可能会在集群创建期间导致 HDFS 激活步骤失败。

因此,简单的解决方案就是删除那些意外创建的用户。