blob: bc901e3ae5838c660f75f952ccdbca8137a91e40 [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".
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +010022It can be configured in "$HOME/.jack-settings"
Yohann Roussel1b457412015-10-22 10:57:00 +020023
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
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +010034defined in "$HOME/.jack-server/config.properties" on the server host (See "Server info" below)
Yohann Roussel1b457412015-10-22 10:57:00 +020035by default: "SERVER_PORT_SERVICE=8076".
36
37"SERVER_PORT_ADMIN": Server admin TCP port number. Needs to match the admin port number defined in
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +010038"$HOME/.jack-server/config.properties" on the server host (See "Server info" below)
Yohann Roussel1b457412015-10-22 10:57:00 +020039by 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
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +010074 "$HOME/.jack-settings" on the client host (See Client section).
Yohann Roussel1b457412015-10-22 10:57:00 +020075
76jack.server.admin.port=<port-number>
77 Server admin TCP port number. Default is 8077. Needs to match the service port defined in
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +010078 "$HOME/.jack-settings" on the client host (See Client section).
Yohann Roussel1b457412015-10-22 10:57:00 +020079
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
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +0100146your "$HOME/.jack-server/config.properties" and changing jack.server.max-service to a lower value.
Yohann Roussel1b457412015-10-22 10:57:00 +0200147
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.
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +0100153If it doesn't solve the problem, please report and give us additional information by:
154 - Attaching your compilation log.
155 - Attaching a zip of "$HOME/.jack-server/".
156 - Attaching "$HOME/.jack-settings".
157 - Executing "lsof -i TCP:8076", "lsof -i TCP:8077" and attaching the outputs.
158
159
160If your commands fails on
161"Failed to contact Jack server: Problem reading <your home>/.jack-server/client.pem":
162
163This may mean that your server never managed to start, see
164"If you have trouble starting the server" above.
Yohann Roussel1b457412015-10-22 10:57:00 +0200165
166
167If your compilation gets stuck without any progress:
168
169Please report and give us additional information by:
Yohann Roussel5a6b2ab2015-12-11 15:34:55 +0100170 - Running "jack-admin list-server | awk '{print $2}' | xargs kill -3".
171 - Attaching the server log to the bug (see the "Server logs" section).
172 - Executing a "jack-admin server-stat" and attaching the output.
173 - Attaching "$HOME/.jack-server/logs/outputs.txt".
174 - Executing "lsof -i TCP:8076", "lsof -i TCP:8077" and attaching the outputs.