Ask Your Question
3

Error:Cannot make connection to Hive!

asked 2018-01-17 01:05:31 -0600

Maithri gravatar image

updated 2019-09-23 09:53:24 -0600

metadaddy gravatar image

I am trying to fetch mysql table data and dump it in a Hive table. Followed this documentation to configure my pipeline:

I am getting the following error:

Error:Cannot make connection with default hive database starting with URL: jdbc:hive2://localhost:10000/default.

com.streamsets.datacollector.runner.PipelineRuntimeException: CONTAINER_0800 - Pipeline 'mysqltohivef828af73-5a3c-4c02-9855-c70da7db589e' validation error : HIVE_22 - Cannot make connection with default hive database starting with URL: jdbc:hive2://localhost:10000/hivedata.db. Reason:HIVE_22 - Cannot make connection with default hive database starting with URL: jdbc:hive2://localhost:10000/hivedata.db. Reason:null
    at com.streamsets.datacollector.execution.runner.common.ProductionPipeline.run(ProductionPipeline.java:131)
    at com.streamsets.datacollector.execution.runner.common.ProductionPipelineRunnable.run(ProductionPipelineRunnable.java:74)
    at com.streamsets.datacollector.execution.runner.standalone.StandaloneRunner.start(StandaloneRunner.java:754)
    at com.streamsets.datacollector.execution.runner.common.AsyncRunner.lambda$start$3(AsyncRunner.java:152)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:227)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:223)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.lambda$call$0(SafeScheduledExecutorService.java:227)
    at com.streamsets.datacollector.security.GroupsInScope.execute(GroupsInScope.java:33)
    at com.streamsets.pipeline.lib.executor.SafeScheduledExecutorService$SafeCallable.call(SafeScheduledExecutorService.java:223)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
    at com.streamsets.datacollector.metrics.MetricSafeScheduledExecutorService$MetricsTask.run(MetricSafeScheduledExecutorService.java:100)
    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)

Does it require any specific jar/connector?

edit retag flag offensive close merge delete

Comments

https://github.com/streamsets/tutorials/blob/master/tutorial-hivedrift/readme.md I followed this documentation and confired the pipeline,still the same error

Maithri gravatar imageMaithri ( 2018-01-19 00:59:10 -0600 )edit

Try adding the schema name in the URL instead of the default. URL: jdbc:hive2://localhost:10000/someSchema.db

Roh gravatar imageRoh ( 2018-01-19 08:11:58 -0600 )edit

Thanks for the response @Roh.But,the error is still same.

Maithri gravatar imageMaithri ( 2018-01-21 22:11:16 -0600 )edit

Which stage library are you using ? can you try changing the staging library to the latest one? and also can you mention what authentication are you using to connect to hive ? is it with keytabs ?

Roh gravatar imageRoh ( 2018-01-22 10:55:44 -0600 )edit

CDH 5.10.1,No credentials for authentication I used.I am running this pipeline as well as hive on my local streamsets

Maithri gravatar imageMaithri ( 2018-01-22 22:47:18 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-09-22 23:42:15 -0600

Maithri gravatar image

updated 2019-09-23 09:54:19 -0600

metadaddy gravatar image

Giving the proper credentials in the JDBC URL solved the issue

jdbc:hive2://host:10000/default;user=hive_username;password=hive_password;

check the Hive configuration files to see what is your Hive username and password

edit flag offensive delete link more

Comments

Thanks for coming back and providing the answer, @Maithri

metadaddy gravatar imagemetadaddy ( 2019-09-23 09:53:56 -0600 )edit

no problem

Maithri gravatar imageMaithri ( 2019-09-24 00:11:26 -0600 )edit
Login/Signup to Answer

Question Tools

2 followers

Stats

Asked: 2018-01-17 01:05:31 -0600

Seen: 1,098 times

Last updated: Sep 23