Cannot establish a connection to orientdb using jdbc driver? - jdbc

I'm newbie to the orientdb, I'm using netbeans's (add new connection wizard) to add a connection to the orientdb, I used orientdb-jdbc-2.0.2-all.jar as a jdbc driver, but I got the following error after clicking on test connection
Snapshot of the error
I made sure that the database is connected and everything is right, any idea?

The URL should be jdbc:orient:remote:localhost/Sensor_Data
Look at the documentation: http://www.orientechnologies.com/docs/last/orientdb-jdbc.wiki/Home.html#first-get-a-connection.

the problem should be in the connection port. You are using 2480 (HTTP port) instead of 2424 (binary protocol).

Related

How to connect to Vitess database with JDBC connector

I'm trying to connect to Vitess database.
To my best knowledge I have to use dedicated JDBC connector (https://mvnrepository.com/artifact/io.vitess/vitess-jdbc) for the Vitess. I have tried to connect like this:
#1 jdbc:vitess://user:password#hostname:port/
#2 jdbc:vitess://user:password#hostname:port/my_schema
#3 jdbc:vitess://user:password#hostname:port/my_schema#replica
#4 jdbc:vitess://user:password#hostname:port/keyspace/my_schema
but I'm getting following error:
Driver class 'io.vitess.proto.Query$ExecuteOptions$IncludedFields' not found.
I have found information regarding IncludedFields in https://vitess.io/zh/docs/reference/vitess-api/
I also tried to put this value into database url (?included_fields=all or ?included_fields=2), but apparently there is no effect at all.
Is there any way to connect to Vitess through JDBC connector?
Vitess can be used with mysql driver with connection string "jdbc:mysql://:
The Vitess JDBC driver uses grpc protocol, currently it is not managed.
For now, we suggest to use mysql java connector.

setting TopologyChangeAware on jdbc voltdb client

I am making a jdbc connection to voltdb, how to make this connection TopologyChangeAware. over here i am using Hikari.
Finally got answer
For now, the jdbc client does not have a TopologyChangeAware property, but there is a similar one called autoreconnect that we can put into your connection URL.
It is described in the docs here:usingvoltdb jdbc
It looks something like this:
Connection c = DriverManager.getConnection(
"jdbc:voltdb://svr1:21212,svr2:21212?autoreconnect=true");
When set to true, the jdbc client will automatically try to reconnect to any nodes that disconnect until they rejoin the cluster.

Database connection for JDBC request on jmeter

For JDBC request on Jmeter I have configured properly Database Connection Configuration with giving
Database Url- jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-1.rds.amazonaws.com;Development_DB
JDBC Driver Class- com.mysql.jdbc.Driver
Username-...
Password-...
then I create a JDBC request with Select Statementbut after run this request,on the response message got this message-
Response message:
java.sql.SQLException: Cannot create PoolableConnectionFactory (Communications link failure The last packet sent successfully to the
server was 0 milliseconds ago. The driver has not received any packets
from the server.)
Now my question is , how to solve this problem?
You need two basic things to get that done:
Tunneling
mysql.jdbc jar in JMeter lib folder.
For 1st:
Open Putty
Go to Connection >> SSH >> Tunnels
Put down the details as port: 9876
Put down the details as database URL (present in the application config file), e.g:
jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-.rds.amazonaws.com;Development_DB
Add it
Open JMeter >> Add JDBC Connection Configuration
Use DataBase URL as jdbc:mysql://localhost:9876 and the
other details as shown in the picture, like JDBC driver Class
For step 2. Go through this link:
https://www.blazemeter.com/blog/mysql-database-and-jmeter-how-to-test-your-connection/
Looking into Driver/Datasource Class Names, URL Syntax and Configuration Properties for Connector/J article:
I believe you need to replace the semicolon before Development_DB with a slash like:
jdbc:mysql://developmentdb.cwwxeukesrtn.ap-southeast-1.rds.amazonaws.com/Development_DB
For more information on databases load testing see The Real Secret to Building a Database Test Plan With JMeter article.
You might also need to open port 3306 in your operating system firewall and add the relevant Security Group to your instance in order to allow MySQL JDBC traffic.

How to auto connect with Soket.io

I'm creating a webapp that support offline mode using AppCache.
When I'm online, it connect fine. If the connection is dropped and regain, it reconnect correctly.
My problem is when I'm opening my webapp when disconnected and then a connect to the internet, Socket.IO doesn't connect. It just doesn't try to connect.
I analysed a little bit the code, and it seen that it need a first valid connection in order to try to reconnect. If the first connection fail, it will permanently fail.
Is there something I miss?
So what stops you to have a global variable isConnectionStartedOnce, initialize it on the first successful connection. And on re connection event if it is initiaziled - reconnect, otherwise connect from scratch.

dotCMS in Jelastic cloud (define jdbc url)

I've tried to follow this article http://docs.jelastic.com/jelastic-dotcms-deploy , but actually when I started application I get an error:
SEVERE: Exception starting filter URLMapFilter
com.dotmarketing.exception.DotRuntimeException: org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create PoolableConnectionFactory (Communications link failure
The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.)
I understand that there is a problem with jdbc url , but I can't fix it.
Any suggestions?
Thanks for clarifying.
Your JDBC URL should be like this:
jdbc:mysql://mysql-env-giph.j.rsnx.ru/dotcms
Note the mysql- not mysql.
EDIT: http://docs.jelastic.com/connection-to-mysql may help to clarify it further (in the docs, the environment name is "mysqlconnection", so they use "mysql-mysqlconnection" for the MySQL server.
The format is always like this:
host=jdbc:mysql://mysql-{your_env_name}.{hoster_domain}/{db_name}

Resources