dolphinscheduler icon indicating copy to clipboard operation
dolphinscheduler copied to clipboard

[Bug] [dolphinscheduler-alert] ClassNotFoundException: org.apache.hadoop.fs.FSDataInputStream

Open which520 opened this issue 4 years ago • 6 comments

Search before asking

  • [X] I had searched in the issues and found no similar issues.

What happened

Exception in thread "Alert-Server" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'storageOperate' defined in class path resource [org/apache/dolphinscheduler/common/config/StoreConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.dolphinscheduler.common.storage.StorageOperate]: Factory method 'storageOperate' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/hadoop/fs/FSDataInputStream at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:658) at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:486) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:147) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)

What you expected to happen

When k8s is used to deploy 3.1.0, if storagetype is set to hdfs, the alert_server will report an error

How to reproduce

Use k8s to deploy version 3.1.0, and select hdfs as storagetype

Anything else

No response

Version

3.1.x

Are you willing to submit PR?

  • [ ] Yes I am willing to submit a PR!

Code of Conduct

which520 avatar Oct 13 '22 04:10 which520

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

github-actions[bot] avatar Oct 13 '22 04:10 github-actions[bot]

did u found hadoop-common-xx.jar package in alert lib path?

DarkAssassinator avatar Oct 16 '22 14:10 DarkAssassinator

I did not find the Hadoop-related jar package in alert-server/lib. After manually rebuilding the image and importing hadoop-common.jar, it returned to normal.

which520 avatar Oct 17 '22 06:10 which520

Please confirm if this issue exists in 30x and dev.

songjianet avatar Oct 17 '22 13:10 songjianet

I guess you should use HDFS for resource configuration, you only need to configure resource.storage.type=HDFS in common.properties under the api-server and worker-server folders, alerter-server does not need to configure resource information, just use the default values resource.storage.type=NONE

zhuangchong avatar Oct 18 '22 05:10 zhuangchong

I will close this issue, if you still have problems, you can open this issue again.

zhuangchong avatar Oct 18 '22 05:10 zhuangchong