本文介绍了重建 android 代码时出现错误“连接到 Jack 服务器时出现 SSL 错误.尝试“插孔诊断"的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

系统:ubuntu 18.04环境:VirtualBox第一次在Ubuntu 18.04上编译AOSP源码,通过了,第二次编译失败.这是一条错误消息.

[ 10% 538/4980] 确保安装并启动 Jack 服务器失败:设置插孔服务器/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 2>&;1 || (exit 0) ) &&(JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) &&(prebuilts/sdk/tools/jack-admin 更新服务器 prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) &&(prebuilts/sdk/tools/jack-admin 更新 jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47)"Jack 服务器已安装在/home/user/.jack-server"中;与 Jack 服务器的通信错误 (35),请尝试jack-diagnose"或查看 Jack 服务器日志连接到 Jack 服务器时出现 SSL 错误.尝试插孔诊断"连接到 Jack 服务器时出现 SSL 错误.尝试插孔诊断"[ 10% 541/4980] build out/target/product/rk3399_mid/obj/ETC/precompiled_sepolicy_intermediates/precompiled_sepolicy忍者:构建停止:子命令失败.22:32:18 忍者失败:退出状态 1#### 无法构建某些目标 (01:11 (mm:ss)) ####构建android失败!

生成错误报告

/prebuilts/sdk/tools/report/18577$ 解压 jack-report.18557.zip存档:jack-report.18557.zip充气:report.18557.txt
充气:launcher.jar
膨胀:config.properties
创建:日志/膨胀:logs/outputs.txt
膨胀:日志/jack-server-0-2.log
膨胀:日志/jack-server-1-0.log
膨胀:日志/jack-server-0-0.log
提取:logs/jack-server-0-0.log.lck
膨胀:日志/jack-server-0-1.log
膨胀:server-1.jar
创造:杰克/

report.18557.txt :

 ps -o "pid args" |grep com.android.jack.launcher.ServerLauncher |grep -v grep |awk '{打印转储报告}' |xargs 杀死 -3$ id -u1000$ ps -A -o "uid pid args" |grep com.android.jack.launcher.ServerLauncher |grep -v grep1000 6708 java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp/home/zhangying/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher$ lsof -i TCP:8376 -l命令 PID 用户 FD 类型 设备大小/关闭节点名称java 6708 1000 21u IPv6 58493 0t0 TCP 本地主机:8376(听)$ lsof -i TCP:8377 -l命令 PID 用户 FD 类型 设备大小/关闭节点名称java 6708 1000 23u IPv6 58499 0t0 TCP 本地主机:8377(听)$ cat "$JACK_CLIENT_SETTING"# 服务器设置SERVER_HOST=本地主机SERVER_PORT_SERVICE=8376SERVER_PORT_ADMIN=8377#内部,请勿触摸SETTING_VERSION=4$ cd "$JACK_HOME";ls -l -R -n ..:总计 10412-rw------- 1 1000 1000 2097 5 月 2 日 10:04 client.jks-rw------- 1 1000 1000 2814 5 月 2 日 21:48 client.pem-rw------- 1 1000 1000 356 5 月 2 日 10:12 config.propertiesdrwxr-xr-x 2 1000 1000 4096 5 月 2 日 10:04 插孔-rw------- 1 1000 1000 5102506 5 月 2 日 10:04 launcher.jardrwx------ 2 1000 1000 4096 5 月 2 日 21:48 日志-rw------- 1 1000 1000 982 5 月 2 日 22:39 report.18557.txt-rw------- 1 1000 1000 5522186 5 月 2 日 10:04 server-1.jar-rw------- 1 1000 1000 2066 5 月 2 日 10:04 server.jks-rw------- 1 1000 1000 1042 5 月 2 日 21:48 server.pem./杰克:共 0./日志:共 32 个-rw-r--r-- 1 1000 1000 689 5 月 2 日 22:03 jack-server-0-0.log-rw-r--r-- 1 1000 1000 0 May 2 10:20 jack-server-0-0.log.lck-rw-r--r-- 1 1000 1000 585 5 月 2 日 10:23 jack-server-0-1.log-rw-r--r-- 1 1000 1000 689 5 月 2 日 10:19 jack-server-0-2.log-rw-r--r-- 1 1000 1000 585 5 月 2 日 10:16 jack-server-1-0.log-rw------- 1 1000 1000 13411 5 月 2 日 22:39 输出.txt$ curl --versioncurl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3发布日期:2018-01-24协议: dict 文件 ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp特性: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL$ JACK_EXTRA_CURL_OPTIONS=-v jack-admin 列表服务器* 正在尝试 127.0.0.1...* TCP_NODELAY 设置* 连接到本地主机 (127.0.0.1) 端口 8377 (#0)* ALPN,提供 h2* ALPN,提供http/1.1* 成功设置证书验证位置:* CA文件:/home/zhangying/.jack-server/server.pemCApath:/etc/ssl/certs} [5 字节数据]* TLSv1.3 (OUT), TLS 握手, 客户端问候 (1):} [512 字节数据]* OpenSSL SSL_connect: SSL_ERROR_SYSCALL 连接到 localhost:8377* 关闭连接 0连接到 Jack 服务器时出现 SSL 错误.尝试插孔诊断"$ jack-admin server-stat从后台服务器获取统计信息连接到 Jack 服务器时出现 SSL 错误.尝试插孔诊断"$ base64 --versionbase64 (GNU coreutils) 8.28版权所有 (C) 2017 Free Software Foundation, Inc.许可证 GPLv3+:GNU GPL 版本 3 或更高版本 .这是免费软件:您可以自由更改和重新分发它.在法律允许的范围内,不提供任何保证.由西蒙约瑟夫森撰写.$ (echo amFjaw==;echo LXNlcnZlcg==) |base64 --decode

当我切换到 Ubuntu 16.04 时出现同样的错误.以下是已安装的 Ubuntu 18.04 Curl 版本列表.

警告:apt 没有稳定的 CLI 界面.在脚本中谨慎使用.

curl/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [已安装]libcurl3-gnutls/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [已安装,自动]libcurl4/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [已安装,自动]libcurl4-openssl-dev/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [已安装]

我尝试了很多方法,都无法解决.请帮助我,谢谢.

解决方案

应用以下两步后,AOSP搭建成功.

  1. 从/etc/java-8-openjdk/security/java.security 文件中的 jdk.tls.disabledAlgorithms 中删除 TLSv1、TLSv1.1
  2. 重启jack服务器:cd/prebuilts/sdk/tools/./jack-admin kill-server./jack-admin 启动服务器

System: ubuntu 18.04environment:VirtualBoxThe first time I compiled the AOSP source code on Ubuntu 18.04, it passed, and the second time I compiled it failed.Here is an error message.

[ 10% 538/4980] Ensuring Jack server is installed and started
FAILED: setup-jack-server
/bin/bash -c "(prebuilts/sdk/tools/jack-admin install-server prebuilts/sdk/tools/jack-launcher.jar prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar  2>&1 || (exit 0) ) && (JACK_SERVER_VM_ARGUMENTS=\"-Dfile.encoding=UTF-8 -XX:+TieredCompilation\" prebuilts/sdk/tools/jack-admin start-server 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update server prebuilts/sdk/tools/jack-server-4.11.ALPHA.jar 4.11.ALPHA 2>&1 || exit 0 ) && (prebuilts/sdk/tools/jack-admin update jack prebuilts/sdk/tools/jacks/jack-4.32.CANDIDATE.jar 4.32.CANDIDATE || exit 47 )"
Jack server already installed in "/home/user/.jack-server"
Communication error with Jack server (35), try 'jack-diagnose' or see Jack server log
SSL error when connecting to the Jack server. Try 'jack-diagnose'
SSL error when connecting to the Jack server. Try 'jack-diagnose'
[ 10% 541/4980] build out/target/product/rk3399_mid/obj/ETC/precompiled_sepolicy_intermediates/precompiled_sepolicy
ninja: build stopped: subcommand failed.
22:32:18 ninja failed with: exit status 1

#### failed to build some targets (01:11 (mm:ss)) ####

Build android failed!

Generate error reports

report.18557.txt :

 ps -o "pid args" | grep com.android.jack.launcher.ServerLauncher | grep -v grep | awk '{print dump-report}' |  xargs kill -3

$ id -u
1000

$ ps -A -o "uid pid args" | grep com.android.jack.launcher.ServerLauncher | grep -v grep
 1000  6708 java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/zhangying/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher

$ lsof -i TCP:8376 -l
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    6708     1000   21u  IPv6  58493      0t0  TCP localhost:8376 (LISTEN)

$ lsof -i TCP:8377 -l
COMMAND  PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
java    6708     1000   23u  IPv6  58499      0t0  TCP localhost:8377 (LISTEN)

$ cat "$JACK_CLIENT_SETTING"
# Server settings
SERVER_HOST=localhost
SERVER_PORT_SERVICE=8376
SERVER_PORT_ADMIN=8377

# Internal, do not touch
SETTING_VERSION=4

$ cd "$JACK_HOME"; ls -l -R -n .
.:
total 10412
-rw------- 1 1000 1000    2097 May  2 10:04 client.jks
-rw------- 1 1000 1000    2814 May  2 21:48 client.pem
-rw------- 1 1000 1000     356 May  2 10:12 config.properties
drwxr-xr-x 2 1000 1000    4096 May  2 10:04 jack
-rw------- 1 1000 1000 5102506 May  2 10:04 launcher.jar
drwx------ 2 1000 1000    4096 May  2 21:48 logs
-rw------- 1 1000 1000     982 May  2 22:39 report.18557.txt
-rw------- 1 1000 1000 5522186 May  2 10:04 server-1.jar
-rw------- 1 1000 1000    2066 May  2 10:04 server.jks
-rw------- 1 1000 1000    1042 May  2 21:48 server.pem

./jack:
total 0

./logs:
total 32
-rw-r--r-- 1 1000 1000   689 May  2 22:03 jack-server-0-0.log
-rw-r--r-- 1 1000 1000     0 May  2 10:20 jack-server-0-0.log.lck
-rw-r--r-- 1 1000 1000   585 May  2 10:23 jack-server-0-1.log
-rw-r--r-- 1 1000 1000   689 May  2 10:19 jack-server-0-2.log
-rw-r--r-- 1 1000 1000   585 May  2 10:16 jack-server-1-0.log
-rw------- 1 1000 1000 13411 May  2 22:39 outputs.txt

$ curl --version
curl 7.58.0 (x86_64-pc-linux-gnu) libcurl/7.58.0 OpenSSL/1.1.1 zlib/1.2.11 libidn2/2.0.4 libpsl/0.19.1 (+libidn2/2.0.4) nghttp2/1.30.0 librtmp/2.3
Release-Date: 2018-01-24
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL

$ JACK_EXTRA_CURL_OPTIONS=-v jack-admin list server
*   Trying 127.0.0.1...
* TCP_NODELAY set
* Connected to localhost (127.0.0.1) port 8377 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* successfully set certificate verify locations:
*   CAfile: /home/zhangying/.jack-server/server.pem
  CApath: /etc/ssl/certs
} [5 bytes data]
* TLSv1.3 (OUT), TLS handshake, Client hello (1):
} [512 bytes data]
* OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to localhost:8377
* Closing connection 0
SSL error when connecting to the Jack server. Try 'jack-diagnose'

$ jack-admin server-stat
Getting statistic from background server
SSL error when connecting to the Jack server. Try 'jack-diagnose'

$ base64 --version
base64 (GNU coreutils) 8.28
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Simon Josefsson.

$ (echo amFjaw==;echo LXNlcnZlcg==) | base64 --decode

I get the same error when I switch to Ubuntu 16.04.Below is a list of the installed Curl versions of Ubuntu 18.04.

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

curl/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [installed]libcurl3-gnutls/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [installed,automatic]libcurl4/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [installed,automatic]libcurl4-openssl-dev/bionic-updates,bionic-security,now 7.58.0-2ubuntu3.13 amd64 [installed]

I have tried many ways, but I can't solve it. Please help me,thanks.

解决方案

After the two steps below were applied, the AOSP was successfully built.

  1. Remove TLSv1, TLSv1.1 from jdk.tls.disabledAlgorithms in /etc/java-8-openjdk/security/java.security file
  2. Restart the jack server:cd /prebuilts/sdk/tools/./jack-admin kill-server./jack-admin start-server

这篇关于重建 android 代码时出现错误“连接到 Jack 服务器时出现 SSL 错误.尝试“插孔诊断"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-01 19:01