Description
Environment:
Linux [hostname] 2.6.32-754.23.1.el6.x86_64 #1 SMP Tue Sep 17 09:46:55 EDT 2019 x86_64 x86_64 x86_64 GNU/Linux
notebook = 6.0.2 (but same thing happens on 6)
jupyter enterprise gateway = 2.0.0
Problem
When I use Jupyter to launch any number of Spark kernels, if the Spark application is stopped outside of Jupyter, upon logging in, 0 Files are displayed in the Files tab. If I take a look at my networking tab in my browser, I can see that the "sessions" REST API call is failing. I'm not exactly sure what the sessions API is doing (hopefully you can help!) but based on my JEG log output, it looks like Jupyter is calling JEG REST APIs to get info for each of the kernels. If just 1 of those kernel API calls fails, then the entire sessions REST API returns a 504 ({"message": "Error attempting to connect to Gateway server url 'https://[hostname]:8888'. Ensure gateway url is valid and the Gateway instance is running.", "reason": null})
Question
Would it be possible to return the partial list of kernels that it CAN find instead of an entire failure?
JEG log where you can see the calls that Jupyter is doing for multiple kernels
Starting IPython kernel for Spark Cluster mode on behalf of user shaertel
[I 2019-11-15 12:50:35.284 EnterpriseGatewayApp] ApplicationID: 'app-20191115125034-0007-0cff530c-4325-4688-b204-c0229fd2869a' assigned for KernelID: '8cc66e44-8238-4454-9bb5-2a0cf0074ebe', state: WAITING, 14.0 seconds after starting.
[I 2019-11-15 12:50:35.341 EnterpriseGatewayApp] Kernel started: 8cc66e44-8238-4454-9bb5-2a0cf0074ebe
[I 191115 12:50:35 web:2246] 201 POST /api/kernels (9.21.58.126) 14017.63ms
[I 191115 12:50:35 web:2246] 200 GET /api/kernels/8cc66e44-8238-4454-9bb5-2a0cf0074ebe (9.21.58.126) 2.50ms
[I 191115 12:50:35 web:2246] 200 GET /api/kernels/8cc66e44-8238-4454-9bb5-2a0cf0074ebe (9.21.58.126) 0.72ms
[W 2019-11-15 12:50:35.456 EnterpriseGatewayApp] No session ID specified
[I 191115 12:50:35 web:2246] 101 GET /api/kernels/8cc66e44-8238-4454-9bb5-2a0cf0074ebe/channels (9.21.58.126) 14.12ms
[I 2019-11-15 12:50:42.620 EnterpriseGatewayApp] KernelRestarter: restarting kernel (1/5), keep random ports
[W 2019-11-15 12:50:42.621 EnterpriseGatewayApp] Remote kernel (d389b3c6-a72b-4865-821d-974a7bcccf06) will not be automatically restarted since there are no clients connected at this time.
[I 2019-11-15 12:50:42.746 EnterpriseGatewayApp] Kernel shutdown: d389b3c6-a72b-4865-821d-974a7bcccf06
[I 2019-11-15 12:50:46.326 EnterpriseGatewayApp] Starting buffering for 8cc66e44-8238-4454-9bb5-2a0cf0074ebe:4cf9dc54-4f65b5bdedd2ae520723a69c
[I 191115 12:50:49 web:2246] 200 GET /api/kernelspecs (9.21.58.126) 11.16ms
[W 191115 12:50:49 web:1782] 404 GET /api/kernels/d389b3c6-a72b-4865-821d-974a7bcccf06 (9.21.58.126): Kernel does not exist: d389b3c6-a72b-4865-821d-974a7bcccf06
[W 191115 12:50:49 web:2246] 404 GET /api/kernels/d389b3c6-a72b-4865-821d-974a7bcccf06 (9.21.58.126) 3.34ms