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