brianmhess / cassandra-loader

Delimited file loader for Cassandra
Apache License 2.0
197 stars 93 forks source link

cassandra-unloader Timed out waiting for server response #79

Open ranjitsingh05 opened 7 years ago

ranjitsingh05 commented 7 years ago

Hi There,

I'm using the cassandra-unloader to export the data from table but i'm getting timeout and i didn't find any options to increase the timeout.

./cassandra-unloader -f stdout -host xxxxxxx -schema "xxx.xxxx(xxx,bool,xxx,xxx,xxx,create_ts,create_user_urn,date,description,last_check_ts,last_update_ts,xxx,name,num,xx,xxxrsion,state,str,text_search,time_to_live,xxx)" -where "solr_query='xxxxx:XXXX' LIMIT 100000" > xxxx.xxxx.csv Exception in thread "main" java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.OperationTimedOutException: [/10.XX.XX.XX:9042] Timed out waiting for server response at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.datastax.loader.CqlDelimUnload.run(CqlDelimUnload.java:402) at com.datastax.loader.CqlDelimUnload.main(CqlDelimUnload.java:471) Caused by: com.datastax.driver.core.exceptions.OperationTimedOutException: [/10.XX.XX.XX:9042] Timed out waiting for server response at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:44) at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:26) at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:68) at com.datastax.loader.CqlDelimUnload$ThreadExecute.execute(CqlDelimUnload.java:599) at com.datastax.loader.CqlDelimUnload$ThreadExecute.call(CqlDelimUnload.java:534) at com.datastax.loader.CqlDelimUnload$ThreadExecute.call(CqlDelimUnload.java:479) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: com.datastax.driver.core.exceptions.OperationTimedOutException: [/10.XX.XX.XX:9042] Timed out waiting for server response at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onTimeout(RequestHandler.java:772) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:1380) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:625) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:700) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:428) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more

learnkarunakarsingh commented 6 years ago

Hello All,

i am also facing the same issue.

java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xxx.xx.xxx:9042] Timed out waiting for server response at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.til.das.service.reports.DFPReportsServiceImpl.saveDFPReportData(DFPReportsServiceImpl.java:285) at com.til.das.service.reports.DFPReportsServiceImpl.execute(DFPReportsServiceImpl.java:147) at org.quartz.core.JobRunShell.run(JobRunShell.java:202) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:573) Caused by: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xx.xxx.xxx:9042] Timed out waiting for server response at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:44) at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:26) at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37) at com.datastax.driver.core.DefaultResultSetFuture.getUninterruptibly(DefaultResultSetFuture.java:245) at com.datastax.driver.core.AbstractSession.execute(AbstractSession.java:68) at com.til.das.service.reports.DFPReportsServiceImpl$1.call(DFPReportsServiceImpl.java:278) at com.til.das.service.reports.DFPReportsServiceImpl$1.call(DFPReportsServiceImpl.java:274) 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: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xxx.xx.xx:9042] Timed out waiting for server response

brianmhess commented 6 years ago

Have you tried setting -queryTimeout?

mdtx001 commented 6 years ago

I don't see -queryTimeout as a valid option for cassandra-unloader. (version: 0.0.27). I get the help screen when I try to add it to my command line options. We are having issues running the tool successfully after upgrading from Cassandra 2.0.9 to Cassandra 2.1.14. Heap is set to 8G, but the error is java.lang.OutOfMemoryError: Java heap space

Exception in thread "main" java.util.concurrent.ExecutionException: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xxx.xxx.xxx:9442] Timed out waiting for server response at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:192) at com.datastax.loader.CqlDelimUnload.run(CqlDelimUnload.java:456) at com.datastax.loader.CqlDelimUnload.main(CqlDelimUnload.java:471) Caused by: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xxx.xxx.xxx:9442] Timed out waiting for server response at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:44) at com.datastax.driver.core.exceptions.OperationTimedOutException.copy(OperationTimedOutException.java:26) at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37) at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.prepareNextRow(ArrayBackedResultSet.java:313) at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.isExhausted(ArrayBackedResultSet.java:269) at com.datastax.driver.core.ArrayBackedResultSet$1.hasNext(ArrayBackedResultSet.java:143) at com.datastax.loader.CqlDelimUnload$ThreadExecute.execute(CqlDelimUnload.java:603) at com.datastax.loader.CqlDelimUnload$ThreadExecute.call(CqlDelimUnload.java:534) at com.datastax.loader.CqlDelimUnload$ThreadExecute.call(CqlDelimUnload.java:479) 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: com.datastax.driver.core.exceptions.OperationTimedOutException: [/xxx.xxx.xxx.xxx:9442] Timed out waiting for server response at com.datastax.driver.core.RequestHandler$SpeculativeExecution.onTimeout(RequestHandler.java:772) at com.datastax.driver.core.Connection$ResponseHandler$1.run(Connection.java:1380) at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:625) at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:700) at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:428) at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:144) ... 1 more Exception in thread "cluster1-scheduled-task-worker-0" java.lang.OutOfMemoryError: Java heap space Exception in thread "cluster1-connection-reaper-0" java.lang.OutOfMemoryError: Java heap space

XavierPrudent commented 6 years ago

Just type cassandra-loader and you will see the list of options, there will be queryTimeout.

Use it as cassandra-loader ... -queryTimeout 120

that works for cassandra-loader, it may work in your case.

Regards,

Xavier

abdelmouheimen commented 4 years ago

-queryTimeout is not a valid option of cassandra-unloader. Did anyone find the solution?

Thanks!