How to solve the problem of Elasticsearch ODBC DSN Configuration Connection Failed - elasticsearch

I am new to Elasticsearch / ODBC and was trying to configure DSN, and I followed Configuration | Elasticsearch Guide to do it. Under 2.2 Connection parameters, it's stated that "At a minimum, the Name and Hostname fields must be provisioned, before the DSN can be saved.". Therefore, I only put in the the name and hostname, and left all other fields default.
Then, I pressed "Test Connection" but got the message of Connection Failed:
Connection Failed: [Elastic][EsODBC 7.16.2(v7.16.0-4-g42ac03a+,u,r) Driver]Couldn't connect to server (code:7; Failed to connect to ::1 port 9200: Connection refused).
Here is a screenshot of my configuration and connection test.
May I ask why is this happening and how can I solve it? Thanks much.
FYI I am using Windows 10 Pro version 21H2.

Related

Apache Nifi, Connection Issue with Sql server JDBC

I am trying to connect Apache Nifi to SQL Server hosted on localhost but getting this msg:
Establish Connection
Failed to establish Database Connection: java.sql.SQLException: Cannot create PoolableConnectionFactory (The TCP/IP connection to the host localhost, port 1433 has failed. Error: "Connection refused (Connection refused). Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall.".)
I disabled the firewall
I checked that tcp is enabled through SQL Configuration manager.
enter image description here
enter image description here
Nifi DBCPConnectionPool 1.16.3 Configurations:
Database Connection URL: jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks2016
Database Driver Class Name: com.microsoft.sqlserver.jdbc.SQLServerDriver
Database Driver Location(s): file:///usr/lib/jvm/jre/lib/jdbc/sqljdbc_10.2/enu/mssql-jdbc-10.2.1.jre8.jar
enter image description here
But still not able to figure out what is the issue

How to fix IO Error: The Network Adapter could not establish the connection

I am trying to connect my oracle cloud database using sqldeveloper with connection type basic but it fails connection with error:
Status : Failure -Test failed: IO Error: The Network Adapter could not establish the connection.
Anyone can help how can i connect my oracle db system using sqldevloper with connection type either basic or TNS ??
Have you tried to telnet the server on port 1521?
It sounds likely that the dbsystem is not connected to the internet.
Please check if the dbsystem subnet has:
Security List with a rule to allow port 1521 on your ip address
Routing Table that allows internet access via internet gateway

use jdbc to connect sybase ASE

I want to use jdbc to connect Sybase ASE, but, I got an error in the following:
JZ006: 捕获到 IO 例外:java.net.ConnectException: Connection refused: connect
Can anybody tell me how to solve this problem?
"Connection refused: connect" is a low level socket error meaning that nothing is listening on the port you are trying to connect to (or it was blocked by a firewall).
This means that either you have no Sybase ASE running, it is not listening on the IP address you are connecting to, it is listening on a different port, or a firewall blocks your connection.

Error connecting to Oracle DB from Java

Could someone please help me on why I received the following error while trying to connect to Oracle db from java....
The connection call is:
Connection con = DriverManager.getConnection(
"jdbc:oracle:thin:#winson.net:1522/hcrod",
"manager", "passing");
I receive the following error:
java.sql.SQLException: Listener refused the connection with the following error:
ORA-12514, TNS:listener does not currently know of service requested in connect descriptor
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:113)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:263)
at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:389)
at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:454)
at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:165)
at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:35)
at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:802)
at java.sql.DriverManager.getConnection(DriverManager.java:582)
at java.sql.DriverManager.getConnection(DriverManager.java:185)
at test_sample.main(test_sample.java:15)
in a similar case for me worked a slightly other connect string:
jdbc:oracle:thin:#winson.net:1522:hcrod
really without the // and with : instead of /
I've seen this error come up a few times when I've started the TNS listener after I started the database. When the database starts up it registers itself with the listener if the listener is running, but if the listener isn't running it can't do this.
It's possible to manually persuade the database to register itself with the listener. To do this, connect to the database as SYS and run the SQL statement ALTER SYSTEM REGISTER;.
It sounds like the port on the server isn't listening, port 1522.
Can you telnet the port successfully?
Oracle's JDBC thin URI syntax is as follows:
jdbc:oracle:thin:[USER/PASSWORD]#//[HOST][:PORT]/SERVICE
So:
jdbc:oracle:thin:#//winson.net:1522/hcrod"
Note the two slashes added after the # symbol.
i think port number for oracle is 1521

Oracle connection error

java.sql.SQLException: Io exception: The Network Adapter could not establish the
connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java)
I am getting this error when data in database is increased (nearly 3000). It works fine with limited data (say 100).
The Network Adapter could not establish the connection
Is typically thrown when
the Oracle listener is not running
the wrong hostname was specified in the connection url
the wrong port was specified in the connection url
the port is blocked by firewall
I have never seen it related to "increasing" the data in the database

Resources