1

我正在尝试在服务器上为 Moto Z (griffin) 构建 LineageOS,但构建崩溃并烧毁了 5 分钟。

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 -Xmx16G\" 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/dablord/.jack-server"
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx16G -cp /home/dablord/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, try 'jack-diagnose' or see Jack server log
No Jack server running. Try 'jack-admin start-server'
No Jack server running. Try 'jack-admin start-server'
[  3% 911/25667] //art/compiler:libart-compiler clang++ optimizing/instruction_builder.cc [linux x86]
ninja: build stopped: subcommand failed.
07:02:53 ninja failed with: exit status 1

服务器设置为供个人使用。它具有 24GB RAM 和 300GB 可用存储空间。我还设置了一个 20GB 的交换文件,以防 Jack 服务器不知何故需要更多。

Jack 日志文件报告以下内容:

07:29:02.699: INFO: com.android.jack.server.JackHttpServer: Loading config of jack server version: 1.3-a11 '1.3' (402300 704631c4e9bbfb4e8b052365140f79974b9f4cf4 by android-jack-team@google.com)                                            
07:29:02.747: INFO: com.android.jack.server.JackHttpServer: Starting service connection server on /127.0.0.1:8076
07:29:02.754: SEVERE: com.android.jack.launcher.ServerLauncher: Server 1 Exception
com.android.jack.server.api.v01.ServerException: Problem while opening service port
        at com.android.jack.server.JackHttpServer.start(JackHttpServer.java:785)
        at com.android.jack.server.JackServerImpl.run(JackServerImpl.java:67)
        at com.android.jack.launcher.ServerLauncher$3.run(ServerLauncher.java:392)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.BindException: Address already in use
        at sun.nio.ch.Net.bind0(Native Method)
        at sun.nio.ch.Net.bind(Net.java:433)
        at sun.nio.ch.Net.bind(Net.java:425)
        at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223)
        at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
        at com.android.jack.server.ServerParameters.openSocket(ServerParameters.java:88)
        at com.android.jack.server.ServerParameters.getServiceSocket(ServerParameters.java:67)
        at com.android.jack.server.JackHttpServer.start(JackHttpServer.java:779)
        ... 3 more

我试图更改插孔配置文件中的端口号,重新安装插孔,重新同步 repo,但均无济于事。

4

2 回答 2

1

我也遇到了这个问题,这似乎是 TLS 的问题,猜测旧版本试图使用过时的 TLS 版本,以及内存问题。

TLS

我在构建 android 映像时遵循了错误,使用 jack server 失败

  1. 编辑 /etc/java-8-openjdk/security/ 下的 java.security 文件
  2. 从 jdk.tls.disabledAlgorithms 中删除 TLSv1、TLSv1.1
  3. 重启千斤顶服务器:
    jack-admin kill-server
    jack-admin start-server

记忆

注意:在运行以下步骤之前,构建首先失败是必要的。

我在这里遵循了建议:https ://groups.google.com/g/android-building/c/8SQ0-4zZDo8 ,具体来说,我需要运行

export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx7000m"

我修改了 ~/.jack-server/config.properties

jack.server.max-service=1

成功

之后我能够构建 LineageOS

于 2021-12-22T00:43:50.680 回答
0

绕过问题的快速而肮脏的修复是完全按照 Yan 的回答禁用千斤顶。但是,我将问题留待解决,因为它实际上并不能解决问题。

于 2018-06-28T10:08:40.773 回答