I am no expert here, but I know from experience that there are a few things 
to check with the makefile prebuilts/sdk/tools/jack_server_setup.mk which 
is most likely invoking the Jack directives causing your error:

   - Sometimes it will uninstall/reinstall your Jack server, and by doing 
   that will rewrite your configuration in ~/.jack-server like reverting 
   the ports to the default ones. This does not seem to happen in your case
   - The permissions of the file ~/.jack-server/config.properties must be 
   600 otherwise Jack will refuse to start a server
   - It's sometimes a good idea to set the permissions of .jack-settings 
   and .jack-server to someting not writable so that Jack cannot modify 
   those settings

For the record, here is my tree view:

[-rw-------] ~/.jack-settings
[drwx------] ~/.jack-server/
├── [-rw-------]  client.jks
├── [-rw-------]  client.pem
├── [-rw-------]  config.properties
├── [drwxrwxr-x]  jack
│   ├── [-rw-------]  jack-1539266436827-0.jar
│   ├── [-rw-------]  jack-1539338076697-0.jar
│   ├── [-rw-------]  jack-1539338078074-0.jar
│   └── [-rw-------]  jack-1539338079307-0.jar
├── [-rw-------]  launcher.jar
├── [drwx------]  logs
│   ├── [-rw-rw-r--]  jack-server-0-0.log
│   ├── [-rw-rw-r--]  jack-server-0-1.log
│   ├── [-rw-rw-r--]  jack-server-0-2.log
│   ├── [-rw-rw-r--]  jack-server-0-3.log
│   ├── [-rw-rw-r--]  jack-server-0-4.log
│   └── [-rw-------]  outputs.txt
├── [-rw-------]  server-1.jar
├── [-rw-------]  server.jks
└── [-rw-------]  server.pem

Le vendredi 9 novembre 2018 01:05:29 UTC+1, Robert Buckley a écrit :
>
> I am able to build successfully when I build directly on my host machine, 
> but if I start up a docker container and then manually build it from within 
> there I get errors with jack server permissions.
>
> Here is the error from the console:
> [ 12% 5112/42202] 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/guest/.jack-server"
> Launching Jack server java -XX:MaxJavaStackTraceDepth=-1 
> -Djava.io.tmpdir=/tmp -Dfile.encoding=UTF-8 -XX:+TieredCompilation 
> -Xmx4096M -cp /home/guest/.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'
> [ 12% 5121/42202] //external/sqlite/dist:libsqlite clang sqlite3.c [linux 
> x86]
> ninja: build stopped: subcommand failed.
> 19:42:29 ninja failed with: exit status 1
>
>
> And the logs from ~/.jack-server/logs:
> cat ~/.jack-server/logs/jack-server-0-0.log 
> 19:37:21.958: SEVERE: com.android.jack.launcher.ServerLauncher: Server 1 
> Exception
> com.android.jack.server.api.v01.ServerException: '.' has the following 
> invalid permissions ---r-xr-x
>         at 
> com.android.jack.server.JackServerImpl.run(JackServerImpl.java:71)
>         at 
> com.android.jack.launcher.ServerLauncher$3.run(ServerLauncher.java:392)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: java.io.IOException: '.' has the following invalid permissions 
> ---r-xr-x
>         at 
> com.android.jack.server.PosixFileAccess.checkAccessibleOnlyByOwner(PosixFileAccess.java:62)
>         at 
> com.android.jack.server.JackHttpServer.getCurrentUser(JackHttpServer.java:1232)
>         at 
> com.android.jack.server.JackHttpServer.<init>(JackHttpServer.java:525)
>         at 
> com.android.jack.server.JackServerImpl.run(JackServerImpl.java:66)
>         ... 2 more
>
> I can't tell what permissions jack-server wants.
>
> I've created a docker image from ubuntu 16.04.
>
> I downloaded the repos on my host machine, so I create a user for the 
> docker image that matches my host system ids.
>
> Thanks for the help in advance!
>

-- 
-- 
You received this message because you are subscribed to the "Android Building" 
mailing list.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to