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