Jack server is not respecting ~/jack-settings

1,302 views
Skip to first unread message

Adam Farden

unread,
May 15, 2016, 9:39:01 PM5/15/16
to Android Building
For whatever reason I can use neither 8076 nor 8077 on my server so I need to run the jack server on different ports.

Without choosing my own ports AOSP Master build fails at around 35% because it cannot connect to the jack server.
When I change ports in ~/.jack-settings to 8176/8177 build fails later, at around 55%, again because it cannot connect to the jack server.

I noticed that when ~/.jack-server/ is first generated the ports written to ~/.jack-server/config.properties are always the default 8076/8077 no matter the content of ~/.jack-settings

This suggests that jack uses the custom ports in ~/.jack-settings on first launch but writes the default ports to ~/.jack-server/config.properties. if (when?) the jack server stops during build, it is then restarted using the ports written in ~/jack-server/config.properties, which do not correspond to the values in ~/.jack-settings (and so on my server it always fails).

I manually changed the ports in ~/.jack-server/config.properties and commented out uninstall-server from prebuilts/sdk/tools/jack_server_setup.mk to prevent ~/.jack-server/ from being regenerated and build now goes to completion.

Hopefully this is more than enough info to fix the bug.

Adam

Adam Farden

unread,
Jun 13, 2016, 10:39:29 AM6/13/16
to Android Building
Unfortunately this is still an issue.

The 'fix' is still to change the ports after a failed build in both ~/.jack-settings and ~/.jack-server/config.properties and comment out the line with uninstall-server in prebuilts/sdk/tools/jack_server_setup.mk

note: never remove ~/.jack-server/ or it will be regenerated with the default ports!

Adam

Hakam ElAssouad

unread,
Jul 6, 2016, 12:34:38 PM7/6/16
to Android Building
for me seems working by delete the .jack file in home, now all jar files and apk is compiled without problems. hope to help.

forever...@gmail.com

unread,
Aug 29, 2016, 9:57:26 AM8/29/16
to Android Building
I noticed that when ~/.jack-server/ is first generated the ports written to ~/.jack-server/config.properties are always the default 8076/8077 no matter the content of ~/.jack-settings
-----------
yes,I  modified  SERVER_PORT_SERVICE and SERVER_PORT_ADMIN  default 8076/8077 in jack-admin,but ~/.jack-server/config.properties are alywas 8076,8077

I find ~/.jack-settings is generate when  isServerRunning function is running ,and  ~/.jack-server/config.properties is generate when waitServerStarted function is running, sServerRunning function and waitServerStarted function in jack-admin script ,I solve use this way,  https://android-review.googlesource.com/#/c/219897/

在 2016年5月16日星期一 UTC+8上午9:39:01,Adam Farden写道:

Adam Farden

unread,
Aug 29, 2016, 9:57:26 AM8/29/16
to Android Building
Aaaand it's still an issue on android-7.0.0_r1 - good work guys and girls!

I still haven't found a fix, other than change the ports after a failed build in both ~/.jack-settings and ~/.jack-server/config.properties and comment out the line with uninstall-server in prebuilts/sdk/tools/jack_server_setup.mk

Adam

Baran Jean-Marie

unread,
Sep 12, 2018, 10:30:53 AM9/12/18
to Android Building
This is still an issue in Android 8.1 and Android 9. The script jack_server_setup.mk is still called (when generating the target dist for example), and unfortunately resets the ports in ~/.jack-server/config.properties. One has to remove the uninstall/install steps in this makefile for keeping the port untouched, or somehow prevent this makefile from being called.

Jean-Marie.

Colin Cross

unread,
Sep 12, 2018, 1:50:45 PM9/12/18
to android-...@googlegroups.com
Jack is no longer used in P, and while jack_server_setup.mk is still present in the pie-dev branch the only reference to it was removed by https://android-review.googlesource.com/c/platform/build/+/496351/5/core/main.mk#b198.

On Wed, Sep 12, 2018 at 7:30 AM Baran Jean-Marie <jeanmar...@gmail.com> wrote:
This is still an issue in Android 8.1 and Android 9. The script jack_server_setup.mk is still called (when generating the target dist for example), and unfortunately resets the ports in ~/.jack-server/config.properties. One has to remove the uninstall/install steps in this makefile for keeping the port untouched, or somehow prevent this makefile from being called.

Jean-Marie.

--
--
You received this message because you are subscribed to the "Android Building" mailing list.
To post to this group, send email to android-...@googlegroups.com
To unsubscribe from this group, send email to
android-buildi...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-building?hl=en

---
You received this message because you are subscribed to the Google Groups "Android Building" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Baran Jean-Marie

unread,
Sep 12, 2018, 6:24:50 PM9/12/18
to Android Building
That's good news, as you might have guessed I didn't actually test it on Pie, I just checked that the script was still there and unchanged.

Thanks for the information!
Reply all
Reply to author
Forward
0 new messages