有 Java 编程相关的问题?

你可以在下面搜索框中键入要查询的问题!

通过Socksify(开放文本Socks客户端)从STS连接MS Azure中的sqlserver数据库时出现java问题

我正试图通过OpenText socks客户端通过防火墙从本地计算机上的Spring应用程序连接MS Azure中的SQL Server数据库,但我得到以下错误

The TCP/IP connection to the host , port 1433 has failed. Error: "Bad address: connect. 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.".

我可以通过SQLServerManagementStudio通过OpenText客户端连接到同一个数据库,而不会出现任何问题。但是,当我尝试在tomcat服务器中部署spring mvc应用程序时,我遇到了一些问题。部署失败,显示下面的堆栈跟踪

Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: The TCP/IP connection to the host <host name here>, port 1433 has failed. Error: "Bad address: connect. 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.".
      at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDriverError(SQLServerException.java:206)
      at com.microsoft.sqlserver.jdbc.SQLServerException.ConvertConnectExceptionToSQLServerException(SQLServerException.java:257)
      at com.microsoft.sqlserver.jdbc.SocketFinder.findSocket(IOBuffer.java:2385)
      at com.microsoft.sqlserver.jdbc.TDSChannel.open(IOBuffer.java:567)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1955)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1616)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1447)
      at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:788)
      at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1187)
      at java.sql.DriverManager.getConnection(DriverManager.java:664)
      at java.sql.DriverManager.getConnection(DriverManager.java:208)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriverManager(DriverManagerDataSource.java:153)
      at org.springframework.jdbc.datasource.DriverManagerDataSource.getConnectionFromDriver(DriverManagerDataSource.java:144)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnectionFromDriver(AbstractDriverBasedDataSource.java:196)
      at org.springframework.jdbc.datasource.AbstractDriverBasedDataSource.getConnection(AbstractDriverBasedDataSource.java:159)
      at org.hibernate.engine.jdbc.connections.internal.DatasourceConnectionProviderImpl.getConnection(DatasourceConnectionProviderImpl.java:122)
      at org.hibernate.internal.AbstractSessionImpl$NonContextualJdbcConnectionAccess.obtainConnection(AbstractSessionImpl.java:386)
      at org.hibernate.resource.jdbc.internal.LogicalConnectionManagedImpl.acquireConnectionIfNeeded(LogicalConnectionManagedImpl.java:84)
      ... 31 more

我曾尝试在Azure中白名单我的IP地址,但那不起作用。 我也尝试过在袜子应用列表中添加STS,但没有成功

有人能指导我通过OpenText socks客户端通过防火墙从我的Spring MVC应用程序连接MS Azure中的SQLServer吗?或者,除了OpenText Socks客户端之外,您是否可以建议其他方法来实现这一点


共 (0) 个答案