apachetomcat无法创建到apachedrill的jdbc连接

vmjh9lq9  于 2021-06-02  发布在  Hadoop
关注(0)|答案(2)|浏览(352)

我正在使用mondrianolap进行分析,我们一直在使用mysql,但决定迁移到apachedrill。
现在我已经配置了ApacheDrill,并且可以通过外部客户机(如squirrel客户机)连接is到ApacheDrill,但是当我尝试通过saiku连接它时,我在catalina.out中得到了以下stacktrace

INFO: Deploying web application directory saiku
name:Lists
driver:mondrian.olap4j.MondrianOlap4jDriver
url:jdbc:mondrian:Jdbc=jdbc:drill:drillbit=localhost:31010;schema=Saiku.root;Catalog=../webapps/saiku/WEB-INF/classes/imi_India/INDIA.xml;JdbcDrivers=org.apache.drill.jdbc.Driver;
23:59:21,878 WARN  [RolapUtil] Mondrian: Warning: JDBC driver sun.jdbc.odbc.JdbcOdbcDriver not found
23:59:21,879 WARN  [RolapUtil] Mondrian: Warning: JDBC driver oracle.jdbc.OracleDriver not found
23:59:22,162 WARN  [DrillMetrics] Removing old metric since name matched newly registered metric. Metric name: drill.allocator.root.used
23:59:22,162 WARN  [DrillMetrics] Removing old metric since name matched newly registered metric. Metric name: drill.allocator.root.peak
23:59:25,246 WARN  [ThreadLocalRandom] Failed to generate a seed from SecureRandom within 3 seconds. Not enough entrophy?
mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while creating SQL connection: Jdbc=jdbc:drill:drillbit=localhost:31010; JdbcUser=admin; JdbcPassword=admin
        at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:972)
        at mondrian.olap.Util.newInternal(Util.java:2403)
        at mondrian.olap.Util.newError(Util.java:2419)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:246)
        at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:188)
        at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:216)
        at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:214)
        at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:66)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:160)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:90)
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:112)
        at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
        at mondrian.olap4j.MondrianOlap4jConnection.<init>(MondrianOlap4jConnection.java:153)
        at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.<init>(FactoryJdbc4Plus.java:323)
        at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.<init>(FactoryJdbc41Impl.java:118)
        at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
        at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:134)
        at java.sql.DriverManager.getConnection(DriverManager.java:664)
        at java.sql.DriverManager.getConnection(DriverManager.java:247)
        at org.saiku.datasources.connection.SaikuOlapConnection.connect(SaikuOlapConnection.java:75)
        at org.saiku.datasources.connection.SaikuOlapConnection.connect(SaikuOlapConnection.java:46)
        at org.saiku.datasources.connection.SaikuConnectionFactory.getConnection(SaikuConnectionFactory.java:29)
        at org.saiku.web.impl.SecurityAwareConnectionManager.connect(SecurityAwareConnectionManager.java:284)
        at org.saiku.web.impl.SecurityAwareConnectionManager.getInternalConnection(SecurityAwareConnectionManager.java:99)
        at org.saiku.datasources.connection.AbstractConnectionManager.getConnection(AbstractConnectionManager.java:110)
        at org.saiku.datasources.connection.AbstractConnectionManager.getAllConnections(AbstractConnectionManager.java:136)
        at org.saiku.web.impl.SecurityAwareConnectionManager.init(SecurityAwareConnectionManager.java:58)
        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:497)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1536)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1409)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:574)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425)
        at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:276)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:197)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3972)
        at org.apache.catalina.core.StandardContext.start(StandardContext.java:4467)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:526)
        at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1041)
        at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:964)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:502)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1277)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:321)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
        at org.apache.catalina.core.StandardHost.start(StandardHost.java:722)
        at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
        at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
        at org.apache.catalina.core.StandardService.start(StandardService.java:516)
        at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:593)
        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:497)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
Caused by: org.apache.commons.dbcp.SQLNestedException: Cannot get a connection, pool error Could not create a validated object, cause: null
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)
        at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:226)
        ... 66 more
Caused by: java.util.NoSuchElementException: Could not create a validated object, cause: null
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:1008)
        at org.apache.commons.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:96)
        ... 67 more

现在,我在应用程序的pom.xml中添加了依赖项

<dependency>
<groupId>org.apache.drill.exec</groupId>
<artifactId>drill-jdbc</artifactId>
<version>1.1.0</version>
</dependency>

并使用以下连接字符串
jdbc:drill:钻头=localhost:31010;模式=saiku.root
我在hdfs目录/dashboard/saiku3/.parquet中也有一堆Parquet文件
有17张这样的table。我创建了一个名为saiku的存储引擎,根存储在/saiku3中,并为所有17个hadoop目录创建了视图。这些目录已经通过sqoop作为parquet从mysql导入到hdfs。
我被困在这里好几个小时了,找不到解决办法,我在这里做错什么了吗?
提前谢谢。

qvtsj1bj

qvtsj1bj1#

“熵不够”?这是什么版本的java?您似乎正在使用/dev/random-iso/开发/城市。不管怎样,如果我没弄错的话,你可以用-djava.security.egd来改变这个。

gjmwrych

gjmwrych2#

检查tomcat/lib中是否有drill-jdbc-all-1.8.0.jar

相关问题