Skip to content Skip to sidebar Skip to footer

Rebuild Android Code With Error “ssl Error When Connecting To The Jack Server. Try 'jack-diagnose”

System: ubuntu 18.04 environment:VirtualBox The 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

Solution 1:

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

Solution 2:

I just found the answer, see the link below enter link description here

Change the code to this, from /etc/java-8-openjdk/security/java.security remove TLSv1, TLSv1.1.

jdk.tls.disabledAlgorithms=SSLv3, RC4, DES, MD5withRSA, DH keySize < 1024, EC keySize < 224, 3DES_EDE_CBC, anon, NULL, include jdk.disabled.namedCurves

Solution 3:

I just want to give all the different ways to solve the problem. There are few ways to overcome this problem, one may work for someone -

  1. Try to simply restart the jack server by below command at your android root folder

    ./prebuilts/sdk/tools/jack-admin kill-server

    ./prebuilts/sdk/tools/jack-admin start-server

  2. Try to reduce the number of concurrent services in file $HOME/.jack-server/config.properties Code:

    jack.server.max-service=4

Try to make this value 2 or 1.

  1. If jack server is not running or it hangs when try to run. Than try removing TLSv1, TLSv1.1 from rom /etc/java-8-openjdk/security/java.security

Solution 3 Worked for me.

Solution 4:

A way to fix that in your Dockerfile :

USER root

# Fix jack server SSL issue during build
RUN perl -0777 -i -p -e 's/(jdk.tls.disabledAlgorithms=.*?), TLSv1, TLSv1\.1/$1/g' \
     /etc/java-8-openjdk/security/java.security

Post a Comment for "Rebuild Android Code With Error “ssl Error When Connecting To The Jack Server. Try 'jack-diagnose”"