Search code examples
androidandroid-sourceandroid-buildandroid-jack-and-jill

Android jack internal unknown error 415


I'm building AOSP 8 in a Mac (macOS Sierra 10.12.6) and Jack is failing with an unknown internal error

Internal unknown error (415), try 'jack-diagnose' or see Jack server log

jack-diagnose shows this:

ps: illegal argument: -o
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-g grp[,grp...]] [-u [uid,uid...]]
          [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
       ps [-L]
Port 8073 is used by another process (pid=), please ensure to free the port or change port configuration in '/Users/user/.jack-settings' and '/Users/user/.jack-server/config.properties'
ps: illegal argument: -o
usage: ps [-AaCcEefhjlMmrSTvwXx] [-O fmt | -o fmt] [-G gid[,gid...]]
          [-g grp[,grp...]] [-u [uid,uid...]]
          [-p pid[,pid...]] [-t tty[,tty...]] [-U user[,user...]]
       ps [-L]
Port 8072 is used by another process (pid=), please ensure to free the port or change port configuration in '/Users/user/.jack-settings' and '/Users/user/.jack-server/config.properties'

I looked at the ports and nothing seems out of the ordinary

$ lsof -n -i:8073 | grep LISTEN
java    70963 user   13u  IPv6 0xd32bb4a6a5b6116b      0t0  TCP 127.0.0.1:8073 (LISTEN)

$ lsof -n -i:8072 | grep LISTEN
java    70963 user   11u  IPv6 0xd32bb4a6a5b616ab      0t0  TCP 127.0.0.1:8072 (LISTEN)

The Jack logs show this:

16:14:44.181: WARNING: com.android.jack.server.router.ErrorContainer: Unknown request: 'POST /jack HTTP/1.1
Host: localhost:8072
User-Agent: curl/7.56.0
Accept: application/vnd.jack.command-out;version=1;charset=UTF-8
Content-Length: 800
Content-Type: multipart/form-data; boundary=------------------------9507228002c18ced

'

I tried manually stopping and starting the jack server and even changing the ports, but nothing seems to fix the problem. I though this could be related to my CURL version, but I believe I'm using the correct one

curl 7.56.0 (x86_64-apple-darwin16.7.0) libcurl/7.56.0 OpenSSL/1.0.2l zlib/1.2.11
Release-Date: 2017-10-04
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP UnixSockets HTTPS-proxy 

I ran out of ideas and I really don't know who what's causing this problem. I believe Google is deprecating Jack (https://android-developers.googleblog.com/2017/03/future-of-java-8-language-feature.html) but I wonder why Jack is still enabled in AOSP by default. Setting ANDROID_COMPILE_WITH_JACK to false allows me to continue building, but that is just hiding the problem by not using Jack. Does anyone knows what's wrong? Does this look like a set up problem or something is in fact broken with Jack? I posted this question in the android-build mailing list but haven't heard anything so I'm hoping someone in the SO community might have an answer.


Solution

  • Same problem in Arch Linux. Build completed by downgrading curl from 7.56 to 7.55.1.