I've already changed the driver, I've already checked the connection string for a possible error, but apparently everything is fine. I am trying to remotely connect to a SQL Server database through JDBC via Logstash running on Docker. And I'm getting the following error, I hid the real IP
Unable to connect to database. Tried 3 times {:message=>"Java::ComMicrosoftSqlserverJdbc::SQLServerException: The TCP/IP connection to the host IP_HIDDEN, port 1433 has failed. Error: \"Connect timed out. 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.\".", :exception=>Sequel::DatabaseConnectionError, :cause=>#<Java::ComMicrosoftSqlserverJdbc::SQLServerException: The TCP/IP connection to the host IP_HIDDEN, port 1433 has failed. Error: "Connect timed out. 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.".>
Here my JDBC Config:
jdbc {
tags => ["usuario"]
jdbc_driver_class => "com.microsoft.sqlserver.jdbc.SQLServerDriver"
jdbc_driver_library => "/usr/share/logstash/plugins/connectors-database/sqlserver/mssql-jdbc-9.2.1.jre8.jar"
jdbc_connection_string => "jdbc:sqlserver://IP_HIDDEN:1433;databaseName=DATABASE;integratedSecurity=false;"
jdbc_user => "user"
jdbc_password => "password"
sql_log_level => "debug"
connection_retry_attempts => 3
statement => "select * from usuario"
}
If I connect through SQL Server Management Studio with the same IP and credentials, it works correctly. But with JDBC it doesn't work. Does anyone know what can it be?
Information that may be useful: SQL Server is hosted on AZURE
Here are all the connectors I've tried, and both give the same error