1. jack-server报错

一、服务器上的jack编译报错,修改ok,已验证

Communication error with Jack server (60), try 'jack-diagnose' or see Jack server log
Failed to authenticate Jack server certificate. Try 'jack-diagnose'
Failed to authenticate Jack server certificate. Try 'jack-diagnose

 

1). $HOME/.jack-settings:


# Server settings
SERVER_HOST=127.0.0.1
SERVER_PORT_SERVICE=8076               // 自己写一个,最好大一些的
SERVER_PORT_ADMIN=8077                   // 自己写一个,最好大一些的

# Internal, do not touch
SETTING_VERSION=4
 

2). $HOME/.jack-server/config.properties:


#Fri Jan 19 10:21:41 CST 2018
jack.server.max-jars-size=104857600
jack.server.max-service=4
jack.server.service.port=8076                           //  和上面settings的值一样
jack.server.max-service.by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296
jack.server.admin.port=8077                            // 和上面settings的值一样
jack.server.config.version=2
jack.server.time-out=7200

 

二、jack_server编译报错:(本机ubuntu14.04编译,只有自己一个账户,同时只在编译一套代码,和在服务器上可能多个用户同时在编译可能存在差异)

Communication error with Jack server (60), try 'jack-diagnose' or see Jack server log

 

1. 有可能是jack-server 进程已经有了,导致多任务的提示,需要kill jack-server,和删除home目录下的.jack*

1). 进入源码相应目录 prebuilts/sdk/tools,(kill jack-server 进程不完全)(可跳过此步骤)

./jack-admin kill-server 
./jack-admin uninstall-server

2). 第一步执行完后如果没效果,就有可能是jack-server进程没有自己退出,需要手动kill

ps ax | grep jack     // 查看jack-server 进程

kill 9 XXXX                // kill jack-server进程

rm -rf ~/.jack*          // 删除home目录下的jack文件

3). 可以开始编译。(同样在home目录下会自动生成.jack-server 和.jack-settings,不用管)

参考:http://blog.csdn.net/yongyu_it/article/details/54573969

 

以下是作为服务器存在多用户同时编译的情况,(未验证)

2.可能问题是jack不支持多用户编译,需要修改jack_server 的端口:

 解决方案:(未确定)

同时修改$HOME/.jack-settings和$HOME/.jack-server/config.properties中的端口号(比如都改为8086/8087),方可支持多用户同时编译

1). $HOME/.jack-settings:


# Server settings
SERVER_HOST=127.0.0.1
SERVER_PORT_SERVICE=8076               // 8086
SERVER_PORT_ADMIN=8077                   // 8087

# Internal, do not touch
SETTING_VERSION=4
 

2). $HOME/.jack-server/config.properties:


#Fri Jan 19 10:21:41 CST 2018
jack.server.max-jars-size=104857600
jack.server.max-service=4
jack.server.service.port=8076                           //  8086
jack.server.max-service.by-mem=1\=2147483648\:2\=3221225472\:3\=4294967296
jack.server.admin.port=8077                            // 8087
jack.server.config.version=2
jack.server.time-out=7200

 

3). 把文件$HOME/.jack-server/config.properties的权限由rwx改为rw即可解决问题。

 

3.编译的主机内存较小的原因,解决是调小编译需要的内存

diff --git a/prebuilts/sdk/tools/jack-admin b/prebuilts/sdk/tools/jack-admin
index ee193fc..a3e84ea 100755
--- a/prebuilts/sdk/tools/jack-admin
+++ b/prebuilts/sdk/tools/jack-admin
@@ -26,7 +26,7 @@ umask 077
 JACK_HOME="${JACK_HOME:=$HOME/.jack-server}"参考:http://blog.csdn.net/yongyu_it/article/details/54573969
 CLIENT_SETTING="${CLIENT_SETTING:=$HOME/.jack-settings}"
 TMPDIR=${TMPDIR:=/tmp}
-JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 
-XX:+TieredCompilation}"
+JACK_SERVER_VM_ARGUMENTS="${JACK_SERVER_VM_ARGUMENTS:=-Dfile.encoding=UTF-8 
-XX:+TieredCompilation -Xmx4096m}"
 JACK_EXTRA_CURL_OPTIONS=${JACK_EXTRA_CURL_OPTIONS:=}

 LAUNCHER_JAR="$JACK_HOME/launcher.jar"参考:http://blog.csdn.net/yongyu_it/article/details/54573969
@@ -451,7 +451,8 @@ case $COMMAND in
     if [ "$RUNNING" = 0 ]; then
       echo "Server is already running"jack-server-4.11.ALPHA.jar
     else
-      JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 
-Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR 
$LAUNCHER_NAME"
+      #JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 
-Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -cp $LAUNCHER_JAR 
$LAUNCHER_NAME"
+         JACK_SERVER_COMMAND="java -XX:MaxJavaStackTraceDepth=-1 
-Djava.io.tmpdir=$TMPDIR $JACK_SERVER_VM_ARGUMENTS -Xmx4096m -cp 
$LAUNCHER_JAR $LAUNCHER_NAME"
       echo "Launching Jack server" $JACK_SERVER_COMMAND


    

4.缺少.jack-server文件时(未确定)

到 prebuilts/sdk/tools 目录下执行一下命令生成 .jack-server:./jack-admin install-server jack-launcher.jar  jack-server-4.8.ALPHA.jar
jack-launcher.jar, jack-server-4.8.ALPHA.jar这两个文件的名字视你 prebuilts/sdk/tools 目录下的文件名而定,

参考:http://blog.csdn.net/lizekun2010/article/details/525355913

上一篇:JavaScript高级知识


下一篇:2020一些重要的事