java.sql.SQLException: connect error when connecting to TDengine database - jdbc

I'm trying Druid to connect TDengine.
url jdbc:TAOS-RS://127.0.0.1:6041/test?user=xxx&password=xxxx
Then I got the following error:
java.sql.SQLException: connect error
If I use JDBC directly, it's ok. What may be the problem?

Please make sure you have launched taosAdapter.
You can try
systemctl start taosadapter

Related

Connect to Teamcity to OCI Autonomous Transaction Processing Database

I am trying to migrate my Teamcity database from internal to external, and I registered a free tier ATP database. I am not sure how to how to set the connection URL in the teamcity database property files to access the database.
The tnsnames I am referencing is from the following:
teamcitytestdb_medium = (description= (retry_count=20)(retry_delay=3)(address=(protocol=tcps)(port=1522)(host=adb.us-phoenix-1.oraclecloud.com))(connect_data=(service_name=rhhea6hkgj2saju_teamcitytestdb_medium.atp.oraclecloud.com))(security=(ssl_server_cert_dn="CN=adwc.uscom-east-1.oraclecloud.com,OU=Oracle BMCS US,O=Oracle Corporation,L=Redwood City,ST=California,C=US")))
The command I ran for the tests below are using this command:
bin/maintainDB.sh migrate -T $(pwd)/database.oracle.autodb.properties.dist
Here is a list of commands and output I tried:
Test1:
connectionUrl=jdbc:oracle:thin:#//adb.us-phoenix-1.oraclecloud.com:1522/rhhea6hkgj2saju_teamcitytestdb_high.atp.oraclecloud.com
driverName=oracle.jdbc.driver.OracleDriver
connectionProperties.user=<username>
connectionProperties.password=<password>
--------- output ---------
Cannot proceed with 'migrate' command: Could not connect to the target database: Could not connect to Oracle server.
IO Error: Got minus one from a read call: java.sql.SQLRecoverableException: IO Error: Got minus one from a read call. Caused by: oracle.net.ns.NetException: Got minus one from a read call
Test2:
connectionUrl=jdbc:oracle:thin:#tcps://adb.us-phoenix-1.oraclecloud.com:1522/rhhea6hkgj2saju_teamcitytestdb_high.atp.oraclecloud.com?wallet_location=/Users/jiuwang/Documents/Spectra/3rd-jars/teamcity-tests/Wallet_TeamCityTestDB
driverName=oracle.jdbc.driver.OracleDriver
connectionProperties.user=<username>
connectionProperties.password=<password>
--------- output ---------
Cannot proceed with 'migrate' command: Could not connect to the target database: Could not connect to Oracle server.
IO Error: The Network Adapter could not establish the connection: java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection. Caused by: oracle.net.ns.NetException: The Network Adapter could not establish the connection
Test3:
connectionUrl=jdbc:oracle:thin:#adb.us-phoenix-1.oraclecloud.com:1522:rhhea6hkgj2saju_teamcitytestdb_medium.atp.oraclecloud.com
driverName=oracle.jdbc.driver.OracleDriver
connectionProperties.user=<username>
connectionProperties.password=<password>
--------- output ---------
Cannot proceed with 'migrate' command: Could not connect to the target database: Could not connect to Oracle server.
IO Error: Got minus one from a read call: java.sql.SQLRecoverableException: IO Error: Got minus one from a read call. Caused by: oracle.net.ns.NetException: Got minus one from a read call
How should I setup this correctly so the migration tool can connect to the database? Thanks
You need to provide the TNS_ADMIN to point to the path where you have downloaded the wallet credentials to connect to Autonomous Database.
Also, the JDBC version is important. You can use pass TNS_ADMIN as part of the connection URL only if you are using JDBC driver version 18.3 and above.
I would suggest to try a DataSourceSample.java to make sure if the connection works.
DB_URL ="jdbc:oracle:thin:#wallet_dbname?TNS_ADMIN=/Users/test/wallet_dbname";
Also, refer to this page for more details.

Hive problems of connection to port 10000

Currently we are running mapr three node cluster where hive is installed and we use it very frequently for analytics and reporting but due to many connection or some other reason hue(UI panel) show error that
"Could not connect to cm:10000"
and after hs2 stop and start(restart) that start working fine what is issue I am really failed to fix it what should I do and how I can fix it
Could not connect to cm:10000 (code THRIFTTRANSPORT): TTransportException('Could not connect to cm:10000',)
its happening very frequently 1 - 2 times in a day .
Please suggest .
I had the same issue connecting to Port 10000. Below is the error.
WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Beeline version 3.1.0.3.1.0.0-78 by Apache Hive
This forum has several posts about this error already. Common suggestions are:
Checking hive.log. I am using HDP but do not know the location of
hive.log. I checked the path "/var/log/hive" but files in that folder are
days old.
I checked the port using "netstat -an |grep 10000". It did
not return anything. But I know HiveServer2 is running from the
Ambari interface. Besides, I am able to connect to HiveServer2 via
embedded mode.

Oracle database throwing error - orapw[SID] is missing

I have downloaded and installed Oracle Database Express edition. In SQL Developer, I am trying to create a new database connection that connects to SYS, however I am being rejected with the error:
Status : Failure -Test failed: Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
I found out that during installation I should have been prompted to create a password for sys, but no such thing happened.
I then tried to find the orapw[SID] file in /database. It was not there.
Any idea what I'm doing wrong?

Getting Error when connection scott schema from SQL Developer

I am getting below error when ever trying to connect DB from sql developer.
Status : Failure -Test failed: Listener refused the connection with
the following error: ORA-12514, TNS:listener does not currently know
of service requested in connect descriptor
But successfully connect from command prompt.
I have set the path in environment variable correctly.
Can you please help me with this issue.
Thanks

Local Mongo on Windows - couldn't connect to server 127.0.0.1:27017, connection attempt failed

Installed Mongo 3.2 on Windows 8.1. Got this:
c:\foo>"c:\Program Files\MongoDB\Server\3.2\bin\mongo.exe"
MongoDB shell version: 3.2.5
connecting to: test
2016-04-26T13:41:31.032+0100 W NETWORK [thread1] Failed to connect to 127.0.0.1
:27017, reason: errno:10061 No connection could be made because the target machine actively refused it.
2016-04-26T13:41:31.034+0100 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed :
connect#src/mongo/shell/mongo.js:229:14
#(connect):1:6
exception: connect failed
c:\foo>ver
Microsoft Windows [Version 6.3.9600]
Why?
What else can I say?
I got the same error this is how i solved it.
open your task manager
click on service tab
check for Mongo Db service
and right click restart it.
hopefully this will solved it.
You have to start the server process first.
https://docs.mongodb.org/v3.0/tutorial/install-mongodb-on-windows/#run-mongodb
First, you should install Mongodb as a service,
Open your cmd as admin
Run ( net start mongodb )
Now you can run the command ( mongo ) and you will be able to connect normally, with no Problem.

Resources