Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Cassandra Connection

I have installed Cassandra DataStax  Community  and able to query using CQL shell.
when i try to create connection am getting below error
Connection failed!
  org.talend.repository.nosql.exceptions.NoSQLServerException: org.talend.repository.nosql.exceptions.NoSQLReflectionException: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.ConnectionException: Unexpected error during transport initialization (com.datastax.driver.core.TransportException: Unexpected exception triggered (java.lang.IndexOutOfBoundsException: Not enough readable bytes - Need 4, maximum is 0))))
      at org.talend.repository.nosql.db.handler.cassandra.CassandraMetadataHandler.checkConnection(CassandraMetadataHandler.java:91)
      at org.talend.repository.nosql.db.provider.cassandra.CassandraMetadataProvider.checkConnection(CassandraMetadataProvider.java:128)
      at org.talend.repository.nosql.ui.common.AbstractNoSQLConnForm$1.widgetSelected(AbstractNoSQLConnForm.java:141)
      at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
      at org.eclipse.jface.window.Window.runEventLoop(Window.java:832)
      at org.eclipse.jface.window.Window.open(Window.java:808)
      at org.talend.repository.nosql.action.CreateNoSQLConnectionAction.doRun(CreateNoSQLConnectionAction.java:91)
      at org.talend.repository.ui.actions.AContextualAction$2.run(AContextualAction.java:632)
      at org.talend.repository.RepositoryWorkUnit.executeRun(RepositoryWorkUnit.java:99)
      at org.talend.core.repository.model.AbstractRepositoryFactory.executeRepositoryWorkUnit(AbstractRepositoryFactory.java:258)
      at org.talend.repository.localprovider.model.LocalRepositoryFactory.executeRepositoryWorkUnit(LocalRepositoryFactory.java:3217)
      at org.talend.core.repository.model.ProxyRepositoryFactory.executeRepositoryWorkUnit(ProxyRepositoryFactory.java:2024)
      at org.talend.repository.ui.actions.AContextualAction.run(AContextualAction.java:641)
      at org.eclipse.jface.action.Action.runWithEvent(Action.java:519)
      at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:595)
      at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:511)
      at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:420)
      at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
      at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4353)
      at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
      at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4172)
      at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3761)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1151)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1032)
      at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:148)
      at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:636)
      at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
      at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:579)
      at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
      at org.talend.rcp.intro.Application.start(Application.java:197)
      at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
      at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380)
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:648)
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603)
      at org.eclipse.equinox.launcher.Main.run(Main.java:1465)
  Caused by: org.talend.repository.nosql.exceptions.NoSQLReflectionException: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.ConnectionException: Unexpected error during transport initialization (com.datastax.driver.core.TransportException: Unexpected exception triggered (java.lang.IndexOutOfBoundsException: Not enough readable bytes - Need 4, maximum is 0))))
      at org.talend.repository.nosql.reflection.NoSQLReflection$WrapException.wrap(NoSQLReflection.java:97)
      at org.talend.repository.nosql.reflection.NoSQLReflection.invokeMethod(NoSQLReflection.java:68)
      at org.talend.repository.nosql.db.handler.cassandra.CassandraMetadataHandler.checkConnection(CassandraMetadataHandler.java:87)
      ... 47 more
  Caused by: com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /127.0.0.1:9042 (com.datastax.driver.core.ConnectionException: Unexpected error during transport initialization (com.datastax.driver.core.TransportException: Unexpected exception triggered (java.lang.IndexOutOfBoundsException: Not enough readable bytes - Need 4, maximum is 0))))
      at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:193)
      at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:79)
      at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1148)
      at com.datastax.driver.core.Cluster.init(Cluster.java:149)
      at com.datastax.driver.core.Cluster.connect(Cluster.java:225)
      at com.datastax.driver.core.Cluster.connect(Cluster.java:258)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
      at java.lang.reflect.Method.invoke(Unknown Source)
      at org.talend.core.utils.ReflectionUtils.invokeMethod(ReflectionUtils.java:166)
      at org.talend.repository.nosql.reflection.NoSQLReflection$3.toDo(NoSQLReflection.java:65)
      at org.talend.repository.nosql.reflection.NoSQLReflection$WrapException.wrap(NoSQLReflection.java:95)
      ... 49 more
Please help me on resolve this
Labels (3)
10 Replies
Anonymous
Not applicable
Author

Hi,
What's your Cassandra  DB version? Could you please show us your tCassandraXXX component setting screenshot?
Best regards
Sabrina
_AnonymousUser
Specialist III
Specialist III

I am also getting a similar issue with sam stack trace. please let me know if you find a solution
Anonymous
Not applicable
Author

Hi, i have the same problem here with talend open studio 6.1.1 and datastax cassandra 2.1.13
Anonymous
Not applicable
Author

I am new to this talend and also getting the same error with talend open studio for big data 6.1.1 and datastax cassandra 3.5.0.  I have not seen any resolution to this issue till now.  I greatly appreciate, if someone can respond and let us know, whether it is an outstanding issue or we are doing something wrong.
Anonymous
Not applicable
Author

Hi,
Have you already checked document about: TalendHelpCenter0683p000009M9p6.pngupported systems databases and business applications by Talend components?
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi,
Have you already checked document about:TalendHelpCenter0683p000009M9p6.pngupported+systems+databases+and+business+applications+by+Talend+components?
Best regards
Sabrina

I am also getting the same problem with the version cassandra version 2.1.8 and Talend 6.2.0
The document link provided by you doesn't answer the solution to the actual problem. Still waiting for satisfactory solution by someone from Talend team
Anonymous
Not applicable
Author

Hi,
There is not enough information for us to address your issue. With version 6.2, the supported  cassandra versions are  2.0.0
3.0/3.1/3.2/3.3/3.4.
Would you mind posting your setting screenshots into forum which will be helpful for us to diagnose your issue.
Best regards
Sabrina
Anonymous
Not applicable
Author

Hi All,
We are using tcassandrainput as Input component.
Talend Version : 6.2.1
Cassandra version : Cassandra 2.0.0
Cassandra Query : select columns_name from table_name where date = ' ' and hour in ( ). date and hour are partition key in Cassandra table.
records present in Cassandra table : 800,0000
job failing with error : Exception in component tCassandraInput_3
com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /10.116.192.106:9042 (com.datastax.driver.core.exceptions.OperationTimedOutException: Timed out waiting for server response), /10.116.192.107:9042 (com.datastax.driver.core.exceptions.OperationTimedOutException: Timed out waiting for server response), /10.116.192.104:9042 (com.datastax.driver.core.exceptions.OperationTimedOutException: Timed out waiting for server response), /10.116.192.105:9042 )
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:84)
at com.datastax.driver.core.exceptions.NoHostAvailableException.copy(NoHostAvailableException.java:37)
at com.datastax.driver.core.DriverThrowables.propagateCause(DriverThrowables.java:37)
at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.prepareNextRow(ArrayBackedResultSet.java:308)
at com.datastax.driver.core.ArrayBackedResultSet$MultiPage.isExhausted(ArrayBackedResultSet.java:265)
at com.datastax.driver.core.ArrayBackedResultSet$1.hasNext(ArrayBackedResultSet.java:136)
is there any way to improve the Cassandra query or any resolution anybody had implemented. Please help. 
Maharshi
Contributor
Contributor

Hi All,

We r maintaining cassandra connection open close in job level

talend version 7.3.1

Cassandra version 3.0.x

deplyoing our apis on talend runtime after deploying few apis facing cassandra connection issues all hosts tried for this query like that.

please help me on this.

attaching log hiding my ip here

 

2021-06-03T09:45:50,762 | FATAL | pool-14-thread-39 | nsmitteralarmschedule_controller 1955 | 365 - rtsapi.transmitteralarmschedule_controller - 0.1.0 | CassandraConnection_1_tCassandraConnection_1 All host(s) tried for query failed (tried: /serverip:9042 (com.datastax.driver.core.exceptions.TransportException: [/serverip] Error writing))

com.datastax.driver.core.exceptions.NoHostAvailableException: All host(s) tried for query failed (tried: /serverip:9042 (com.datastax.driver.core.exceptions.TransportException: [/serverip] Error writing))

at com.datastax.driver.core.ControlConnection.reconnectInternal(ControlConnection.java:231) ~[cassandra-driver-core-3.0.0-shaded.jar:?]

at com.datastax.driver.core.ControlConnection.connect(ControlConnection.java:77) ~[cassandra-driver-core-3.0.0-shaded.jar:?]

at com.datastax.driver.core.Cluster$Manager.init(Cluster.java:1414) ~[cassandra-driver-core-3.0.0-shaded.jar:?]

at com.datastax.driver.core.Cluster.init(Cluster.java:162) ~[cassandra-driver-core-3.0.0-shaded.jar:?]

at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:333) ~[cassandra-driver-core-3.0.0-shaded.jar:?]

at com.datastax.driver.core.Cluster.connectAsync(Cluster.java:308) ~[cassandra-driver-core-3.0.0-shaded.jar:?]