• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

安装Apache Atlas遇到的错误

武飞扬头像
大数据男
帮助1

安装apache atlas,启动atlas server报错,查看logs/atlas.20220524-115239.out文件:

Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'graphTransactionInterceptor' defined in URL [jar:file:/usr/local/service/atlas/server/webapp/atlas/WEB-INF/lib/atlas-repository-2.1.0.jar!/org/apache/atlas/GraphTransactionInterceptor.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'get' defined in org.apache.atlas.repository.graph.AtlasGraphProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.atlas.repository.graphdb.AtlasGraph]: Factory method 'get' threw exception; nested exception is org.apache.atlas.repository.RepositoryException: Max retries exceeded. Failed to obtain graph instance after 3 retries
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:749)
        at org.springframework.beans.factory.support.ConstructorResolver.autowireConstructor(ConstructorResolver.java:189)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireConstructor(AbstractAutowireCapableBeanFactory.java:1198)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1100)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
        ... 45 more
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'get' defined in org.apache.atlas.repository.graph.AtlasGraphProvider: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.atlas.repository.graphdb.AtlasGraph]: Factory method 'get' threw exception; nested exception is org.apache.atlas.repository.RepositoryException: Max retries exceeded. Failed to obtain graph instance after 3 retries
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1178)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1072)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:511)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:481)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
        at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:208)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1136)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1064)
        at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:835)
        at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:741)
        ... 59 more
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.atlas.repository.graphdb.AtlasGraph]: Factory method 'get' threw exception; nested exception is org.apache.atlas.repository.RepositoryException: Max retries exceeded. Failed to obtain graph instance after 3 retries
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:189)
        at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:588)
        ... 72 more
Caused by: org.apache.atlas.repository.RepositoryException: Max retries exceeded. Failed to obtain graph instance after 3 retries
        at org.apache.atlas.repository.graph.AtlasGraphProvider.retry(AtlasGraphProvider.java:127)
        at org.apache.atlas.repository.graph.AtlasGraphProvider.get(AtlasGraphProvider.java:102)
        at org.apache.atlas.repository.graph.AtlasGraphProvider$$EnhancerBySpringCGLIB$$51f36e5b.CGLIB$get$1(<generated>)
        at org.apache.atlas.repository.graph.AtlasGraphProvider$$EnhancerBySpringCGLIB$$51f36e5b$$FastClassBySpringCGLIB$$6a41e2ff.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
        at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358)
        at org.apache.atlas.repository.graph.AtlasGraphProvider$$EnhancerBySpringCGLIB$$51f36e5b.get(<generated>)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:498)
        at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:162)
学新通

这个日志比较粗略,只能判断是SpringBoot在创建图引擎相关对象时报错。

然后查看 logs/application.log,发现如下报错:

       at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at org.janusgraph.util.system.ConfigurationUtil.instantiate(ConfigurationUtil.java:58)
        ... 97 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.janusgraph.diskstorage.es.rest.RestElasticSearchClient
        at org.janusgraph.diskstorage.es.rest.RestClientSetup.getElasticSearchClient(RestClientSetup.java:107)
        at org.janusgraph.diskstorage.es.rest.RestClientSetup.connect(RestClientSetup.java:75)
        at org.janusgraph.diskstorage.es.ElasticSearchSetup$1.connect(ElasticSearchSetup.java:51)
        at org.janusgraph.diskstorage.es.ElasticSearchIndex.interfaceConfiguration(ElasticSearchIndex.java:437)
        at org.janusgraph.diskstorage.es.ElasticSearchIndex.<init>(ElasticSearchIndex.java:324)

java.lang.NoClassDefFoundError: Could not initialize class说明是类的初始化出现错误,怀疑是jar包版本不对。

在atlas server的lib目录下(/usr/local/atlas/server/webapp/atlas/WEB-INF/lib)查看es相关的包,找到如下包:

janusgraph-es-0.5.1.jar

这个包的作用应该是连接elasticsearch并进行操作,所以其必然依赖elasticsearch的相关包,是不是这几个包缺失呢,查看lib目录,发现:

学新通
有相关的包。

是不是版本不对呢?

于是去Maven上查看janusgraph-es-0.5.1.jar依赖的es版本。

学新通

发现,其依赖的es版本是7.6.1:

学新通
于是把es相关包换成7.6.1

学新通

重新启动atlas,启动成功。

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhghacfg
系列文章
更多 icon
同类精品
更多 icon
继续加载