@@ -155,6 +155,47 @@ clusters, as well as an option to run a local notebook directly on the jupyterhu
155
155
```
156
156
157
157
158
+ ## Debugging batchspawner
159
+
160
+ Sometimes it can be hard to debug batchspawner, but it's not really
161
+ once you know how the pieces interact. Check the following places for
162
+ error messages:
163
+
164
+ * Check the JupyterHub logs for errors.
165
+
166
+ * Check the JupyterHub logs for the batch script that got submitted
167
+ and the command used to submit it. Are these correct? (Note that
168
+ there are submission environment variables too, which aren't
169
+ displayed.)
170
+
171
+ * At this point, it's a matter of checking the batch system. Is the
172
+ job ever scheduled? Does it run? Does it succeed? Check the batch
173
+ system status and output of the job. The most comon failure
174
+ patterns are a) job never starting due to bad scheduler options, b)
175
+ job waiting in the queue beyond the ` start_timeout ` , causing
176
+ JupyterHub to kill the job.
177
+
178
+ * At this point the job starts. Does it fail immediately, or before
179
+ Jupyter starts? Check the scheduler output files (stdout/stderr of
180
+ the job), wherever it is stored. To debug the job script, you can
181
+ add debugging into the batch script, such as an ` env ` or `set
182
+ -x`.
183
+
184
+ * At this point Jupyter itself starts - check its error messages. Is
185
+ it starting with the right options? Can it communicate with the
186
+ hub? At this point there usually isn't anything
187
+ batchspawner-specific, with the one exception below. The error log
188
+ would be in the batch script output (same file as above). There may
189
+ also be clues in the JupyterHub logfile.
190
+
191
+ Common problems:
192
+
193
+ * Did you ` import batchspawner ` in the ` jupyterhub_config.py ` file?
194
+ This is needed in order to activate the batchspawer API in
195
+ JupyterHub.
196
+
197
+
198
+
158
199
## Changelog
159
200
160
201
### dev (requires minimum JupyterHub 0.9 and Python 3.5)
0 commit comments