- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我尝试使用 MS JDBC 驱动程序连接到 Azure SQL:
import java.sql.*;
public class ExampleSQLJDBC {
public static void main(String[] args) {
// Setting.
String connectionUrl = "jdbc:sqlserver://SERVER.database.windows.net:1433;database=DATABASE;encrypt=true;trustServerCertificate=true;";
String user = "USER@SERVER";
String pass = "PASSWORD";
// Declare the JDBC object.
Connection conn = null;
try {
// Establish the connection.
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
conn = DriverManager.getConnection(connectionUrl, user, pass);
}
catch (Exception e) {
e.printStackTrace();
}
}
}
但我得到:
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Broken pipe ClientConnectionId:742ba7b5-43bb-441b-8e8d-bbb9dc5fa8ce".
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2226)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1756)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1803)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1285)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1131)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at run.ExampleSQLJDBC.main(ExampleSQLJDBC.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144)
有趣的是,我可以从同一台计算机上使用 Navicat 连接到数据库。因此,问题不应该出在防火墙的设置上。
元数据:
如何从 Java 连接到 Azure SQL?
编辑:
如果我在 OS X 上使用 javac
1.8.0_92 编译彼得潘的代码,并在 OS X 上使用 java
1.8.0_92 执行字节码,则该错误不会消失。
编辑 2:当我使用 -Djavax.net.debug=ssl:handshake:verbose
调试 SSL 连接详细信息时:
trigger seeding of SecureRandom
done seeding SecureRandom
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_RSA_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDH_RSA_WITH_AES_256_GCM_SHA384
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_DHE_DSS_WITH_AES_256_CBC_SHA256
Ignoring unavailable cipher suite: TLS_DHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA
Ignoring unavailable cipher suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1
Ignoring unsupported cipher suite: TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_DHE_RSA_WITH_AES_128_CBC_SHA256 for TLSv1.1
Ignoring unsupported cipher suite: TLS_DHE_DSS_WITH_AES_128_CBC_SHA256 for TLSv1.1
%% No cached client session
*** ClientHello, TLSv1.2
RandomCookie: GMT: 1466081162 bytes = { 238, 135, 254, 162, 132, 164, 75, 240, 96, 107, 17, 103, 60, 109, 229, 149, 31, 110, 218, 87, 49, 29, 121, 114, 115, 6, 44, 32 }
Session ID: {}
Cipher Suites: [TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256, TLS_RSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA256, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_RSA_WITH_AES_128_CBC_SHA256, TLS_DHE_DSS_WITH_AES_128_CBC_SHA256, TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA, TLS_RSA_WITH_AES_128_CBC_SHA, TLS_ECDH_ECDSA_WITH_AES_128_CBC_SHA, TLS_ECDH_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_RSA_WITH_AES_128_CBC_SHA, TLS_DHE_DSS_WITH_AES_128_CBC_SHA, TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, TLS_RSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_ECDSA_WITH_AES_128_GCM_SHA256, TLS_ECDH_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_RSA_WITH_AES_128_GCM_SHA256, TLS_DHE_DSS_WITH_AES_128_GCM_SHA256, TLS_ECDHE_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_RSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_ECDSA_WITH_3DES_EDE_CBC_SHA, TLS_ECDH_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_RSA_WITH_3DES_EDE_CBC_SHA, SSL_DHE_DSS_WITH_3DES_EDE_CBC_SHA, TLS_EMPTY_RENEGOTIATION_INFO_SCSV]
Compression Methods: { 0 }
Extension elliptic_curves, curve names: {secp256r1, sect163k1, sect163r2, secp192r1, secp224r1, sect233k1, sect233r1, sect283k1, sect283r1, secp384r1, sect409k1, sect409r1, secp521r1, sect571k1, sect571r1, secp160k1, secp160r1, secp160r2, sect163r1, secp192k1, sect193r1, sect193r2, secp224k1, sect239k1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA224withECDSA, SHA224withRSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
Extension server_name, server_name: [type=host_name (0), value=hlt3qa7607.database.windows.net]
***
main, WRITE: TLSv1.2 Handshake, length = 233
main, called close()
main, called closeInternal(true)
main, SEND TLSv1.2 ALERT: warning, description = close_notify
main, WRITE: TLSv1.2 Alert, length = 2
main, called closeSocket(true)
main, waiting for close_notify or alert: state 5
main, received EOFException: ignored
main, called closeInternal(false)
main, close invoked again; state = 5
main, handling exception: java.io.IOException: SQL Server did not return a response. The connection has been closed. ClientConnectionId:1eb03958-1566-4844-b842-e020f0c36121
main, called closeSocket()
com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:1eb03958-1566-4844-b842-e020f0c36121"....
编辑3:设置驱动程序记录全部后:
Jun 17, 2016 9:26:37 AM com.microsoft.sqlserver.jdbc.SQLServerDriver:1 connect
FINER: ENTRY Arguments not traced.
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:serverName Value:hlt3qa7607.database.windows.net
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:portNumber Value:1433
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:databaseName Value:DATABASE
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:encrypt Value:true
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.Util parseUrl
FINE: Property:trustServerCertificate Value:true
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection <init>
FINE: ConnectionID:1 created by (SQLServerDriver:1)
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection login
FINER: ConnectionID:1 Start time: 1466148398058 Time out time: 1466148413058 Timeout Unit Interval: 1200
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection login
FINE: ConnectionID:1 This attempt server name: hlt3qa7607.database.windows.net port: 1433 InstanceName: null useParallel: false
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection login
FINE: ConnectionID:1 This attempt endtime: 1466148399258
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection login
FINE: ConnectionID:1 This attempt No: 0
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection connectHelper
FINE: ConnectionID:1 Connecting with server: hlt3qa7607.database.windows.net port: 1433 Timeout slice: 1194 Timeout Full: 15
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel open
FINER: TDSChannel (ConnectionID:1): Opening TCP socket...
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
FINER: ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Requesting encryption level:ON
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
FINER: ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c ActivityId 866c0053-25be-4eb2-90c7-a40b5b0535a4-1
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel logPacket
FINEST: /192.168.1.186:63328 SPID:0 ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Prelogin request ...
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel logPacket
FINEST: /192.168.1.186:63328 SPID:0 ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Prelogin response
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
FINE: ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Server returned major version:12
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
FINER: ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Negotiated encryption level:ON
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.SQLServerConnection Prelogin
FINER: ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c Ignoring prelogin response option:5
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINER: TDSChannel (ConnectionID:1) Enabling SSL...
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINER: TDSChannel (ConnectionID:1) SSL handshake will trust any certificate
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINEST: TDSChannel (ConnectionID:1) Getting TLS or better SSL context
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINEST: TDSChannel (ConnectionID:1) Initializing SSL context
Jun 17, 2016 9:26:38 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINEST: TDSChannel (ConnectionID:1) Creating SSL socket
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxySocket getInputStream
FINEST: TDSChannel (ConnectionID:1) (ProxySocket): Getting input stream
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxySocket getOutputStream
FINEST: TDSChannel (ConnectionID:1) (ProxySocket): Getting output stream
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINER: TDSChannel (ConnectionID:1) Starting SSL handshake
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream writeInternal
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream@13c78c0b Writing 238 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeOutputStream writeInternal
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeOutputStream): Starting new TDS packet...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSWriter writeBytes
FINEST: TDSWriter@41629346 (ConnectionID:1) Writing 8 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeOutputStream writeInternal
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeOutputStream): Writing 238 bytes...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSWriter writeBytes
FINEST: TDSWriter@41629346 (ConnectionID:1) Writing 238 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream flush
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream@13c78c0b Flushing
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeOutputStream flush
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeOutputStream): Ignored a request to flush the stream
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream readInternal
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream@12843fce Reading 5 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream readInternal
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeInputStream): Reading 5 bytes...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream ensureSSLPayload
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeInputStream): No handshake response bytes available. Flushing SSL handshake output stream.
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeOutputStream endMessage
FINEST: TDSChannel (ConnectionID:1) (SSLHandshakeOutputStream): Finishing TDS message
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSWriter endMessage
FINEST: TDSWriter@41629346 (ConnectionID:1) Finishing TDS message
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel logPacket
FINEST: /0:0:0:0:0:0:c0a8:1ba:63328 SPID:0 TDSWriter@41629346 (ConnectionID:1) sending packet (246 bytes)
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel write
FINER: TDSChannel (ConnectionID:1) write failed:Broken pipe
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: *** SQLException:ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c com.microsoft.sqlserver.jdbc.SQLServerException: Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2226)com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2210)com.microsoft.sqlserver.jdbc.TDSChannel.write(IOBuffer.java:1894)com.microsoft.sqlserver.jdbc.TDSWriter.flush(IOBuffer.java:4285)com.microsoft.sqlserver.jdbc.TDSWriter.writePacket(IOBuffer.java:4186)com.microsoft.sqlserver.jdbc.TDSWriter.endMessage(IOBuffer.java:3192)com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeOutputStream.endMessage(IOBuffer.java:824)com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:687)com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:762)com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:754)com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:949)com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:937)sun.security.ssl.InputRecord.readFully(InputRecord.java:465)sun.security.ssl.InputRecord.read(InputRecord.java:503)sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1682)com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1803)com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1454)com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1285)com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1131)java.sql.DriverManager.getConnection(DriverManager.java:664)java.sql.DriverManager.getConnection(DriverManager.java:247)ExampleSQLJDBC.main(ExampleSQLJDBC.java:44)
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: ENTRY
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel disableSSL
FINER: TDSChannel (ConnectionID:1) Disabling SSL...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel disableSSL
FINEST: TDSChannel (ConnectionID:1) Rewiring proxy streams for SSL socket close
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel disableSSL
FINER: TDSChannel (ConnectionID:1) Closing SSL socket
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream writeInternal
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream@13c78c0b Writing 7 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream flush
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyOutputStream@13c78c0b Flushing
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream readInternal
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream@12843fce Reading 5 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream readInternal
FINEST: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream@12843fce Read -1 bytes
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel disableSSL
FINER: TDSChannel (ConnectionID:1) SSL disabled
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing inputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing outputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINER: TDSChannel (ConnectionID:1): Closing TCP socket...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: RETURN
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream ensureSSLPayload
FINER: TDSChannel (ConnectionID:1) (SSLHandshakeInputStream): Ending TDS message threw exception:Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream readInternal
FINER: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream@12843fce Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream readInternal
FINER: com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream@12843fce Reading bytes threw exception:Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel$ProxySocket close
FINER: TDSChannel (ConnectionID:1) (ProxySocket): Ignoring close
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINER: Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
java.io.IOException: Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:692)
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:762)
at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:754)
at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:949)
at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:937)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:973)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387)
at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1682)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1803)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1454)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1285)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1131)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at ExampleSQLJDBC.main(ExampleSQLJDBC.java:44)
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel enableSSL
FINER: java.security path: /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/security
Security providers: [SUN version 1.8, SunRsaSign version 1.8, SunEC version 1.8, SunJSSE version 1.8, SunJCE version 1.8, SunJGSS version 1.8, SunSASL version 1.8, XMLDSig version 1.8, SunPCSC version 1.8, Apple version 1.8]
SSLContext provider info: Sun JSSE provider(PKCS12, SunX509/PKIX key/trust factories, SSLv3/TLSv1/TLSv1.1/TLSv1.2)
SSLContext provider services:
[SunJSSE: KeyFactory.RSA -> sun.security.rsa.RSAKeyFactory
aliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1]
, SunJSSE: KeyPairGenerator.RSA -> sun.security.rsa.RSAKeyPairGenerator
aliases: [1.2.840.113549.1.1, OID.1.2.840.113549.1.1]
, SunJSSE: Signature.MD2withRSA -> sun.security.rsa.RSASignature$MD2withRSA
aliases: [1.2.840.113549.1.1.2, OID.1.2.840.113549.1.1.2]
, SunJSSE: Signature.MD5withRSA -> sun.security.rsa.RSASignature$MD5withRSA
aliases: [1.2.840.113549.1.1.4, OID.1.2.840.113549.1.1.4]
, SunJSSE: Signature.SHA1withRSA -> sun.security.rsa.RSASignature$SHA1withRSA
aliases: [1.2.840.113549.1.1.5, OID.1.2.840.113549.1.1.5, 1.3.14.3.2.29, OID.1.3.14.3.2.29]
, SunJSSE: Signature.MD5andSHA1withRSA -> sun.security.ssl.RSASignature
, SunJSSE: KeyManagerFactory.SunX509 -> sun.security.ssl.KeyManagerFactoryImpl$SunX509
, SunJSSE: KeyManagerFactory.NewSunX509 -> sun.security.ssl.KeyManagerFactoryImpl$X509
aliases: [PKIX]
, SunJSSE: TrustManagerFactory.SunX509 -> sun.security.ssl.TrustManagerFactoryImpl$SimpleFactory
, SunJSSE: TrustManagerFactory.PKIX -> sun.security.ssl.TrustManagerFactoryImpl$PKIXFactory
aliases: [SunPKIX, X509, X.509]
, SunJSSE: SSLContext.TLSv1 -> sun.security.ssl.SSLContextImpl$TLS10Context
aliases: [SSLv3]
, SunJSSE: SSLContext.TLSv1.1 -> sun.security.ssl.SSLContextImpl$TLS11Context
, SunJSSE: SSLContext.TLSv1.2 -> sun.security.ssl.SSLContextImpl$TLS12Context
, SunJSSE: SSLContext.TLS -> sun.security.ssl.SSLContextImpl$TLSContext
aliases: [SSL]
, SunJSSE: SSLContext.Default -> sun.security.ssl.SSLContextImpl$DefaultSSLContext
, SunJSSE: KeyStore.PKCS12 -> sun.security.pkcs12.PKCS12KeyStore
]
java.ext.dirs: /Users/jan/Library/Java/Extensions:/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre/lib/ext:/Library/Java/Extensions:/Network/Library/Java/Extensions:/System/Library/Java/Extensions:/usr/lib/java
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: *** SQLException:ConnectionID:1 ClientConnectionId: 1a3032c8-493d-4f99-8641-d0f02211d82c com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c". The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "Broken pipe ClientConnectionId:1a3032c8-493d-4f99-8641-d0f02211d82c".
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerException logException
FINE: com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:2226)com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1756)com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1803)com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:1454)com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:1285)com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1131)java.sql.DriverManager.getConnection(DriverManager.java:664)java.sql.DriverManager.getConnection(DriverManager.java:247)ExampleSQLJDBC.main(ExampleSQLJDBC.java:44)
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: ENTRY
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing inputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing outputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINER: TDSChannel (ConnectionID:1): Closing TCP socket...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: RETURN
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: ENTRY
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing inputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINEST: TDSChannel (ConnectionID:1): Closing outputStream...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.TDSChannel close
FINER: TDSChannel (ConnectionID:1): Closing TCP socket...
Jun 17, 2016 9:26:43 AM com.microsoft.sqlserver.jdbc.SQLServerConnection:1 close
FINER: RETURN
最佳答案
通过以下步骤解决了问题:
scutil --get HostName
(区分大小写!)sudo scutil --set HostName "newname"
来源:https://youtrack.jetbrains.com/issue/JRE-221#comment=27-1826316
关于java - 如何使用 JDBC 连接到 Azure SQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37743819/
似乎有很多方法可以在 Azure 中自动使用 PowerShell。由于 ARM 模板是最新的,Azure 中的其他 PowerShell 选项是否已过时?这些工具/脚本之间有什么区别: Azure
我正在开发一个将托管在 Azure 中的 Web API。我想使用 Azure 诊断将错误记录到 Azure 表存储中。在经典门户中,我可以将日志配置为转到 Azure 表存储。 Classic Po
Azure 文件存储事件可以触发 Azure WebJob 或 Azure Function 吗? 例如,在文件夹“/todo/”中创建文件时。 最佳答案 我们目前没有任何 Azure 文件绑定(bi
我需要创建一个逻辑应用程序,我的要求是,我需要从 azure data Lake Gen2 文件夹迁移 json 文件,并根据某些值需要将该 json 转换为 xml,然后将其发送到 SQL。 因此,
我使用 VS Code 创建了 1 个 node.js 和 1 个 java Azure Function 当我使用 VS Code 将这两个函数部署到 Azure 时,我最终获得了这么多 Azure
收集 Azure 诊断数据时,暂存槽是否也会将诊断数据发送到 WadPerformanceCounters 表? 如果是这样,我该如何关闭它?或者在阅读诊断信息时如何区分暂存/生产。 我不想显示有关我
您好,我是 Azure 的新手。我有 VS 2012 和 Azure SDK 2.1,当我使用模拟器运行我的 Web 应用程序时一切正常。但是当我在 azure 上部署时出现错误消息: Could n
我很难区分 Azure 订阅和 Azure 租户有何不同?我尝试使用示例来弄清楚,但每次我得出的结论是它们在某种程度上是相同的?如果租户是组织在注册 Microsoft 云服务时接收并拥有的 Azur
如果我想在 Azure Insights 中设置自定义指标集合,并以(近)实时的方式可视化其中一些指标,并查看聚合的历史数据,我应该使用 Azure Metrics Explorer 还是 Azure
我想了解具有以下配置的 Azure 数据工厂 (ADF) 的现实示例/用例: Azure 集成运行时 (AIR) 默认值 自托管集成运行时(SHIR) 其他问题: 这两种配置(AIR 和 SHIR)是
请参阅下面来自 Azure 服务总线的指标。想要识别请求数量中的背景噪音|流量较低时的响应。假设振荡请求| session 中 amqp 握手的响应是潜在的。只是不明白这是什么类型的握手?从总线接收的
此问题与 Azure 事件中心和 Azure 服务总线之间的区别无关。 问题如下: 如果您将Azure Events Hub添加到您的应用程序中,那么您会注意到它依赖于Azure Service Bu
这两个事情是完全不同的,还是它们能完成的事情大致相同/相似? 最佳答案 Azure 辅助角色是“应用程序场”中您自己的一组虚拟机。您可以以分布式方式在它们上运行任何代码。通常,您编写业务代码以在这些服
我目前正在使用 Windows Azure 虚拟机来运行 RStudio, 我的虚拟机是 Windows Server R2 2012,它是 Azure 上的一项附加服务。 我还有一个 Azure 存
我们正在寻找托管一个网站(一些 css、js、一个 html 文件,但不是 aspx、一个通用处理程序)。 我们部署为: 1) Azure 网站 2) Azure 云服务 两种解决方案都有效。但有一个
我想从 Azure 表创建 blob。 AzCopy 支持此功能,但我找不到任何说明数据移动 API 也支持它的文档。此选项可用吗? https://azure.microsoft.com/en-us
This article表示 Azure 订阅所有者有权访问订阅中的所有资源。但是,要访问 Azure 数据库,必须是数据库中的用户,或者是 Azure Admin AD 组的成员。 无论 SQL 安
我尝试使用以下代码将 XML 文件上传到 Azure FTP 服务器: https://www.c-sharpcorner.com/article/upload-and-download-files-
除了 Azure 服务总线使用主题而 Azure 事件中心基于事件 - Azure 事件中心和 Azure 服务总线之间是否有任何根本区别? 对我来说,事件和消息之间没有真正的区别,因为两者只是不同类
我有一个通过虚拟网络网关连接到 Azure 虚拟网络的 Windows VPN 客户端。目标#1 是使用其内部 IP 地址连接到我的虚拟机。这有效。 第二个目标是使用其内部计算机名称进行连接(因为 I
我是一名优秀的程序员,十分优秀!