You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@kylin.apache.org by "Shao Feng Shi (Jira)" <ji...@apache.org> on 2020/04/28 08:34:00 UTC

[jira] [Updated] (KYLIN-4438) Null password may cause RuntimeException when starting up

     [ https://issues.apache.org/jira/browse/KYLIN-4438?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Shao Feng Shi updated KYLIN-4438:
---------------------------------
    Summary: Null password may cause RuntimeException when starting up  (was: null password may cause RuntimeException when starting up)

> Null password may cause RuntimeException when starting up
> ---------------------------------------------------------
>
>                 Key: KYLIN-4438
>                 URL: https://issues.apache.org/jira/browse/KYLIN-4438
>             Project: Kylin
>          Issue Type: Bug
>            Reporter: Congling Xia
>            Assignee: Congling Xia
>            Priority: Major
>             Fix For: v3.1.0, v2.6.6
>
>
> `PasswordPlaceholderConfigurer` tries to decode potential password values. But if we use a placeholder with default value and not explictly provide password, it'll raise an runtime exception when Kylin server starts up.
> In my case, ${xx.redis.password:} is used as redis password placeholder. Because no password is needed for my redis instance, so xx.redis.password is left out in kylin.properties, and the server fails to start up:
> {code:java}
> 2020-03-17 07:23:07,392 ERROR [localhost-startStop-1] context.ContextLoader:350 : Context initialization failed
> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'redisConnectionFactory' defined in file [/home/admin/apache-kylin-3.0.1-bin-hbase1x/tomcat/webapps/kylin/WEB-INF/classes/applicationContext.xml]: Null input buffer; nested exception is java.lang.RuntimeException: Null input buffer
>         at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:223)
>         at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:222)
>         at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:86)
>         at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:281)
>         at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:161)
>         at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:687)
>         at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:525)
>         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:5197)
>         at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5720)
>         at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
>         at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:1016)
>         at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:992)
>         at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:639)
>         at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1127)
>         at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:2020)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
>         at java.util.concurrent.FutureTask.run(FutureTask.java:266)
>         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.lang.RuntimeException: Null input buffer
>         at org.apache.kylin.common.util.EncryptUtil.decrypt(EncryptUtil.java:55)
>         at org.apache.kylin.rest.security.PasswordPlaceholderConfigurer.resolvePlaceholder(PasswordPlaceholderConfigurer.java:77)
>         at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.resolvePlaceholder(PropertyPlaceholderConfigurer.java:162)
>         at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PropertyPlaceholderConfigurerResolver.resolvePlaceholder(PropertyPlaceholderConfigurer.java:277)
>         at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:147)
>         at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
>         at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(PropertyPlaceholderConfigurer.java:258)
>         at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
>         at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
>         at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
>         at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
>         at org.springframework.beans.factory.config.PlaceholderConfigurerSupport.doProcessProperties(PlaceholderConfigurerSupport.java:220)
>         ... 22 more
> Caused by: java.lang.IllegalArgumentException: Null input buffer
>         at javax.crypto.Cipher.doFinal(Cipher.java:2161)
>         at org.apache.kylin.common.util.EncryptUtil.decrypt(EncryptUtil.java:52)
>         ... 33 more
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)