Uploaded image for project: 'Kylin'
  1. Kylin
  2. KYLIN-5287

Kylin postgresql to store metadata

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • v4.0.2
    • Future
    • Driver - JDBC, Metadata
    • None

    Description

      We have configured Postgres to store kylin 4.0.2 metadata getting following error

       

      Kylin.properties 

      kylin.source.default=16
      kylin.metadata.url=kylin@jdbc,driverClassName=org.postgresql.Driver,url=jdbc:postgresql://127.0.0.1:5432/kylin,username=kylin1,password=XXXX,maxActive=10,maxIdle=10
      kylin.source.jdbc.connection-url=jdbc:postgresql://127.0.0.1:5432/kylin
      kylin.source.jdbc.adaptor=org.apache.kylin.sdk.datasource.adaptor.PostgresqlAdaptor kylin.source.jdbc.driver=org.postgresql.Driver
      kylin.source.jdbc.dialect=postgresql
      kylin.source.jdbc.user=kylin1
      kylin.source.jdbc.pass=XXXXXXX 

       

      2022-10-28 16:56:52,922 INFO  [localhost-startStop-1] init.InitialSparderContext:40 : Maybe this is job node, or switch is off, do not need to start Spark, false2022-10-28 16:56:53,014 INFO  [localhost-startStop-1] persistence.ResourceStore:90 : Using metadata url kylin@jdbc,driverClassName=org.postgresql.Driver,url=jdbc:postgresql://127.0.0.1:5432/kylin,username=kylin1,password=XXXXXX,maxActive=10,maxIdle=10 for resource store2022-10-28 16:56:53,032 INFO  [localhost-startStop-1] persistence.JDBCConnectionManager:92 : Connecting to Jdbc with url:jdbc:postgresql://127.0.0.1:5432/kylin by user kylin12022-10-28 16:56:53,230 INFO  [localhost-startStop-1] persistence.JDBCConnectionManager:65 : Connected to PostgreSQL 11.12022-10-28 16:56:53,244 WARN  [localhost-startStop-1] support.XmlWebApplicationContext:559 : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'diagnosisService': Unsatisfied dependency expressed through field 'aclEvaluate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'aclEvaluate': Unsatisfied dependency expressed through field 'aclUtil'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclUtil' defined in URL [jar:file:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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@jdbc,driverClassName=org.postgresql.Driver,url=jdbc:postgresql://127.0.0.1:5432/kylin,username=kylin1,password=XXXXXX,maxActive=10,maxIdle=102022-10-28 16:56:53,249 ERROR [localhost-startStop-1] context.ContextLoader:313 : Context initialization failedorg.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'diagnosisService': Unsatisfied dependency expressed through field 'aclEvaluate'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'aclEvaluate': Unsatisfied dependency expressed through field 'aclUtil'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclUtil' defined in URL [jar:file:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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@jdbc,driverClassName=org.postgresql.Driver,url=jdbc:postgresql://127.0.0.1:5432/kylin,username=kylin1,password=XXXXXXXX,maxActive=10,maxIdle=10	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:660)	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:640)	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:119)	at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:399)	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1425)	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593)	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)	at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:401)	at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292)	at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103)	at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4763)	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5232)	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:753)	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:727)	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:1016)	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1903)	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: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'aclEvaluate': Unsatisfied dependency expressed through field 'aclUtil'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'aclUtil' defined in URL [jar:file:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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:/root/rpmbuild/SOURCES/apache-kylin-4.0.2-bin/tomcat/webapps/kylin/WEB-INF/lib/kylin-server-base-4.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@jdbc,driverClassName=org.postgresql.Driver,url=jdbc:postgresql://127.0.0.1:5432/kylin,username=kylin1,password=XXXXXXX,maxActive=10,maxIdle=10
      
      
      	at org.apache.kylin.common.persistence.ResourceStore.createResourceStore(ResourceStore.java:101)	at org.apache.kylin.common.persistence.ResourceStore.getStore(ResourceStore.java:113)	at org.apache.kylin.rest.service.AclService.<init>(AclService.java:89)	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	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.springframework.beans.BeanUtils.instantiateClass(BeanUtils.java:207)	... 102 moreCaused by: java.lang.reflect.InvocationTargetException	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)	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.apache.kylin.common.persistence.ResourceStore.createResourceStore(ResourceStore.java:94)	... 109 moreCaused by: org.postgresql.util.PSQLException: ERROR: unrecognized configuration parameter "tables"	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2468)	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2211)	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:309)	at org.postgresql.jdbc.PgStatement.executeInternal(PgStatement.java:446)	at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:370)	at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:149)	at org.postgresql.jdbc.PgPreparedStatement.executeQuery(PgPreparedStatement.java:108)	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)	at org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:96)	at org.apache.kylin.common.persistence.JDBCResourceStore$1.checkTableExists(JDBCResourceStore.java:141)	at org.apache.kylin.common.persistence.JDBCResourceStore$1.execute(JDBCResourceStore.java:114)	at org.apache.kylin.common.persistence.JDBCResourceStore.executeSql(JDBCResourceStore.java:100)	at org.apache.kylin.common.persistence.JDBCResourceStore.createTableIfNeeded(JDBCResourceStore.java:111)	at org.apache.kylin.common.persistence.JDBCResourceStore.<init>(JDBCResourceStore.java:71)

       

       

       

      Attachments

        1. image.png
          128 kB
          Rohan Nimmagadda
        2. image-1.png
          128 kB
          Rohan Nimmagadda
        3. image-2022-11-02-10-37-16-492.png
          223 kB
          Rohan Nimmagadda
        4. image-2022-11-02-14-03-50-424.png
          128 kB
          mukvin
        5. metadata-jdbc-mysql.properties
          2 kB
          Liu Zhao
        6. screenshot-1.png
          54 kB
          Liu Zhao

        Activity

          People

            mukvin mukvin
            Rohannimmagadda Rohan Nimmagadda
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: