Windows 10运行Hadoop Yarn触发winutils 0xc0000bb8错误的方案咨询
Windows环境Hadoop Yarn运行触发0xc0000bb8错误的适配咨询
报错详情
Windows环境下启动运行Hadoop Yarn服务时,会抛出0xc0000bb8异常,完整错误日志如下:
2021-03-12 21:25:55,192 INFO ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8031. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS) 2021-03-12 21:25:58,057 ERROR util.SysInfoWindows: ExitCodeException exitCode=1: PdhAddCounter \Network Interface(*)\Bytes Received/Sec failed with 0xc0000bb8. Error in GetDiskAndNetwork. Err:1 at org.apache.hadoop.util.Shell.runCommand(Shell.java:1008) at org.apache.hadoop.util.Shell.run(Shell.java:901) at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:1213) at org.apache.hadoop.util.SysInfoWindows.getSystemInfoInfoFromShell(SysInfoWindows.java:86) at org.apache.hadoop.util.SysInfoWindows.refreshIfNeeded(SysInfoWindows.java:101) at org.apache.hadoop.util.SysInfoWindows.getPhysicalMemorySize(SysInfoWindows.java:153) at org.apache.hadoop.yarn.util.ResourceCalculatorPlugin.getPhysicalMemorySize(ResourceCalculatorPlugin.java:64)
问题根源与现有方案局限
经过问题定位确认,该报错的根源与Windows系统语言版本直接相关:现有通用winutils的系统资源采集逻辑,硬编码了英文系统下的Windows性能计数器固定路径,在非英文语言版本的Windows上,本地性能计数器的名称为本地化翻译结果,和硬编码路径不匹配时就会触发PdhAddCounter调用失败,最终造成Yarn资源计算器无法读取物理内存参数、节点连接重试超时的连锁故障。
目前上游社区虽已发布该bug的源码层面修复方案,但方案实施门槛极高:普通用户需要自行搭建Windows平台的C++编译环境、配置完整的Hadoop源码编译链路,才能产出可用的修复版本,对仅需在本地完成Yarn环境调试的开发者而言成本过高。
核心咨询诉求
- 确认是否存在公开可下载、不绑定Windows系统语言的通用适配版winutils二进制文件,可兼容不同语言版本的Windows系统,从逻辑层面绕开硬编码性能计数器路径的兼容问题
- 如果目前暂无公开的通用适配资源,也希望维护winutils二进制分发的相关开发者,能够产出这类跨语言兼容的适配版本,降低Windows本地搭建Hadoop Yarn测试环境的使用门槛
内容的提问来源于stack exchange,提问作者Tarek EZZAT
相关产品推荐
相关产品推荐

