Open
Issue created May 26, 2021 by
SSL error when connecting to the Jack server. Try ‘jack-diagnose’
external/libcxx/include/set:400:28: note: in instantiation of member function ‘std::__1::__tree<sfntly::Ptrsfntly::Header, sfntly::HeaderComparatorByOffset, std::__1::allocator<sfntly::Ptrsfntly::Header > >::~__tree’ requested here
class _LIBCPP_TEMPLATE_VIS set
^
external/libcxx/include/__tree:968:7: note: from ‘diagnose_if’ attribute on ‘__trigger_diagnostics’:
_LIBCPP_DIAGNOSE_WARNING(!__invokable<_Compare const&, _Tp const&, _Tp const&>::value,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
external/libcxx/include/__config:1058:20: note: expanded from macro ‘_LIBCPP_DIAGNOSE_WARNING’
attribute((diagnose_if(VA_ARGS, «warning»)))
^ ~~~~~~~~~~~
2 warnings generated.
[ 6% 3804/55302] 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/pp/.jack-server»
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx4096M -cp /home/pp/.jack-server/launcher.jar com.android.jack.launcher.ServerLauncher
Jack server failed to (re)start, 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’
[ 6% 3811/55302] //external/skia:libskia clang++ src/gpu/gl/GrGLTestInterface.cpp
ninja: build stopped: subcommand failed.
12:36:17 ninja failed with: exit status 1
failed to build some targets (08:22 (mm:ss))
I met an issue Communication error with Jack server (35)
when built the AOSP yesterday. I can build the AOSP successfully before this issue popped up. I spent hours figuring out why and solved the problem.
Issue
My build environment of the AOSP is
- Ubuntu 16.04 LTS server;
- Android AOSP 8.0;
- OpenJDK 8;
It works well until the below issue occurred yesterday. I remembered that I didn’t do anything unusual before that.
[ 0% 1/20573] 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.31.CANDIDATE.jar 4.31.CANDIDATE || exit 47 )"
Jack server already installed in "/home/david/.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'
ninja: build stopped: subcommand failed.
06:38:55 ninja failed with: exit status 1
build/core/main.mk:21: recipe for target 'run_soong_ui' failed
make: *** [run_soong_ui] Error 1
make: Leaving directory '/home/david/code/androidSrc'
#### make failed to build some targets (21 seconds) ####
Analysis
First, I tried to debug it by following the information in the logs. I ran the jack-diagnose
command and it returned the below message.
error: process ID list syntax error
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
Port 8077 is used by another process (pid=), please ensure to free the port or change port configuration in '/home/david/.jack-settings' and '/home/david/.jack-server/config.properties'
error: process ID list syntax error
Usage:
ps [options]
Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.
For more details see ps(1).
Port 8076 is used by another process (pid=), please ensure to free the port or change port configuration in '/home/david/.jack-settings' and '/home/david/.jack-server/config.properties
The log indicated the port has been used by another process, so I changed the port to another one by modifying the port number in the ~/.jack-settings
and ~/.jack-server/config.properties
.
However, it didn’t work. The issue was still existing.
Then I tried to restart the jack server by commands:
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
The issue was still there!
There are some articles on the internet talking about this error, they pointed that the issue was caused by the multiple users doing the build process simultaneously, which is not supported by jack and will bring the issue. The solution is to change the port number to another one to keep jack working. But I don’t think it is my case. And the result confirmed my idea.
OK! I kept investigating to get more information.
I checked the log in the file — ~/.jack-server/log/xxxx-0-0.log
. It has nothing about the error.
I ran command ./prebuilts/sdk/tools/jack-admin dump-report
and this time I got some useful information in the error report.
gnutls_handshake() failed: The TLS connection was non-properly terminated.
Looks like it is related to the TLS connection, so I ran more commands to check.
curl https://127.0.0.1:8076/jack
curl: (35) gnutls_handshake() failed: The TLS connection was non-properly terminated.
It verified that the issue is because of the TLS connection failure.
Fixing
Follow this clue, I searched Google to check if anyone has met the same issue with me. I finally found the post in stackoverflow that discussed this issue and provided the solution.
The reason for this issue is that I upgraded my OpenJDK to 8u292, but OpenJDK disabled the support for TLS 1.0 and 1.1, starting in 8u291
. They think TLS 1.0/1.1 are old, insecure, and deprecated. Unfortunately, I was using TLS1.1 on my build system, therefore, the connection was broken for this reason.
I have two ways to solve this problem.
- I can turn on the support of TLS1.0/1.1 manually by removing the
TLSv1, TLSv1.1
declaring injdk.tls.disabledAlgorithms
configuration in file/etc/java-8-openjdk/security/java.security
. - Switch to use TLS1.2 for the build system.
Solution 1 is relatively quick so I tried this way.
I enabled the support to TLS1.0/1.1, restart the jack server, and ran the build again.
Jack server already installed in "/home/david/.jack-server"
Server is already running
[100% 696/696] Install: out/target/product/bullhead/vendor/app/SensorTestTool/SensorTestTool.apk
make: Leaving directory '/home/david/code/androidSrc'
#### make completed successfully (03:51 (mm:ss)) ####
It worked this time!
If you’re in trouble with this issue like me, hope my experience and study can help you a little bit!
Veteran
Joined: 13 May 2005
Posts: 1009
Location: Hong Kong
|
||||||||
|
||||||||
I’m trying to compile android on gentoo, it progresses and then fails on jack server. The error seems to be because of curl/openssl The error is
Any idea anyone? |
Advocate
Joined: 24 Oct 2003
Posts: 2981
Location: Bay Area, CA
|
||
|
||
Strange! I am also running into SSL issues between curl and the jack-server but my connection is not even established to port 8077. I get:
So far, no resolution. |
Advocate
Joined: 24 Oct 2003
Posts: 2981
Location: Bay Area, CA
|
|
|
|
Oh wait…I actually get the same error. I looked at the error code using curl -v and it showed exactly what you got.
Did you by any chance find a fix? |
n00b
Joined: 01 Aug 2014
Posts: 9
|
|
|
|
I’m in the same situation: after 18 month successfully building android — yesterday jack started to fail with the above error. I’m using icedtea:8 with default use flags. Out of desperation I installed icedtea-bin:8 and communication with jack-server worked again.
Will check now building icedtea:8 without pch and sunec. Will report later, wanted to share this «hotfix» first. |
Advocate
Joined: 24 Oct 2003
Posts: 2981
Location: Bay Area, CA
n00b
Joined: 01 Aug 2014
Posts: 9
|
|
|
|
I checked icedtea:8 with different USE flags to no avail. Sadly I’m low on time, and can’t do the same for openssl. This should also be checked. I havn’t checked building with libressl instead of open ssl. If anything fails to get the source build icedtea working, someone should create an bug report.
I’m not lazy — just busy (building and maintaining this oneplis3t rom: https://forum.xda-developers.com/oneplus-3t/development/rom-lineageos-14-1-t3547024 ). On a side note: using icedtea-bin:8 fixes also the broken ssl connections with android-sdk-update-manager. I’m afraid the source build icedtea:8 is breaking ssl in java all together. |
Tux’s lil’ helper
Joined: 10 Feb 2006
Posts: 104
Location: Ukraine, Odessa
|
||
|
||
|
n00b
Joined: 01 Aug 2014
Posts: 9
|
||
|
||
I was on gnutls-3.3.20 when the ssl error occured first. |
Tux’s lil’ helper
Joined: 10 Feb 2006
Posts: 104
Location: Ukraine, Odessa
Tux’s lil’ helper
Joined: 10 Feb 2006
Posts: 104
Location: Ukraine, Odessa
|
||||||
|
||||||
Answer to myself in case someone has similar issue, solution is to set
|
Watchman
Joined: 20 Dec 2005
Posts: 6111
Location: Vienna, Austria; Germany; hello world
|
||||||||
|
||||||||
How is this stupid error still happening (can’t build Android beyond gnutls 3.5.11)
gotta test this — thanks Hardcore Gentoo Linux user since 2004 |
Display posts from previous:
Kim Schulz
unread,
Dec 4, 2015, 9:45:02 PM12/4/15
to Android Building
I am trying to build AOSP master, but the new JACK-server is giving me a hard time.
During build I hit this:
[ 0% 4/21058] /bin/bash -c «(true) && (out/host/linux-x86/bin/jack-admin install-server out/host/linux-x86/framework/jack-launcher.jar out/host/linux-x86/framework/jack-server.jar 2>&1 || (exit 0)) && (JACK_SERVER_VM_ARGUMENTS=»-Dfile.encoding=UTF-8 -XX:+TieredCompilation» out/host/linux-x86/bin/jack-admin start-server 2>&1 || exit 0) && (out/host/linux-x86/bin/jack-admin update server out/host/linux-x86/framework/jack-server.jar 4.1.ALPHA 2>&1 || exit 0) && (out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack—1.1.PRE_ALPHA.jar -1.1.PRE_ALPHA || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack—1.2.PRE_ALPHA.jar -1.2.PRE_ALPHA || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.24.RELEASE.jar 2.24.RELEASE || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.7.ALPHA.jar 3.7.ALPHA || exit 47) && (mkdir -p out/host/linux-x86/obj/EXECUTABLES/jack_intermediates/) && (out/host/linux-x86/bin/acp -fp prebuilts/sdk/tools/jack out/host/linux-x86/obj/EXECUTABLES/jack_intermediates/jack)»
FAILED: /bin/bash -c «(true) && (out/host/linux-x86/bin/jack-admin install-server out/host/linux-x86/framework/jack-launcher.jar out/host/linux-x86/framework/jack-server.jar 2>&1 || (exit 0)) && (JACK_SERVER_VM_ARGUMENTS=»-Dfile.encoding=UTF-8 -XX:+TieredCompilation» out/host/linux-x86/bin/jack-admin start-server 2>&1 || exit 0) && (out/host/linux-x86/bin/jack-admin update server out/host/linux-x86/framework/jack-server.jar 4.1.ALPHA 2>&1 || exit 0) && (out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack—1.1.PRE_ALPHA.jar -1.1.PRE_ALPHA || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack—1.2.PRE_ALPHA.jar -1.2.PRE_ALPHA || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack-2.24.RELEASE.jar 2.24.RELEASE || exit 47; out/host/linux-x86/bin/jack-admin update jack prebuilts/sdk/tools/jacks/jack-3.7.ALPHA.jar 3.7.ALPHA || exit 47) && (mkdir -p out/host/linux-x86/obj/EXECUTABLES/jack_intermediates/) && (out/host/linux-x86/bin/acp -fp prebuilts/sdk/tools/jack out/host/linux-x86/obj/EXECUTABLES/jack_intermediates/jack)»
Jack server already installed in «/home/kschulz/.jack-server»
Communication error with Jack server (58), try other ports or see Jack server log
Failed to contact Jack server: Problem reading /home/kschulz/.jack-server/client.pem
Failed to contact Jack server: Problem reading /home/kschulz/.jack-server/client.pem
I have searched to try to find a solution for this but no one else seem to have discussed this problem yet.
I have tested on Ubuntu 13, 14 and 15 without luck (all of which worked fine before moving to Jack).
anyone that has an idea as to how I get by this problem ?
thanks
quake73
unread,
Dec 16, 2015, 6:36:46 PM12/16/15
to Android Building
Kill your existing jack servers and delete your .jack-server folder (it will be rebuilt automatically). Afterwards, I expect you to have other problems.
I tried a lot of tricks, in the end I think this worked for me:
sudo aptitude install libcurl4-openssl-dev nss-updatedb
I’m not sure which of the 2 packages was necessary but the build now runs.
My theory is, the building with jack uses the ‘curl’ program which for some reason cannot connect through ssl to the jack server because of some certificate incompatibility, NSS/OpenSSL, something like that.
Kim Schulz
unread,
Dec 18, 2015, 6:57:03 PM12/18/15
to Android Building
Did have a other problems afterwards but not SSL related anymore. Now it runs out of resources (heap) and I need to start it with _JAVA_OPTIONS=»-Xmx6G» jack-admin start-server in order to get it to compile all of android.
I can get it compiled now but not exactly stable build. Jack server still wants to restart itself (or simply dies) and cannot connect afterwards. At some point it times out and I can restart the build and it will continue from where it died.
kim
quake73
unread,
Dec 18, 2015, 8:06:27 PM12/18/15
to Android Building
yes, i’m getting those too, found the Xmx option in build/core/config.mk, did the same as you, tried different larger values (added the Xms option, too) but still getting all sorts of errors. Sometines it explicitly complains about SSL, sometimes the build process gets stuck (with the java process taking 80-90% cpu). Also, jack server doesnt start if you only delete the ‘.jack-server’ folder (found out that you must also clear the ‘out’ folder in that case, otherwise the folder doesnt get rebuilt). Frustrating.
Blaze Ristov
unread,
Dec 24, 2015, 1:48:06 PM12/24/15
to android-…@googlegroups.com
I think I finally found a neat and elegant solution — just turn off the damn jack server in build/core/configure_local_jack.mk by changing the line:
LOCAL_JACK_ENABLED := $(strip $(LOCAL_JACK_ENABLED))
into:
LOCAL_JACK_ENABLED := #$(strip $(LOCAL_JACK_ENABLED))
and my build of 6.0.1_r3 succeeded
de…@codeplay.com
unread,
Feb 17, 2016, 6:13:38 PM2/17/16
to Android Building
unfortunately, the hack above might cause a different error when building a more recent aosp:
UNEXPECTED TOP-LEVEL EXCEPTION:
java.lang.RuntimeException: Exception parsing classes
at com.android.dx.command.dexer.Main.processClass(Main.java:752)
at com.android.dx.command.dexer.Main.processFileBytes(Main.java:718)
at com.android.dx.command.dexer.Main.access$1200(Main.java:85)
at com.android.dx.command.dexer.Main$FileBytesConsumer.processFileBytes(Main.java:1645)
at com.android.dx.cf.direct.ClassPathOpener.processArchive(ClassPathOpener.java:284)
at com.android.dx.cf.direct.ClassPathOpener.processOne(ClassPathOpener.java:166)
at com.android.dx.cf.direct.ClassPathOpener.process(ClassPathOpener.java:144)
at com.android.dx.command.dexer.Main.processOne(Main.java:672)
at com.android.dx.command.dexer.Main.processAllFiles(Main.java:574)
at com.android.dx.command.dexer.Main.runMonoDex(Main.java:311)
at com.android.dx.command.dexer.Main.run(Main.java:277)
at com.android.dx.command.dexer.Main.main(Main.java:245)
at com.android.dx.command.Main.main(Main.java:106)
Caused by: com.android.dx.cf.iface.ParseException: unsupported class file version 52.0
at com.android.dx.cf.direct.DirectClassFile.parse0(DirectClassFile.java:485)
at com.android.dx.cf.direct.DirectClassFile.parse(DirectClassFile.java:406)
at com.android.dx.cf.direct.DirectClassFile.parseToInterfacesIfNecessary(DirectClassFile.java:388)
at com.android.dx.cf.direct.DirectClassFile.getMagic(DirectClassFile.java:251)
at com.android.dx.command.dexer.Main.parseClass(Main.java:764)
at com.android.dx.command.dexer.Main.access$1500(Main.java:85)
at com.android.dx.command.dexer.Main$ClassParserTask.call(Main.java:1684)
at com.android.dx.command.dexer.Main.processClass(Main.java:750)
… 12 more
While when deleting the folder ~/.jack-server the current build system does not seem able to recreate the certificates client.pem and server.pem. I’ve solved by building an old version of the aosp (Dec’15) which correctly creates the certificates, and then rebuilding with the current version of the aosp..
tamil
unread,
Jun 2, 2016, 10:06:19 PM6/2/16
to Android Building
Hi,
When i tried to build the latest AOSP on ubuntu 14.04. i am getting this following error
[ 31% 14186/45738] Ensure Jack server is installed and started
Jack server already installed in «/root/.jack-server»
Server is already running
[ 31% 14206/45738] Building with Jack: out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex
FAILED: /bin/bash out/target/common/obj/JAVA_LIBRARIES/core-all_intermediates/with-local/classes.dex.rsp
Picked up _JAVA_OPTIONS: -Xmx4096m
Picked up _JAVA_OPTIONS: -Xmx4096m
Communication error with Jack server (28). Try ‘jack-diagnose’
ninja: build stopped: subcommand failed.
make: *** [ninja_wrapper] Error 1
Please help…
Валерий Тихомиров
unread,
Aug 25, 2016, 4:51:49 PM8/25/16
to Android Building
Hi, try this:
# Use 7GB RAM for Jack Server -1GB from 8GB
export JACK_SERVER_VM_ARGUMENTS="-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx7000m"
# Killing...
out/host/linux-x86/bin/jack-admin kill-server
# Starting...
out/host/linux-x86/bin/jack-admin start-server
Avtar Singh
unread,
Aug 26, 2016, 6:21:29 PM8/26/16
to android-…@googlegroups.com
Kim,
It is most likey to do with the memory. Try bumping RAM as mentioned by mexanicteam below. I do remember running into this problem, and I recall bumping up the RAM but I also recall reducing the number of simultaneous threads in jack-server. I can’t recall the exact fix. However, what I had done was go through the readme-docs provided in the jack-server folder and play around with the settings they had mentioned.
— Avtar
forever…@gmail.com
unread,
Aug 29, 2016, 4:57:26 PM8/29/16
to Android Building
Neo Yang
unread,
Sep 19, 2016, 5:11:11 PM9/19/16
to Android Building
Hi Валерий Тихомиров,
It works for me.
Many thanks.
在 2016年8月25日星期四 UTC+8下午9:51:49,Валерий Тихомиров写道:
Weave Bytes
unread,
May 1, 2017, 4:22:51 AM5/1/17
to Android Building
To Kim & Avtar,
We can do 2 things.
1. edit $HOME/.jack-server/config.properties
and set jack.server.max-service=1
2. export ANDROID_JACK_VM_ARGS=»-Dfile.encoding=UTF-8 -XX:+TieredCompilation -Xmx2G»
./prebuilts/sdk/tools/jack-admin kill-server
./prebuilts/sdk/tools/jack-admin start-server
I hope this helps.
Thanks,
N. Singh
To unsubscribe from this group, send email to
Changshu Li
unread,
Jun 1, 2017, 5:01:27 PM6/1/17
to Android Building
This method works. Thank you.
Maxsim
unread,
Mar 21, 2018, 5:04:32 PM3/21/18
to Android Building
Hello, Could somebody help me with next problem:
console log:
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
[ 0% 250/83955] 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=»-Xmx2g -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/m_timenko/.jack-server»
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Xmx2g -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/m_timenko/.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’
[ 0% 253/83955] target C++: libv8src_32 <= external/v8/src/map-updater.cc
ninja: build stopped: subcommand failed.
15:10:34 ninja failed with: exit status 1
#### failed to build some targets (05:21 (mm:ss)) ####
log from file:
15:05:30.422: INFO: com.android.jack.server.JackHttpServer: Loading config of jack server version: 1.3-a11 ‘1.3’ (402300 704631c4e9bbfb4e8b052365140f79974b9f4cf4 by android-…@google.com)
15:05:30.456: INFO: com.android.jack.server.JackHttpServer: Starting service connection server on /127.0.0.1:8076
15:05:30.460: INFO: com.android.jack.server.JackHttpServer: Starting admin connection on /127.0.0.1:8077
15:05:30.471: SEVERE: com.android.jack.launcher.ServerLauncher: Server 1 Exception
com.android.jack.server.api.v01.ServerException: Failed to setup ssl context
at com.android.jack.server.JackHttpServer.setupSsl(JackHttpServer.java:1424)
at com.android.jack.server.JackHttpServer.start(JackHttpServer.java:801)
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:745)
Caused by: java.io.IOException: Invalid keystore format
at sun.security.provider.JavaKeyStore.engineLoad(JavaKeyStore.java:650)
at sun.security.provider.JavaKeyStore$JKS.engineLoad(JavaKeyStore.java:55)
at java.security.KeyStore.load(KeyStore.java:1445)
at com.android.jack.server.JackHttpServer.setupSsl(JackHttpServer.java:1403)
… 4 more
Donato Azevedo
unread,
Apr 16, 2018, 8:03:06 PM4/16/18
to Android Building
On Wednesday, March 21, 2018 at 11:04:32 AM UTC-3, Maxsim wrote:
Hello, Could somebody help me with next problem:
console log:
ninja: no work to do.
ninja: no work to do.
No need to regenerate ninja file
[ 0% 250/83955] 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=»-Xmx2g -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/m_timenko/.jack-server»
Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 -Djava.io.tmpdir=/tmp -Xmx2g -Dfile.encoding=UTF-8 -XX:+TieredCompilation -cp /home/m_timenko/.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’
[ 0% 253/83955] target C++: libv8src_32 <= external/v8/src/map-updater.cc
ninja: build stopped: subcommand failed.
15:10:34 ninja failed with: exit status 1
I’m having a similar issue. It seems jack is not *really* meant for multi-user builds — and that is my case (I have a build server that multiple people use to build a shared lib that uses ndk). You need to check if the user you are running your build as is m_timenko. Any other user will not be able to access the jack-server installed under /home/m_timenko/.jack-server unless you properly configure it. I don’t know how to configure it for multiple users, but there is a hint here: https://source.android.com/setup/build/jack that says:
Jack limitations
- By default, the Jack server is mono-user and can be used by only one user on a computer. To support additional users, select different port numbers for each user and adjust
SERVER_NB_COMPILE
accordingly. You can also disable the Jack server by settingSERVER=false
in$HOME/.jack
.
If anyone has an example of how to do this, I would certainly appreciate the help.
I am trying to build an android image, the build system by default uses jack server which keeps on failing again and again.
Can any body tell me how can i fix it.
I get the following error during build
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 )» Writing client settings in /home/test/.jack-settings
Installing jack server in «/home/test/.jack-server»Warning: The JKS keystore uses a proprietary format. It is recommended
to migrate to PKCS12 which is an industry standard format using
«keytool -importkeystore -srckeystore
/home/test/.jack-server/server.jks -destkeystore
/home/test/.jack-server/server.jks -deststoretype pkcs12».Warning: The JKS keystore uses a proprietary format. It is recommended
to migrate to PKCS12 which is an industry standard format using
«keytool -importkeystore -srckeystore
/home/test/.jack-server/client.jks -destkeystore
/home/test/.jack-server/client.jks -deststoretype pkcs12».
Communication error with Jack server (58), try ‘jack-diagnose’ or see
Jack server log Failed to contact Jack server: Problem reading
/home/test/.jack-server/client.pem. Try ‘jack-diagnose’ Failed to
contact Jack server: Problem reading
/home/test/.jack-server/client.pem. Try ‘jack-diagnose’
Jack server diagnose also dosen’t give any usefull information
./prebuilts/sdk/tools/jack-diagnose error: process ID list syntax
errorUsage: ps [options]
Try ‘ps —help <simple|list|output|threads|misc|all>’ or ‘ps —help
<s|l|o|t|m|a>’ for additional help text.For more details see ps(1). Port 8077 is used by another process
(pid=), please ensure to free the port or change port configuration in
‘/home/test/.jack-settings’ and
‘/home/test/.jack-server/config.properties’ error: process ID list
syntax errorUsage: ps [options]
Try ‘ps —help <simple|list|output|threads|misc|all>’ or ‘ps —help
<s|l|o|t|m|a>’ for additional help text.For more details see ps(1). Port 8076 is used by another process
(pid=), please ensure to free the port or change port configuration in
‘/home/test/.jack-settings’ and
‘/home/test/.jack-server/config.properties’
and jack program throws an error for open SSL connect.
SSL error when connecting to the Jack server, retrying with debug
- Trying 127.0.0.1…
- TCP_NODELAY set
- Connected to localhost (127.0.0.1) port 8076 (#0)
- ALPN, offering h2
- ALPN, offering http/1.1
- successfully set certificate verify locations:
- CAfile: /home/test/.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:8076
- Closing connection 0
Can anybody please help me out in resolving this. I am struggling to get a clean build.