HDB++ for cassandra
|
|
---|---|
Hi, I have successfully installed hdb++ for cassandra. I am using tango 9 VM which is available on tango website. I have done following changes in class properties of 1. HdbConfigurationManager 2. HdbEventSubscriber (I have attached snapshots of the same). Also I have created devices for same. After that executed following steps 1. Executed sql script given in code for cassandra. 2. excuted newly generated executables for configuration-manager and event-subscriber with their instance name. Got following errors for - Configuration Manager - HdbPPMySQL: mysql connect db error: Access denied for user 'cassandra'@'localhost' (using password: YES) - Event Subscriber - HdbPPMySQL: mysql connect db error: Access denied for user 'cassandra'@'localhost' (using password: YES) Even though it is compiled for cassandra it is trying to connect to mysql. Are there any other configurations required for this ? Please help in resolving this issue. You can download compressed folder of hdb++ installation for cassandra from below link. https://drive.google.com/file/d/0B59RuKDhB3EQNDdMc2hSTkU1Q0E/view?usp=sharing Thanks, Sandeep |
|
|
---|---|
Hi, I have resolved above problem. But facing some other issues. I have changed sql script for cassandra for creating keyspace instead of using "NetwokTopology" changed it to "SimpleStrategy".and executed this script. Whenever I am trying to configure attribute for archiving using HDB++ configurator I am getting following error on command prompt where I have configuration manager running find_attr_id_type: ERROR in query=SELECT att_conf_id,data_type FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_attr_conf: ERROR executing query=INSERT INTO hdb.att_conf (att_conf_id,cs_name,att_name,data_type) VALUES (?, ?, ?, ?) configure_Attr(tango://tango9-vm:10000/t/v/1/waterlevel): Error inserting into att_conf table (error = -1) This is the stacktrace from HDB++ configurator (Configuration query error) fr.esrf.TangoApi.ConnectionFailed at fr.esrf.TangoDs.Except.throw_connection_failed(Except.java:616) fr.esrf.TangoDs.Except.throw_connection_failed(Except.java:569) fr.esrf.TangoApi.ConnectionDAODefaultImpl.command_inout(ConnectionDAODefaultImpl.java:922) fr.esrf.TangoApi.ConnectionDAODefaultImpl.command_inout(ConnectionDAODefaultImpl.java:944) fr.esrf.TangoApi.Connection.command_inout(Connection.java:388) org.tango.hdbcpp.tools.ArchiverUtils.addAttribute(ArchiverUtils.java:151) org.tango.hdbcpp.configurator.HdbConfigurator.addSpecifiedAttribute(HdbConfigurator.java:1169) org.tango.hdbcpp.configurator.AttributeTree.addAttribute(AttributeTree.java:408) org.tango.hdbcpp.configurator.AttributeTree.treeMouseClicked(AttributeTree.java:175) org.tango.hdbcpp.configurator.AttributeTree.access$300(AttributeTree.java:61) org.tango.hdbcpp.configurator.AttributeTree$2.mouseClicked(AttributeTree.java:147) java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:270) java.awt.Component.processMouseEvent(Component.java:6538) javax.swing.JComponent.processMouseEvent(JComponent.java:3324) java.awt.Component.processEvent(Component.java:6300) java.awt.Container.processEvent(Container.java:2236) java.awt.Component.dispatchEventImpl(Component.java:4891) java.awt.Container.dispatchEventImpl(Container.java:2294) java.awt.Component.dispatchEvent(Component.java:4713) java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888) java.awt.LightweightDispatcher.processMouseEvent(Container.java:4534) java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466) java.awt.Container.dispatchEventImpl(Container.java:2280) java.awt.Window.dispatchEventImpl(Window.java:2750) java.awt.Component.dispatchEvent(Component.java:4713) java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758) java.awt.EventQueue.access$500(EventQueue.java:97) java.awt.EventQueue$3.run(EventQueue.java:709) java.awt.EventQueue$3.run(EventQueue.java:703) java.security.AccessController.doPrivileged(Native Method) java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:86) java.awt.EventQueue$4.run(EventQueue.java:731) java.awt.EventQueue$4.run(EventQueue.java:729) java.security.AccessController.doPrivileged(Native Method) java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:76) java.awt.EventQueue.dispatchEvent(EventQueue.java:728) java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201) java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116) java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101) java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93) java.awt.EventDispatchThread.run(EventDispatchThread.java:82) Also I have attached snapshot of the error. Please help me to resolve this. Thanks, Sandeep |
|
|
---|---|
Dear Sandeep, I'm glad you fixed your previous problem (I guess a wrong PATH or LD_LIBRARY_PATH, or you forgot to install some of the libraries at the correct location). Please try to configure Cassandra without username and password. The support for passwords and usernames is not yet implemented in libhdb++cassandra. I will add that soon. If this does not work, please verify that you can connect to Cassandra using the Cassandra tools first. (nodetool status, cqlsh). Cheers, Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
By the way, Applying the following patch in LibHdb++Cassandra.cpp might be enough…
You can try and let me know if it works.
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, I am able to connect to Cassandra using cqlsh. I have tried making those property values blank and also removing them, but still facing same issue. When I start Event subscriber following is the output on terminal tango-cs@tango9-vm:~/HDB++_svn/tango-cs-code/archiving/hdb++$ /home/tango-cs/HDB++_svn/tango-cs-code/archiving/hdb++/hdb++es/trunk/bin/hdb++es-srv 01 HdbPPCassandra: VERSION: $Build: eadURL: Nov 10 2015 11:37:37 $ file:src/LibHdb++Cassandra.cpp $Id: $ 1447762063.158 [WARN] (src/connection.cpp:791:void cass::Connection::notify_error(const string&, cass::Connection::ConnectionError)): Host 127.0.0.1 received invalid protocol response Invalid or unsupported protocol version: 4 1447762063.158 [WARN] (src/control_connection.cpp:204:virtual void cass::ControlConnection::on_close(cass::Connection*)): Lost control connection on host 127.0.0.1 1447762063.158 [WARN] (src/control_connection.cpp:223:virtual void cass::ControlConnection::on_close(cass::Connection*)): Host 127.0.0.1 does not support protocol version 4. Trying protocol version 3… find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed find_last_event: ERROR in query=SELECT event FROM hdb.att_history WHERE att_conf_id = ? ORDER BY time DESC LIMIT 1 Cassandra Error: Invalid version for TimeUUID type. Cassandra Error: Invalid version for TimeUUID type. insert_history_event: ERROR executing query=INSERT INTO hdb.att_history (att_conf_id,event,time,time_us) VALUES ( ?, ?, ?, ?) event_AttrError adding start event to history table for attribute tango://tango9-vm:10000/sim/motor/1/position (src/LibHdb++Cassandra.cpp:1550) find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed find_last_event: ERROR in query=SELECT event FROM hdb.att_history WHERE att_conf_id = ? ORDER BY time DESC LIMIT 1 Cassandra Error: Invalid version for TimeUUID type. Cassandra Error: Invalid version for TimeUUID type. insert_history_event: ERROR executing query=INSERT INTO hdb.att_history (att_conf_id,event,time,time_us) VALUES ( ?, ?, ?, ?) event_AttrError adding start event to history table for attribute tango://tango9-vm:10000/sys/tg_test/1/double_scalar (src/LibHdb++Cassandra.cpp:1550) find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed find_last_event: ERROR in query=SELECT event FROM hdb.att_history WHERE att_conf_id = ? ORDER BY time DESC LIMIT 1 Cassandra Error: Invalid version for TimeUUID type. Cassandra Error: Invalid version for TimeUUID type. insert_history_event: ERROR executing query=INSERT INTO hdb.att_history (att_conf_id,event,time,time_us) VALUES ( ?, ?, ?, ?) event_AttrError adding start event to history table for attribute tango://tango9-vm:10000/sys/tg_test/1/float_scalar (src/LibHdb++Cassandra.cpp:1550) find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed find_last_event: ERROR in query=SELECT event FROM hdb.att_history WHERE att_conf_id = ? ORDER BY time DESC LIMIT 1 Cassandra Error: Invalid version for TimeUUID type. Cassandra Error: Invalid version for TimeUUID type. insert_history_event: ERROR executing query=INSERT INTO hdb.att_history (att_conf_id,event,time,time_us) VALUES ( ?, ?, ?, ?) event_AttrError adding start event to history table for attribute tango://tango9-vm:10000/sys/tg_test/1/long_scalar (src/LibHdb++Cassandra.cpp:1550) find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed find_last_event: ERROR in query=SELECT event FROM hdb.att_history WHERE att_conf_id = ? ORDER BY time DESC LIMIT 1 Cassandra Error: Invalid version for TimeUUID type. Cassandra Error: Invalid version for TimeUUID type. insert_history_event: ERROR executing query=INSERT INTO hdb.att_history (att_conf_id,event,time,time_us) VALUES ( ?, ?, ?, ?) event_AttrError adding start event to history table for attribute tango://tango9-vm:10000/sys/tg_test/1/wave (src/LibHdb++Cassandra.cpp:1550) find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_param_Attr: Could not find ID for attribute tango://tango9-vm:10000/sim/motor/1/position find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sim/motor/1/position find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_param_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/double_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/double_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_param_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/float_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/float_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_param_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/long_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/long_scalar find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_param_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/wave find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sys/tg_test/1/wave Ready to accept request find_attr_id_in_db: ERROR in query=SELECT att_conf_id FROM hdb.att_conf WHERE att_name = ? AND cs_name = ? Cassandra Error: All hosts in current policy attempted and were either unavailable or failed insert_Attr: Could not find ID for attribute tango://tango9-vm:10000/sim/motor/1/position Problem looks same like the one I have posted before. Thanks, Sandeep |
|
|
---|---|
What version of Cassandra are you using?
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Hi Reynald, Below is the output of cqlsh Connected to Test Cluster at 127.0.0.1:9042. [cqlsh 5.0.1 | Cassandra 2.1.11 | CQL spec 3.2.1 | Native protocol v3] We've installed Cassandra as a service. If you need any additional details please let us know. Regards, Sandeep |
|
|
---|---|
I suppose you are running the device servers on the same machine where Cassandra is installed, right?
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |
|
|
---|---|
Yes. |
|
|
---|---|
It looks like the C++ Cassandra driver you are using is using the v4 native protocol. Your Cassandra version supports up to protocol V3 I think. I would suggest to install an older version of the Cassandra C++ driver and to recompile the hdb++ libraries and device servers. Here at the ESRF, we are still using the version 2.0.1 of the C++ Cassandra driver. I would strongly encourage you to use that version since there might be some parts of the code which might also not work with the latest version of the C++ Cassandra driver which is still evolving a lot. hoping this helps Reynald
Rosenberg's Law: Software is easy to make, except when you want it to do something new.
Corollary: The only software that's worth making is software that does something new. |