Skip to content

startService报错javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake #1

@KevinChan168

Description

@KevinChan168

环境:win10,装好itunes,能正确识别到iphoneX,ios 14.4.2
运行main.java报错

2021-11-24 16:42:49 [main] [protocol.UsbMux.deviceConnect(UsbMux.java:85)] - [INFO] Connecting Device :14 port:62078
2021-11-24 16:42:49 [main] [protocol.UsbMux.deviceConnect(UsbMux.java:85)] - [INFO] Connecting Device :14 port:62078
2021-11-24 16:42:49 [main] [protocol.LockDown.validatePairing(LockDown.java:191)] - [ERROR] ssl Handshake error
2021-11-24 16:42:49 [main] [protocol.LockDown.pairFull(LockDown.java:103)] - [INFO] DevicePublicKey pair full
2021-11-24 16:42:50 [main] [protocol.UsbMux.deviceConnect(UsbMux.java:85)] - [INFO] Connecting Device :14 port:62078
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at java.io.OutputStream.write(OutputStream.java:75)
at protocol.PlistSocket.sendAll(PlistSocket.java:146)
at protocol.PlistSocket.sendPacket(PlistSocket.java:109)
at protocol.PlistSocket.sendRecvPacket(PlistSocket.java:140)
at protocol.LockDown.startService(LockDown.java:58)
at servers.SyslogService.(SyslogService.java:15)
at Main.main(Main.java:8)
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
... 10 more
javax.net.ssl.SSLException: Connection has been shutdown: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.checkEOF(SSLSocketImpl.java:1533)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:95)
at protocol.PlistSocket.recvAll(PlistSocket.java:155)
at protocol.PlistSocket.recvPacket(PlistSocket.java:126)
at protocol.PlistSocket.sendRecvPacket(PlistSocket.java:141)
at protocol.LockDown.startService(LockDown.java:58)
at servers.SyslogService.(SyslogService.java:15)
at Main.main(Main.java:8)
Caused by: javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:994)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1367)
at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:750)
at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:123)
at java.io.OutputStream.write(OutputStream.java:75)
at protocol.PlistSocket.sendAll(PlistSocket.java:146)
at protocol.PlistSocket.sendPacket(PlistSocket.java:109)
at protocol.PlistSocket.sendRecvPacket(PlistSocket.java:140)
... 3 more
Caused by: java.io.EOFException: SSL peer shut down incorrectly
at sun.security.ssl.InputRecord.read(InputRecord.java:505)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:975)
... 10 more
Exception in thread "main" exception.lockdown.StartServiceError: Unable to start service={name!r} - not paired
at protocol.LockDown.startService(LockDown.java:60)
at servers.SyslogService.(SyslogService.java:15)
at Main.main(Main.java:8)

Process finished with exit code 1

debug看了下,是NSDictionary resp = svc.sendRecvPacket(root);这里的resp为null,辛苦大佬看看

public PlistSocket startService(String name) throws Exception {
    if (!paired){
        paired=Pair();
    }
    NSData escrow_bag = (NSData) record.get("EscrowBag");
    NSDictionary root = new NSDictionary();
    root.put("Request","StartService");
    root.put("Service",name);
    root.put("EscrowBag",escrow_bag);
    NSDictionary resp = svc.sendRecvPacket(root);
    if (resp==null){
        throw new StartServiceError("Unable to start service={name!r} - not paired");
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions