Предупреждение об отправке исключения: java.net.SocketException: сломанный канал (ошибка записи) - PullRequest
0 голосов
/ 31 октября 2019
I am getting the Exception sending alert: java.net.SocketException: Broken pipe (Write failed) when connect to server with SSL certificate

Вот полные журналы запроса

Это мой trustStore: /Library/Java/JavaVirtualMachines/jdk1.8.0_121.jdk/Contents/Home/jre/lib/security/ jssecacerts Тип TrustStore: JKS: поставщик TrustStore: init склад доверенных сертификатов, добавляющий в качестве доверенного сертификата: Тема: CN = m3_external_ca_test Эмитент: CN = m3_external_ca_test Алгоритм: RSA;Серийный номер: 0x1 Действителен со вторника, 12 июня 01:57:02 IST 2018 до пятницы, 09 июня 01:57:02 IST 2028

adding as trusted cert:
  Subject: EMAILADDRESS=rchhabra@xpwallet.com, CN=test.xpwallet.com, OU=ARED, O=ARED, L=RW, ST=RW, C=RW
  Issuer:  CN=m3_external_ca_test
  Algorithm: RSA; Serial number: 0x426c2ceed0d6ab8c
  Valid from Fri Oct 11 15:24:26 IST 2019 until Sun Oct 10 15:24:26 IST 2021

keyStore is : /Users/apple/GS/M-SHIRIKI_Integration_API/MTN/New-Certificates/Our-Generated/ARED-PKCS-12-KEY.p12
keyStore type is : jks
keyStore provider is : 
init keystore
init keymanager of type SunX509
***
found key for : ared-pkcs-12-key
chain [0] = [
[
  Version: V3
  Subject: EMAILADDRESS=rchhabra@xpwallet.com, CN=test.xpwallet.com, OU=ARED, O=ARED, L=RW, ST=RW, C=RW
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 27273248009009669557067417143230464401480143099225141101499383070161637063251869985404681201643337172517583237239369037732738747309059498767033446270729097243487830412175760082507675901502576168908290704473165445414672162620970033617509360198619750519766003593538678231357195123668056169479586968439577820134862309713286484162829856125404086985883917303361865264376408300888813809258226013130332906547405684814442072117352917831649525393146231406719241889773181668133335583269216068598371351396523190249178705748248531704685058731608188280323941023969738762093466409757001153340875132482893791586202885343167467789503
  public exponent: 65537
  Validity: [From: Fri Oct 11 15:24:26 IST 2019,
               To: Sun Oct 10 15:24:26 IST 2021]
  Issuer: CN=m3_external_ca_test
  SerialNumber: [    426c2cee d0d6ab8c]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

[2]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:false
  PathLen: undefined
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: B1 B0 E1 13 55 BF DD BA   51 1A 6B 47 AB 7D 9A 35  ....U...Q.kG...5
0010: 25 D0 8F 34                                        %..4
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:
]
***
trigger seeding of SecureRandom
done seeding SecureRandom
Allow unsafe renegotiation: false
Allow legacy hello messages: true
Is initial handshake: true
Is secure renegotiation: false
main, setSoTimeout(0) called
%% No cached client session
*** ClientHello, TLSv1.2
RandomCookie:  GMT: 1555673718 bytes = { 220, 148, 49, 207, 180, 92, 158, 192, 48, 219, 220, 253, 242, 241, 149, 254, 81, 59, 140, 70, 121, 2, 1, 157, 120, 109, 145, 103 }
Session ID:  {}
Cipher Suites: []
Compression Methods:  { 0 }
Extension elliptic_curves, curve names: {secp256r1, secp384r1, secp521r1, sect283k1, sect283r1, sect409k1, sect409r1, sect571k1, sect571r1, secp256k1}
Extension ec_point_formats, formats: [uncompressed]
Extension signature_algorithms, signature_algorithms: SHA512withECDSA, SHA512withRSA, SHA384withECDSA, SHA384withRSA, SHA256withECDSA, SHA256withRSA, SHA256withDSA, SHA224withECDSA, SHA224withRSA, SHA224withDSA, SHA1withECDSA, SHA1withRSA, SHA1withDSA
Extension server_name, server_name: [type=host_name (0), value=ecw-test.mtn.co.ug]
***
[write] MD5 and SHA1 hashes:  len = 236

main, READ: TLSv1.2 Handshake, length = 87
*** ServerHello, TLSv1.2
RandomCookie:  GMT: -1017038811 bytes = { 160, 137, 248, 21, 150, 63, 47, 239, 191, 35, 85, 149, 117, 196, 104, 135, 159, 134, 130, 153, 56, 34, 21, 16, 35, 63, 171, 1 }
Session ID:  {12, 251, 30, 229, 0, 94, 51, 232, 52, 2, 83, 139, 169, 231, 26, 176, 126, 163, 186, 141, 230, 255, 24, 129, 2, 211, 236, 224, 248, 247, 234, 65}
Cipher Suite: TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
Compression Method: 0
Extension renegotiation_info, renegotiated_connection: <empty>
Extension ec_point_formats, formats: [uncompressed]
***
%% Initialized:  [Session-1, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
** TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384
[read] MD5 and SHA1 hashes:  len = 87
0
main, READ: TLSv1.2 Handshake, length = 2355
*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject: CN=ecw-test.mtn.co.ug, C=UG
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 
  public exponent: 65537
  Validity: [From: Tue Jun 12 13:21:39 IST 2018,
               To: Thu Jun 11 13:21:39 IST 2020]
  Issuer: CN=m3_external_ca_test
  SerialNumber: [   -2afddf7d 2f077bc9]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

[2]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:false
  PathLen: undefined
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 07 DE 5D 71 F6 5C F7 0C   36 49 0F 0D 42 B7 32 DE  ..]q.\..6I..B.2.
0010: 98 6C 74 BF                                        .lt.
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:


]
chain [1] = [
[
  Version: V3
  Subject: CN=m3_external_ca_test
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 4096 bits
  modulus: 557151729257513438839644150388994050633257463150916756666288129639829273703829321229726135597409651267923163753540191812166215491681418750095800124039177047610921338095584777847693211532173924379229429356988539203692954447396372998918466327209925104754132112452040117309037337899793627958986425102119033235946821927766586736238366399909058576730416643277317107012215518939823367870794050831329502931200465236622573918783105404625612091949806908192432139109240293637102989990682880462249168023520927635743443446087921283697496893345488202662761882381308627361840750432546788878561709613460624082025467787953553336217008221683384807014080736684293664958483129172471210065490491426284163056269241358166314722428304811418521683643082368229159063698592514583819017847444753883136339509772465286214624964332968123898190861074330815047931167787772472284663941700641329596402280513951974416355486973105161800167081754916542965323709213497146993492567648900054926942904129100128883337830188142220064431633066248767423041608386155063786967752130358976047264442038254969571760619157207175872513536937111013216384389085422556190661912889530860668679008606571201626257041618168321149461375656917730604989009634813014849328401907226383781886872547
  public exponent: 65537
  Validity: [From: Tue Jun 12 01:57:02 IST 2018,
               To: Fri Jun 09 01:57:02 IST 2028]
  Issuer: CN=m3_external_ca_test
  SerialNumber: [    01]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

[2]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:2147483647
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:

]
***
Found trusted certificate:
[
[
  Version: V3
  Subject: CN=m3_external_ca_test
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 4096 bits
  modulus: 557151729257513438839644150388994050633257463150916756666288129639829273703829321229726135597409651267923163753540191812166215491681418750095800124039177047610921338095584777847693211532173924379229429356988539203692954447396372998918466327209925104754132112452040117309037337899793627958986425102119033235946821927766586736238366399909058576730416643277317107012215518939823367870794050831329502931200465236622573918783105404625612091949806908192432139109240293637102989990682880462249168023520927635743443446087921283697496893345488202662761882381308627361840750432546788878561709613460624082025467787953553336217008221683384807014080736684293664958483129172471210065490491426284163056269241358166314722428304811418521683643082368229159063698592514583819017847444753883136339509772465286214624964332968123898190861074330815047931167787772472284663941700641329596402280513951974416355486973105161800167081754916542965323709213497146993492567648900054926942904129100128883337830188142220064431633066248767423041608386155063786967752130358976047264442038254969571760619157207175872513536937111013216384389085422556190661912889530860668679008606571201626257041618168321149461375656917730604989009634813014849328401907226383781886872547
  public exponent: 65537
  Validity: [From: Tue Jun 12 01:57:02 IST 2018,
               To: Fri Jun 09 01:57:02 IST 2028]
  Issuer: CN=m3_external_ca_test
  SerialNumber: [    01]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

[2]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:true
  PathLen:2147483647
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:


]
[read] MD5 and SHA1 hashes:  len = 2355

*** ECDH ServerKeyExchange
Signature Algorithm SHA256withRSA
Server key: Sun EC public key, 256 bits
  public x coord: 66326600642616899875375743924963095610501171076106910517010081458797943112835
  public y coord: 6544686264476724670609679865983500858023071721018113473455827946875264823355
  parameters: secp256r1 [NIST P-256, X9.62 prime256v1] (1.2.840.10045.3.1.7)
[read] MD5 and SHA1 hashes:  len = 333

main, READ: TLSv1.2 Handshake, length = 70
*** CertificateRequest
Cert Types: RSA, DSS, ECDSA
Supported Signature Algorithms: SHA256withRSA, SHA256withDSA, SHA256withECDSA, SHA384withRSA, Unknown (hash:0x5, signature:0x2), SHA384withECDSA, SHA512withRSA, Unknown (hash:0x6, signature:0x2), SHA512withECDSA, SHA1withRSA, SHA1withDSA, SHA1withECDSA
Cert Authorities:
<CN=m3_external_ca_test>
[read] MD5 and SHA1 hashes:  len = 70
0000: 0D 00 00 42 03 01 02 40   00 18 04 01 04 02 04 03  ...B...@........
0010: 05 01 05 02 05 03 06 01   06 02 06 03 02 01 02 02  ................
0020: 02 03 00 22 00 20 30 1E   31 1C 30 1A 06 03 55 04  ...". 0.1.0...U.
0030: 03 0C 13 6D 33 5F 65 78   74 65 72 6E 61 6C 5F 63  ...m3_external_c
0040: 61 5F 74 65 73 74                                  a_test
[Raw read]: length = 5
0000: 16 03 03 00 04                                     .....
[Raw read]: length = 4
0000: 0E 00 00 00                                        ....
main, READ: TLSv1.2 Handshake, length = 4
*** ServerHelloDone
[read] MD5 and SHA1 hashes:  len = 4
0000: 0E 00 00 00                                        ....
matching alias: ared-pkcs-12-key
*** Certificate chain
chain [0] = [
[
  Version: V3
  Subject: EMAILADDRESS=rchhabra@xpwallet.com, CN=test.xpwallet.com, OU=ARED, O=ARED, L=RW, ST=RW, C=RW
  Signature Algorithm: SHA256withRSA, OID = 1.2.840.113549.1.1.11

  Key:  Sun RSA public key, 2048 bits
  modulus: 27273248009009669557067417143230464401480143099225141101499383070161637063251869985404681201643337172517583237239369037732738747309059498767033446270729097243487830412175760082507675901502576168908290704473165445414672162620970033617509360198619750519766003593538678231357195123668056169479586968439577820134862309713286484162829856125404086985883917303361865264376408300888813809258226013130332906547405684814442072117352917831649525393146231406719241889773181668133335583269216068598371351396523190249178705748248531704685058731608188280323941023969738762093466409757001153340875132482893791586202885343167467789503
  public exponent: 65537
  Validity: [From: Fri Oct 11 15:24:26 IST 2019,
               To: Sun Oct 10 15:24:26 IST 2021]
  Issuer: CN=m3_external_ca_test
  SerialNumber: [    426c2cee d0d6ab8c]

Certificate Extensions: 3
[1]: ObjectId: 2.5.29.35 Criticality=false
AuthorityKeyIdentifier [
KeyIdentifier [
0000: 5F 7F 19 08 87 CD CC DD   56 B8 E4 C5 F4 6D B3 8E  _.......V....m..
0010: 18 E6 E3 83                                        ....
]
]

[2]: ObjectId: 2.5.29.19 Criticality=false
BasicConstraints:[
  CA:false
  PathLen: undefined
]

[3]: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: B1 B0 E1 13 55 BF DD BA   51 1A 6B 47 AB 7D 9A 35  ....U...Q.kG...5
0010: 25 D0 8F 34                                        %..4
]
]

]
  Algorithm: [SHA256withRSA]
  Signature:

]
***
*** ECDHClientKeyExchange
ECDH Public value:  { 4, 21, 191, 119, 202, 79, 124, 52, 157, 34, 92, 122, 30, 151, 84, 134, 22, 227, 170, 50, 111, 251, 199, 167, 162, 41, 144, 40, 57, 154, 48, 213, 164, 182, 161, 58, 39, 240, 59, 11, 163, 235, 96, 104, 52, 82, 185, 205, 53, 219, 241, 108, 148, 1, 137, 34, 209, 67, 219, 9, 239, 109, 52, 150, 195 }
[write] MD5 and SHA1 hashes:  len = 1225

main, WRITE: TLSv1.2 Change Cipher Spec, length = 1
[Raw write]: length = 6
0000: 14 03 03 00 01 01                                  ......
*** Finished
verify_data:  { 60, 110, 161, 195, 231, 137, 150, 90, 143, 162, 144, 204 }
***
[write] MD5 and SHA1 hashes:  len = 16
0000: 14 00 00 0C 3C 6E A1 C3   E7 89 96 5A 8F A2 90 CC  ....<n.....Z....
Padded plaintext before ENCRYPTION:  len = 16
0000: 14 00 00 0C 3C 6E A1 C3   E7 89 96 5A 8F A2 90 CC  ....<n.....Z....
main, WRITE: TLSv1.2 Handshake, length = 40
[Raw write]: length = 45
0000: 16 03 03 00 28 00 00 00   00 00 00 00 00 7B 17 AC  ....(...........
0010: F3 33 0B 00 9F 28 99 C9   1D 69 00 18 09 89 FD B4  .3...(...i......
0020: 49 79 D1 04 3D 43 E0 D5   FB 4E 10 82 B1           Iy..=C...N...
main, handling exception: java.net.SocketException: Connection reset
%% Invalidated:  [Session-1, TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384]
main, SEND TLSv1.2 ALERT:  fatal, description = unexpected_message
Padded plaintext before ENCRYPTION:  len = 2
0000: 02 0A                                              ..
main, WRITE: TLSv1.2 Alert, length = 26
main, Exception sending alert: java.net.SocketException: Broken pipe (Write failed)
main, called closeSocket()
main, called close()
main, called closeInternal(true)
java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:210)
    at java.net.SocketInputStream.read(SocketInputStream.java:141)
    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 sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559)
    at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316)
    at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250)
    at com.common.Utils.sendPostRequest(Utils.java:80)
    at com.common.Utils.execute(Utils.java:47)
    at com.common.Utils.main(Utils.java:116)
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...