Yohann Roussel | 1b45741 | 2015-10-22 10:57:00 +0200 | [diff] [blame^] | 1 | ########### |
| 2 | Jack server |
| 3 | ########### |
| 4 | |
| 5 | The Jack server's goal is to handle a pool of Jack compiler instances in order to limit memory usage |
| 6 | and benefit from already warm instances. |
| 7 | |
| 8 | |
| 9 | |
| 10 | Starting the server |
| 11 | ------------------- |
| 12 | |
| 13 | You may need to start the Jack server manually. |
| 14 | Use "jack-admin start-server". |
| 15 | |
| 16 | |
| 17 | |
| 18 | Client info |
| 19 | ----------- |
| 20 | |
| 21 | The client is a bash script simply named "jack". |
| 22 | It can be configured in $HOME/.jack-settings |
| 23 | |
| 24 | |
| 25 | |
| 26 | ".jack-settings" file |
| 27 | --------------------- |
| 28 | |
| 29 | This file contains script shell variables: |
| 30 | "SERVER_HOST": IP address of the server |
| 31 | by default: "SERVER_HOST=127.0.0.1". |
| 32 | |
| 33 | "SERVER_PORT_SERVICE": Server service TCP port number. Needs to match the service port number |
| 34 | defined in $HOME/.jack-server/config.properties on the server host (See "Server info" below) |
| 35 | by default: "SERVER_PORT_SERVICE=8076". |
| 36 | |
| 37 | "SERVER_PORT_ADMIN": Server admin TCP port number. Needs to match the admin port number defined in |
| 38 | $HOME/.jack-server/config.properties on the server host (See "Server info" below) |
| 39 | by default: "SERVER_PORT_ADMIN=8077". |
| 40 | |
| 41 | "SETTING_VERSION": Internal, do not modify. |
| 42 | |
| 43 | |
| 44 | |
| 45 | Server info |
| 46 | ----------- |
| 47 | |
| 48 | The server is composed of 2 jars named "jack-server.jar" and "jack-launcher.jar". |
| 49 | |
| 50 | Check "Admin" section to know how to install and administrate the Jack server. |
| 51 | |
| 52 | The server can also be configured in "$HOME/.jack-server/config.properties". |
| 53 | |
| 54 | |
| 55 | |
| 56 | "config.properties" file |
| 57 | ------------------------ |
| 58 | |
| 59 | It contains Jack server configuration properties. |
| 60 | Description with default values follows: |
| 61 | |
| 62 | jack.server.max-service=<number> |
| 63 | Maximum number of simultaneous Jack tasks. Default is 4. |
| 64 | |
| 65 | jack.server.max-jars-size=<size-in-bytes> |
| 66 | Maximum size for Jars, in bytes. "-1" means no limit. Default is 100 MiB. |
| 67 | |
| 68 | jack.server.time-out=<time-in-seconds> |
| 69 | Time out delay before Jack gets to sleep. When Jack sleeps, its memory usage is reduced, but it is |
| 70 | slower to wake up. "-1" means "do not sleep". Default is 2 weeks. |
| 71 | |
| 72 | jack.server.service.port=<port-number> |
| 73 | Server service TCP port number. Default is 8076. Needs to match the service port defined in |
| 74 | $HOME/.jack-settings on the client host (See Client section). |
| 75 | |
| 76 | jack.server.admin.port=<port-number> |
| 77 | Server admin TCP port number. Default is 8077. Needs to match the service port defined in |
| 78 | $HOME/.jack-settings on the client host (See Client section). |
| 79 | |
| 80 | jack.server.config.version=<version> |
| 81 | Internal, do not modify. |
| 82 | |
| 83 | |
| 84 | |
| 85 | Server logs |
| 86 | ----------- |
| 87 | |
| 88 | Server logs can be found by running "jack-admin server-log". Default location is |
| 89 | "$HOME/.jack-server/logs/". |
| 90 | |
| 91 | |
| 92 | |
| 93 | Admin |
| 94 | ----- |
| 95 | |
| 96 | The "jack-admin" bash script allows to install and administrate the Jack server. |
| 97 | Here are some commands: |
| 98 | |
| 99 | $ jack-admin help |
| 100 | Print help. |
| 101 | |
| 102 | $ jack-admin install-server jack-launcher.jar jack-server.jar |
| 103 | Install the Jack server. |
| 104 | |
| 105 | $ jack-admin uninstall-server |
| 106 | Uninstall the Jack server and all components. |
| 107 | |
| 108 | $ jack-admin list jack |
| 109 | List installed versions for Jack. |
| 110 | |
| 111 | $ jack-admin update jack jack.jar |
| 112 | Install or update a Jack jar. |
| 113 | |
| 114 | $ jack-admin start-server |
| 115 | Start the server. |
| 116 | |
| 117 | $ jack-admin stop-server |
| 118 | Stop the server after the last compilation is complete. |
| 119 | |
| 120 | $ jack-admin kill-server |
| 121 | Kill the server process immediately, interrupting abruptly ongoing compilations. |
| 122 | |
| 123 | $ jack-admin list-server |
| 124 | List Jack server processes. |
| 125 | |
| 126 | $ jack-admin server-stat |
| 127 | Print various info about the server and the host. |
| 128 | |
| 129 | $ jack-admin server-log |
| 130 | Print log pattern. |
| 131 | |
| 132 | |
| 133 | |
| 134 | Troubleshooting |
| 135 | --------------- |
| 136 | |
| 137 | If compilation fails on "No Jack server running": |
| 138 | |
| 139 | See "Starting the server" above. |
| 140 | |
| 141 | |
| 142 | If your computer becomes unresponsive during compilation or if you experience Jack compilations |
| 143 | failing on "Out of memory error.": |
| 144 | |
| 145 | You can improve the situation by reducing the number of jack simultaneous compilations by editing |
| 146 | your $HOME/.jack-server/config.properties and changing jack.server.max-service to a lower value. |
| 147 | |
| 148 | |
| 149 | If you have trouble starting the server: |
| 150 | |
| 151 | This may mean that TCP ports are already in use on your computer. You can try modifying the ports |
| 152 | both in your client and server configurations. See the "Server info" and "Client info" sections. |
| 153 | If it doesn't solve the problem, please report and attach your compilation log and the jack server |
| 154 | log (see the "Server logs" section). |
| 155 | |
| 156 | |
| 157 | If your compilation gets stuck without any progress: |
| 158 | |
| 159 | Please report and give us additional information by: |
| 160 | Running "jack-admin list-server | awk '{print $2}' | xargs kill -3". |
| 161 | Attaching the server log to the bug (see the "Server logs" section). |
| 162 | Attaching "$HOME/.jack-server/logs/outputs.txt". |
| 163 | Executing a "jack-admin server-stat" and attaching the output. |
| 164 | Executing "lsof -i TCP:8076", "lsof -i TCP:8077" and attaching the outputs. |
| 165 | |