1.异常描述
在CDP7.1.6的添加组件过程中,添加YARN Queue Manager后,启动服务过程中,提示启动Yarn Queue Manager Store角色失败。如下图:
报错信息为:
代码语言:javascript复制Caused by: java.lang.IllegalStateException: Could not open file nio:/var/lib/hadoop-yarn/config-service.mv.db [1.4.198/1]
at org.h2.mvstore.DataUtils.newIllegalStateException(DataUtils.java:883)
at org.h2.mvstore.FileStore.open(FileStore.java:179)
at org.h2.mvstore.MVStore.<init>(MVStore.java:390)
at org.h2.mvstore.MVStore$Builder.open(MVStore.java:3343)
at org.h2.mvstore.db.MVTableEngine$Store.open(MVTableEngine.java:162)
... 25 common frames omitted
Caused by: java.io.FileNotFoundException: /var/lib/hadoop-yarn/config-service.mv.db (Permission denied)
at java.io.RandomAccessFile.open0(Native Method)
at java.io.RandomAccessFile.open(RandomAccessFile.java:316)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:243)
at java.io.RandomAccessFile.<init>(RandomAccessFile.java:124)
at org.h2.store.fs.FileNio.<init>(FilePathNio.java:43)
at org.h2.store.fs.FilePathNio.open(FilePathNio.java:23)
at org.h2.mvstore.FileStore.open(FileStore.java:153)
... 28 common frames omitted
19:04:35.555 [main] ERROR c.c.c.ConfigServiceApplication - Unable to update admin password. Please try updating password manually on your H2 instance.
根据报错分析是找不到config-service.mv.db。在CDP7.1中Queue Manager将H2的密码存放在config-service.mv.db中,而我们添加组件的时候它并没有自动生成这个文件,导致无法写入必要信息。
2.解决办法
1.手动去对应目录下创建一个名为config-service.mv.db的文件
代码语言:javascript复制[root@cdh2 hadoop-yarn]# vim config-service.mv.db
代码语言:javascript复制[root@cdh2 hadoop-yarn]# chown yarn:yarn config-service.mv.db
2.配置完之后,从CM启动服务测试
重启成功,异常解决。
3.总结
在CDP7.1中Queue Manager需要将H2的密码存放在config-service.mv.db中,而在集群安装完毕后再进行添加该服务则不会自动创建改文件,需要手动创建文件后再对它的用户组权限进行修改。