⚠️报错:
kylin成功启动,访问页面404
查看/opt/module/kylin/logs目录下kylin.log,报以下错误:
Failed to find metadata store by url: kylin_metadata@hbase
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:588)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:366)
...
省略
...
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclUtil' defined in URL [jar:file:/opt/module/kylin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-3.0.2.jar!/org/apache/kylin/rest/util/AclUtil.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'expressionHandler' defined in class path resource [kylinSecurity.xml]: Cannot resolve reference to bean 'permissionEvaluator' while setting bean property 'permissionEvaluator'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionEvaluator' defined in class path resource [kylinSecurity.xml]: Cannot resolve reference to bean 'aclService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclService' defined in URL [jar:file:/opt/module/kylin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-3.0.2.jar!/org/apache/kylin/rest/service/AclService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.kylin.rest.service.AclService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Failed to find metadata store by url: kylin_metadata@hbase
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:564)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'permissionEvaluator' defined in class path resource [kylinSecurity.xml]: Cannot resolve reference to bean 'aclService' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclService' defined in URL [jar:file:/opt/module/kylin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-3.0.2.jar!/org/apache/kylin/rest/service/AclService.class]: Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.kylin.rest.service.AclService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Failed to find metadata store by url: kylin_metadata@hbase
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:359)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:108)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.kylin.rest.service.AclService]: Constructor threw exception; nested exception is java.lang.IllegalArgumentException: Failed to find metadata store by url: kylin_metadata@hbase
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateBean(AbstractAutowireCapableBeanFactory.java:1155)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1099)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:513)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:351)
... 77 more
Caused by: org.apache.hadoop.hbase.client.RetriesExhaustedException: Failed after attempts=2, exceptions:
Thu Oct 28 21:13:20 CST 2021, RpcRetryingCaller{globalStartTime=1635426798551, pause=100, maxAttempts=2}, org.apache.hadoop.hbase.NotServingRegionException: org.apache.hadoop.hbase.NotServingRegionException: kylin_metadata,,1635426513325.2683a31e5e0907af5a12415c60289350. is closing
at org.apache.hadoop.hbase.regionserver.HRegion.startRegionOperation(HRegion.java:8249)
at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2861)
at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2856)
at org.apache.hadoop.hbase.regionserver.HRegion.getScanner(HRegion.java:2850)
at org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2526)
at org.apache.hadoop.hbase.regionserver.RSRpcServices.get(RSRpcServices.java:2453)
at org.apache.hadoop.hbase.shaded.protobuf.generated.ClientProtos$ClientService$2.callBlockingMethod(ClientProtos.java:41998)
at org.apache.hadoop.hbase.ipc.RpcServer.call(RpcServer.java:413)
at org.apache.hadoop.hbase.ipc.CallRunner.run(CallRunner.java:130)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:324)
at org.apache.hadoop.hbase.ipc.RpcExecutor$Handler.run(RpcExecutor.java:304)
解决方法:
- 删除hdfs上对应的hbase块;
- 进入zookeeper目录,删除hbase节点信息:
(base) [xiaobai@hadoop102 zookeeper-3.5.7]$ bin/zkCli.sh
[zk: localhost:2181(CONNECTED) 0] deleteall /hbase
[zk: localhost:2181(CLOSED) 5] quit
-
删除/opt/module/kylin/bin目录下的
cached-*
文件:
(base) [xiaobai@hadoop102 bin]$ rm -rf cached-*
⚠️报错:
改完之后报这个错误:KeeperErrorCode = NoNode for /hbase/meta-region-server,是因为hadoop的zookeeper.znode.parent值为hbase;
解决方法:
-
修改配置文件
hbase-site.xml
:
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase</value>
</property>
-
修改/opt/module/hbase/conf目录下的
hbase-env.sh
文件:
export HBASE_CLASSPATH=/opt/module/hbase/lib/
(此步骤应该不是必须)
-
重启hbase;
如果这里使用bin/stop-hbase.sh命令一直处于等待状态的话就先停止master,再执行停止hbase命令即可:
(base) [xiaobai@hadoop102 hbase]$ hbase-daemon.sh stop master
(base) [xiaobai@hadoop102 hbase]$ stop-hbase.sh
⚠️报错:
Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException
2021-10-28 23:35:40,008 ERROR [localhost-startStop-1] context.ContextLoader:350 : Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping': Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1628)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:443)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:325)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:107)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4699)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5165)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:743)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:719)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:970)
Caused by: java.lang.NoClassDefFoundError: org/apache/hadoop/hive/metastore/api/NoSuchObjectException
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
at java.lang.Class.getDeclaredMethods(Class.java:1975)
at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:613)
at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:524)
at org.springframework.core.MethodIntrospector.selectMethods(MethodIntrospector.java:68)
✅解决方法:
(base) [xiaobai@hadoop102 lib]$ cp hive-exec-3.1.2.jar /opt/module/kylin/lib/
版权声明:本文为FunnyPrince_原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。