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.
Related
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.
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
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
So, I am using telnet to connect to a host and port. But right after I connect the host closes the connection. So, I get the hand-shake of
[SYN]
[SYN,ACK]
[ACK]
Then, I get:
[FIN,ACK]
My question is what is the diagnosis of this type of connection problem?
I am not sure if it connection refused because of the initial hand-shake.
Connection refused? Firewall? Another type of error?
It means the server has closed the connection, which could be for a large number of reasons, including normal operation.
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