The logs above only include some static page requests, not anything related to launching servers. We’ll need those logs, and ideally logs from the notebook container as well.
Ok sure. Here are the logs,
This is the Route53 url - https://bdcnonprod-dev-hub01-datalab-jupyter.discoverycloud-nonprod.aws.us.thetime.com:8000/hub/login
Please note “jovyan” is username and “meena” is the named server. The screenshots from my initial post are the same.
- JUPYTERHUB CONSOLE LOG – PART 1
[root@ip-10-86-124-187 bdcspawner]# jupyterhub -f /etc/jupyter/jupyterhub_config.py
[I 2022-03-04 22:57:22.960 JupyterHub app:2766] Running JupyterHub version 2.1.1
[I 2022-03-04 22:57:22.960 JupyterHub app:2796] Using Authenticator: jupyterhub.auth.PAMAuthenticator-2.1.1
[I 2022-03-04 22:57:22.960 JupyterHub app:2796] Using Spawner: bdcspawner.Spawner.JHOptionsSpawner-0.0.1
[I 2022-03-04 22:57:22.960 JupyterHub app:2796] Using Proxy: jupyterhub.proxy.ConfigurableHTTPProxy-2.1.1
[D 2022-03-04 22:57:22.961 JupyterHub app:2727] Could not load pycurl: No module named 'pycurl'
pycurl is recommended if you have a large number of users.
[I 2022-03-04 22:57:22.962 JupyterHub app:1606] Loading cookie_secret from /etc/jupyter/bdcspawner/jupyterhub_cookie_secret
[D 2022-03-04 22:57:22.962 JupyterHub app:1773] Connecting to db: sqlite:///jupyterhub.sqlite
[D 2022-03-04 22:57:22.980 JupyterHub orm:955] database schema version found: 833da8570507
[I 2022-03-04 22:57:23.060 JupyterHub proxy:496] Generating new CONFIGPROXY_AUTH_TOKEN
[D 2022-03-04 22:57:23.061 JupyterHub app:2019] Loading roles into database
[I 2022-03-04 22:57:23.074 JupyterHub app:1924] Not using allowed_users. Any authenticated user will be allowed.
[D 2022-03-04 22:57:23.080 JupyterHub app:2278] Purging expired APITokens
[D 2022-03-04 22:57:23.083 JupyterHub app:2278] Purging expired OAuthCodes
[D 2022-03-04 22:57:23.085 JupyterHub app:2111] Loading role assignments from config
[D 2022-03-04 22:57:23.100 JupyterHub app:2424] Initializing spawners
[D 2022-03-04 22:57:23.102 JupyterHub app:2555] Loaded users:
[I 2022-03-04 22:57:23.102 JupyterHub app:2835] Initialized 0 spawners in 0.003 seconds
[W 2022-03-04 22:57:23.105 JupyterHub proxy:687] Running JupyterHub without SSL. I hope there is SSL termination happening somewhere else...
[I 2022-03-04 22:57:23.105 JupyterHub proxy:691] Starting proxy @ http://:8000
[D 2022-03-04 22:57:23.105 JupyterHub proxy:692] Proxy cmd: ['configurable-http-proxy', '--ip', '', '--port', '8000', '--api-ip', '127.0.0.1', '--api-port', '8001', '--error-target', 'http://10.86.124.187:8081/hub/error']
[D 2022-03-04 22:57:23.109 JupyterHub proxy:610] Writing proxy pid file: jupyterhub-proxy.pid
22:57:23.283 [ConfigProxy] info: Proxying http://*:8000 to (no default)
22:57:23.286 [ConfigProxy] info: Proxy API at http://127.0.0.1:8001/api/routes
[D 2022-03-04 22:57:23.416 JupyterHub proxy:728] Proxy started and appears to be up
[D 2022-03-04 22:57:23.419 JupyterHub proxy:821] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
[I 2022-03-04 22:57:23.429 JupyterHub app:3084] Hub API listening on http://10.86.124.187:8081/hub/
22:57:23.429 [ConfigProxy] info: 200 GET /api/routes
[D 2022-03-04 22:57:23.429 JupyterHub proxy:343] Fetching routes to check
[D 2022-03-04 22:57:23.429 JupyterHub proxy:821] Proxy: Fetching GET http://127.0.0.1:8001/api/routes
22:57:23.431 [ConfigProxy] info: 200 GET /api/routes
[D 2022-03-04 22:57:23.431 JupyterHub proxy:346] Checking routes
[I 2022-03-04 22:57:23.431 JupyterHub proxy:431] Adding route for Hub: / => http://10.86.124.187:8081
[D 2022-03-04 22:57:23.431 JupyterHub proxy:821] Proxy: Fetching POST http://127.0.0.1:8001/api/routes/
22:57:23.434 [ConfigProxy] info: Adding route / -> http://10.86.124.187:8081
22:57:23.434 [ConfigProxy] info: Route added / -> http://10.86.124.187:8081
22:57:23.435 [ConfigProxy] info: 201 POST /api/routes/
[I 2022-03-04 22:57:23.435 JupyterHub app:3150] JupyterHub is now running at http://:8000
[D 2022-03-04 22:57:23.436 JupyterHub app:2759] It took 0.604 seconds for the Hub to start
[I 2022-03-04 22:57:31.121 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 31.28ms
[I 2022-03-04 22:57:41.617 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 2.07ms
[I 2022-03-04 22:58:01.117 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 1.88ms
[I 2022-03-04 22:58:11.645 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 1.99ms
[I 2022-03-04 22:58:31.146 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 1.93ms
[I 2022-03-04 22:58:41.676 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 1.91ms
[I 2022-03-04 22:59:01.168 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 2.08ms
[W 2022-03-04 22:59:11.092 JupyterHub base:393] Invalid or expired cookie token
[I 2022-03-04 22:59:11.094 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 2.48ms
[D 2022-03-04 22:59:11.614 JupyterHub log:189] 200 GET /hub/static/css/style.min.css?v=bff49b4a161afb17ee3b71927ce7d6c4e5b0e4b9ef6f18ca3e356a05f29e69776d3a76aee167060dd2ae2ee62d3cfdcf203b4b0090b1423f7d629ea7daa3f9da (@::ffff:10.86.124.143) 1.56ms
[D 2022-03-04 22:59:11.615 JupyterHub log:189] 200 GET /hub/static/components/requirejs/require.js?v=bd1aa102bdb0b27fbf712b32cfcd29b016c272acf3d864ee8469376eaddd032cadcf827ff17c05a8c8e20061418fe58cf79947049f5c0dff3b4f73fcc8cad8ec (@::ffff:10.86.124.143) 1.02ms
[D 2022-03-04 22:59:11.616 JupyterHub log:189] 200 GET /hub/static/components/jquery/dist/jquery.min.js?v=f3de1813a4160f9239f4781938645e1589b876759cd50b7936dbd849a35c38ffaed53f6a61dbdd8a1cf43cf4a28aa9fffbfddeec9a3811a1bb4ee6df58652b31 (@::ffff:10.86.124.143) 1.39ms
[D 2022-03-04 22:59:11.617 JupyterHub log:189] 200 GET /hub/static/components/bootstrap/dist/js/bootstrap.min.js?v=a014e9acc78d10a0a7a9fbaa29deac6ef17398542d9574b77b40bf446155d210fa43384757e3837da41b025998ebfab4b9b6f094033f9c226392b800df068bce (@::ffff:10.86.124.143) 0.74ms
[I 2022-03-04 22:59:11.705 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 1.86ms
[D 2022-03-04 22:59:13.991 JupyterHub log:189] 200 GET /hub/logo (@::ffff:10.86.124.143) 1.02ms
[D 2022-03-04 22:59:14.406 JupyterHub log:189] 200 GET /hub/static/favicon.ico?v=fde5757cd3892b979919d3b1faa88a410f28829feb5ba22b6cf069f2c6c98675fceef90f932e49b510e74d65c681d5846b943e7f7cc1b41867422f0481085c1f (@::ffff:10.86.124.143) 0.89ms
[I 2022-03-04 22:59:31.199 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 1.88ms
[I 2022-03-04 22:59:41.735 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 1.86ms
[I 2022-03-04 23:00:01.228 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 2.07ms
[I 2022-03-04 23:00:11.743 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.143) 1.85ms
[D 2022-03-04 23:00:14.127 JupyterHub log:189] 200 GET /hub/static/components/font-awesome/fonts/fontawesome-webfont.woff2?v=4.7.0 (@::ffff:10.86.124.143) 1.04ms
[D 2022-03-04 23:00:14.164 JupyterHub roles:450] Assigning default role to User jovyan
[D 2022-03-04 23:00:14.170 JupyterHub base:559] Setting cookie jupyterhub-session-id: {'httponly': True, 'path': '/'}
[D 2022-03-04 23:00:14.170 JupyterHub base:563] Setting cookie for jovyan: jupyterhub-hub-login
[D 2022-03-04 23:00:14.170 JupyterHub base:559] Setting cookie jupyterhub-hub-login: {'httponly': True, 'path': '/hub/'}
[I 2022-03-04 23:00:14.171 JupyterHub base:797] User logged in: jovyan
[I 2022-03-04 23:00:14.172 JupyterHub log:189] 302 POST /hub/login?next= -> /hub/home (jovyan@::ffff:10.86.124.143) 43.78ms
[D 2022-03-04 23:00:14.774 JupyterHub base:281] Recording first activity for <User(jovyan 0/1 running)>
[D 2022-03-04 23:00:14.783 JupyterHub user:347] Creating <class 'bdcspawner.Spawner.JHOptionsSpawner'> for jovyan:
[I 2022-03-04 23:00:14.900 JupyterHub log:189] 200 GET /hub/home (jovyan@::ffff:10.86.124.143) 128.52ms
[D 2022-03-04 23:00:15.352 JupyterHub log:189] 200 GET /hub/static/css/style.min.css?v=bff49b4a161afb17ee3b71927ce7d6c4e5b0e4b9ef6f18ca3e356a05f29e69776d3a76aee167060dd2ae2ee62d3cfdcf203b4b0090b1423f7d629ea7daa3f9da (@::ffff:10.86.124.143) 1.21ms
[D 2022-03-04 23:00:16.579 JupyterHub log:189] 200 GET /hub/static/js/home.js?v=20220304225723 (@::ffff:10.86.124.143) 1.02ms
[D 2022-03-04 23:00:16.959 JupyterHub log:189] 200 GET /hub/static/components/moment/moment.js?v=20220304225723 (@::ffff:10.86.124.143) 1.16ms
[D 2022-03-04 23:00:16.961 JupyterHub log:189] 200 GET /hub/static/js/jhapi.js?v=20220304225723 (@::ffff:10.86.124.143) 0.72ms
[D 2022-03-04 23:00:18.013 JupyterHub log:189] 200 GET /hub/static/js/utils.js?v=20220304225723 (@::ffff:10.86.124.143) 1.04ms
[D 2022-03-04 23:00:22.754 JupyterHub scopes:491] Checking access via scope servers
[D 2022-03-04 23:00:22.754 JupyterHub scopes:389] Unrestricted access to /hub/spawn/jovyan/meena via servers
[D 2022-03-04 23:00:22.754 JupyterHub user:347] Creating <class 'bdcspawner.Spawner.JHOptionsSpawner'> for jovyan:meena
[D 2022-03-04 23:00:22.771 JupyterHub pages:207] Serving options form for jovyan:meena
[I 2022-03-04 23:00:22.777 JupyterHub log:189] 200 GET /hub/spawn/jovyan/meena (jovyan@::ffff:10.86.124.143) 25.27ms
[D 2022-03-04 23:00:25.258 JupyterHub scopes:491] Checking access via scope servers
[D 2022-03-04 23:00:25.258 JupyterHub scopes:389] Unrestricted access to /hub/spawn/jovyan/meena via servers
[D 2022-03-04 23:00:25.258 JupyterHub pages:255] Triggering spawn with supplied form options for jovyan:meena
[D 2022-03-04 23:00:25.259 JupyterHub base:915] Initiating spawn for jovyan:meena
[D 2022-03-04 23:00:25.259 JupyterHub base:919] 0/100 concurrent spawns
[D 2022-03-04 23:00:25.259 JupyterHub base:924] 0 active servers
[D 2022-03-04 23:00:25.264 JupyterHub roles:473] Checking token permissions against requested role server
[I 2022-03-04 23:00:25.266 JupyterHub roles:478] Adding role server to token: <APIToken('21b1...', user='jovyan', client_id='jupyterhub')>
[I 2022-03-04 23:00:25.280 JupyterHub provider:607] Creating oauth client jupyterhub-user-jovyan-meena
jovyanis username
[D 2022-03-04 23:00:25.300 JupyterHub user:676] Calling Spawner.start for jovyan:meena
[I 2022-03-04 23:00:25.301 JupyterHub Spawner:242] Running new task
[I 2022-03-04 23:00:25.301 JupyterHub Spawner:243] dap-bdc-nonprod-dev-01-datalab-ECSCluster
[I 2022-03-04 23:00:25.301 JupyterHub Spawner:244] JupyterNotebook:87
[I 2022-03-04 23:00:25.301 JupyterHub Spawner:245] jovyan
[D 2022-03-04 23:00:25.485 JupyterHub Spawner:256] ecs:RunTask = {'tasks': [{'attachments': [], 'attributes': [{'name': 'ecs.cpu-architecture', 'value': 'x86_64'}], 'availabilityZone': 'ap-southeast-2b', 'clusterArn': 'arn:aws:ecs:ap-southeast-2:035973170720:cluster/dap-bdc-nonprod-dev-01-datalab-ECSCluster', 'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'containers': [{'containerArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e/f4d5b41a-d6c4-4ea4-94b0-b4b53d405e59', 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'name': 'jupyternotebook', 'image': '035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.87', 'lastStatus': 'PENDING', 'networkInterfaces': [], 'cpu': '0'}], 'cpu': '1024', 'createdAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'desiredStatus': 'RUNNING', 'enableExecuteCommand': False, 'group': 'family:JupyterNotebook', 'lastStatus': 'PENDING', 'launchType':'EC2', 'memory': '512', 'overrides': {'containerOverrides': [{'name': 'jupyternotebook', 'environment': [{'name': 'PATH', 'value': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin'}, {'name': 'LANG', 'value': 'en_US.UTF-8'}, {'name': 'JUPYTERHUB_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JPY_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JUPYTERHUB_ADMIN_ACCESS', 'value': '1'}, {'name': 'JUPYTERHUB_CLIENT_ID', 'value': 'jupyterhub-user-jovyan-meena'}, {'name': 'JUPYTERHUB_HOST', 'value': ''}, {'name': 'JUPYTERHUB_OAUTH_CALLBACK_URL', 'value': '/user/jovyan/meena/oauth_callback'}, {'name': 'JUPYTERHUB_OAUTH_SCOPES', 'value': '["access:servers!server=jovyan/meena", "access:servers!user=jovyan"]'}, {'name': 'JUPYTERHUB_USER', 'value': 'jovyan'}, {'name': 'JUPYTERHUB_SERVER_NAME', 'value': 'meena'}, {'name': 'JUPYTERHUB_API_URL', 'value': 'http://10.86.124.187:8081/hub/api'}, {'name': 'JUPYTERHUB_ACTIVITY_URL', 'value': 'http://10.86.124.187:8081/hub/api/users/jovyan/activity'}, {'name': 'JUPYTERHUB_BASE_URL', 'value': '/'}, {'name': 'JUPYTERHUB_SERVICE_PREFIX', 'value': '/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_SERVICE_URL', 'value': 'http://0.0.0.0:8888/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_ROOT_DIR', 'value': '/home/jovyan'}, {'name': 'JUPYTERHUB_DEBUG', 'value': '1'}]}], 'inferenceAcceleratorOverrides': []}, 'startedBy': 'jovyan', 'tags': [], 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'taskDefinitionArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task-definition/JupyterNotebook:87', 'version': 1}], 'failures': [], 'ResponseMetadata': {'RequestId': '8fd3349c-24e7-406c-8ce7-0b9c8dc81d2f', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8fd3349c-24e7-406c-8ce7-0b9c8dc81d2f', 'content-type': 'application/x-amz-json-1.1', 'content-length': '2674', 'date': 'Fri, 04 Mar 2022 10:00:25 GMT'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:25.486 JupyterHub Spawner:257] ecs:RunTask = {'tasks': [{'attachments': [], 'attributes': [{'name': 'ecs.cpu-architecture', 'value': 'x86_64'}], 'availabilityZone': 'ap-southeast-2b', 'clusterArn': 'arn:aws:ecs:ap-southeast-2:035973170720:cluster/dap-bdc-nonprod-dev-01-datalab-ECSCluster', 'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'containers': [{'containerArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e/f4d5b41a-d6c4-4ea4-94b0-b4b53d405e59', 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'name': 'jupyternotebook', 'image': '035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.87', 'lastStatus': 'PENDING', 'networkInterfaces': [], 'cpu': '0'}], 'cpu': '1024', 'createdAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'desiredStatus': 'RUNNING', 'enableExecuteCommand': False, 'group': 'family:JupyterNotebook', 'lastStatus': 'PENDING', 'launchType':'EC2', 'memory': '512', 'overrides': {'containerOverrides': [{'name': 'jupyternotebook', 'environment': [{'name': 'PATH', 'value': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin'}, {'name': 'LANG', 'value': 'en_US.UTF-8'}, {'name': 'JUPYTERHUB_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JPY_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JUPYTERHUB_ADMIN_ACCESS', 'value': '1'}, {'name': 'JUPYTERHUB_CLIENT_ID', 'value': 'jupyterhub-user-jovyan-meena'}, {'name': 'JUPYTERHUB_HOST', 'value': ''}, {'name': 'JUPYTERHUB_OAUTH_CALLBACK_URL', 'value': '/user/jovyan/meena/oauth_callback'}, {'name': 'JUPYTERHUB_OAUTH_SCOPES', 'value': '["access:servers!server=jovyan/meena", "access:servers!user=jovyan"]'}, {'name': 'JUPYTERHUB_USER', 'value': 'jovyan'}, {'name': 'JUPYTERHUB_SERVER_NAME', 'value': 'meena'}, {'name': 'JUPYTERHUB_API_URL', 'value': 'http://10.86.124.187:8081/hub/api'}, {'name': 'JUPYTERHUB_ACTIVITY_URL', 'value': 'http://10.86.124.187:8081/hub/api/users/jovyan/activity'}, {'name': 'JUPYTERHUB_BASE_URL', 'value': '/'}, {'name': 'JUPYTERHUB_SERVICE_PREFIX', 'value': '/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_SERVICE_URL', 'value': 'http://0.0.0.0:8888/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_ROOT_DIR', 'value': '/home/jovyan'}, {'name': 'JUPYTERHUB_DEBUG', 'value': '1'}]}], 'inferenceAcceleratorOverrides': []}, 'startedBy': 'jovyan', 'tags': [], 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'taskDefinitionArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task-definition/JupyterNotebook:87', 'version': 1}], 'failures': [], 'ResponseMetadata': {'RequestId': '8fd3349c-24e7-406c-8ce7-0b9c8dc81d2f', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '8fd3349c-24e7-406c-8ce7-0b9c8dc81d2f', 'content-type': 'application/x-amz-json-1.1', 'content-length': '2674', 'date': 'Fri, 04 Mar 2022 10:00:25 GMT'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:25.486 JupyterHub Spawner:269] Spawned notebook container
[I 2022-03-04 23:00:25.486 JupyterHub Spawner:271] Fetching task info
[D 2022-03-04 23:00:25.520 JupyterHub Spawner:276] ecs:DescribeTasks = {'tasks': [{'attachments': [], 'attributes': [{'name': 'ecs.cpu-architecture', 'value': 'x86_64'}], 'availabilityZone': 'ap-southeast-2b', 'clusterArn': 'arn:aws:ecs:ap-southeast-2:035973170720:cluster/dap-bdc-nonprod-dev-01-datalab-ECSCluster', 'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'containers': [{'containerArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e/f4d5b41a-d6c4-4ea4-94b0-b4b53d405e59', 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'name': 'jupyternotebook', 'image': '035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.87', 'lastStatus': 'PENDING', 'networkInterfaces': [], 'healthStatus': 'UNKNOWN', 'cpu': '0'}], 'cpu': '1024', 'createdAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'desiredStatus': 'RUNNING', 'enableExecuteCommand': False, 'group': 'family:JupyterNotebook', 'healthStatus': 'UNKNOWN', 'lastStatus': 'PENDING', 'launchType': 'EC2', 'memory': '512', 'overrides': {'containerOverrides': [{'name': 'jupyternotebook', 'environment': [{'name': 'PATH', 'value': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin'}, {'name': 'LANG', 'value': 'en_US.UTF-8'}, {'name': 'JUPYTERHUB_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JPY_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JUPYTERHUB_ADMIN_ACCESS', 'value': '1'}, {'name': 'JUPYTERHUB_CLIENT_ID', 'value': 'jupyterhub-user-jovyan-meena'}, {'name': 'JUPYTERHUB_HOST', 'value': ''}, {'name': 'JUPYTERHUB_OAUTH_CALLBACK_URL', 'value': '/user/jovyan/meena/oauth_callback'}, {'name': 'JUPYTERHUB_OAUTH_SCOPES', 'value': '["access:servers!server=jovyan/meena", "access:servers!user=jovyan"]'}, {'name': 'JUPYTERHUB_USER', 'value': 'jovyan'}, {'name': 'JUPYTERHUB_SERVER_NAME', 'value': 'meena'}, {'name': 'JUPYTERHUB_API_URL', 'value': 'http://10.86.124.187:8081/hub/api'}, {'name': 'JUPYTERHUB_ACTIVITY_URL', 'value': 'http://10.86.124.187:8081/hub/api/users/jovyan/activity'}, {'name': 'JUPYTERHUB_BASE_URL', 'value': '/'}, {'name': 'JUPYTERHUB_SERVICE_PREFIX', 'value': '/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_SERVICE_URL', 'value': 'http://0.0.0.0:8888/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_ROOT_DIR', 'value': '/home/jovyan'}, {'name': 'JUPYTERHUB_DEBUG','value': '1'}]}], 'inferenceAcceleratorOverrides': []}, 'startedBy': 'jovyan', 'tags': [], 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'taskDefinitionArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task-definition/JupyterNotebook:87', 'version': 1}], 'failures': [], 'ResponseMetadata': {'RequestId': '27a983f9-b3d3-4c15-9d21-73a054363114', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '27a983f9-b3d3-4c15-9d21-73a054363114', 'content-type': 'application/x-amz-json-1.1', 'content-length': '2724', 'date': 'Fri, 04 Mar 2022 10:00:25 GMT'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:25.520 JupyterHub Spawner:286] Waiting for container instance status to move from PENDING to RUNNING
[I 2022-03-04 23:00:26.260 JupyterHub log:189] 302 POST /hub/spawn/jovyan/meena -> /hub/spawn-pending/jovyan/meena (jovyan@::ffff:10.86.124.143) 1005.13ms
[D 2022-03-04 23:00:26.549 JupyterHub Spawner:276] ecs:DescribeTasks = {'tasks': [{'attachments': [], 'attributes': [{'name': 'ecs.cpu-architecture', 'value': 'x86_64'}], 'availabilityZone': 'ap-southeast-2b', 'clusterArn': 'arn:aws:ecs:ap-southeast-2:035973170720:cluster/dap-bdc-nonprod-dev-01-datalab-ECSCluster', 'connectivity': 'CONNECTED', 'connectivityAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'containers': [{'containerArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e/f4d5b41a-d6c4-4ea4-94b0-b4b53d405e59', 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'name': 'jupyternotebook', 'image': '035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.87', 'imageDigest': 'sha256:7afde9c9aa82c7083699c060b35da8a793db55d2808c30cf2b9955b60d531aff', 'runtimeId': 'ababef0cefcb295c46a80196a1b88972d41826ddd08315d0b636e82e056d5f7c', 'lastStatus': 'RUNNING', 'networkBindings': [{'bindIP': '0.0.0.0', 'containerPort': 8888, 'hostPort': 49250, 'protocol': 'tcp'}], 'networkInterfaces': [], 'healthStatus': 'UNKNOWN', 'cpu': '0'}], 'cpu': '1024', 'createdAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'desiredStatus': 'RUNNING', 'enableExecuteCommand': False,'group': 'family:JupyterNotebook', 'healthStatus': 'UNKNOWN', 'lastStatus': 'RUNNING', 'launchType': 'EC2', 'memory': '512', 'overrides': {'containerOverrides': [{'name': 'jupyternotebook', 'environment': [{'name': 'PATH', 'value': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin'}, {'name': 'LANG', 'value': 'en_US.UTF-8'}, {'name': 'JUPYTERHUB_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JPY_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JUPYTERHUB_ADMIN_ACCESS','value': '1'}, {'name': 'JUPYTERHUB_CLIENT_ID', 'value': 'jupyterhub-user-jovyan-meena'}, {'name': 'JUPYTERHUB_HOST', 'value': ''}, {'name': 'JUPYTERHUB_OAUTH_CALLBACK_URL', 'value': '/user/jovyan/meena/oauth_callback'}, {'name': 'JUPYTERHUB_OAUTH_SCOPES', 'value': '["access:servers!server=jovyan/meena", "access:servers!user=jovyan"]'}, {'name': 'JUPYTERHUB_USER', 'value': 'jovyan'}, {'name': 'JUPYTERHUB_SERVER_NAME', 'value': 'meena'}, {'name': 'JUPYTERHUB_API_URL', 'value': 'http://10.86.124.187:8081/hub/api'}, {'name': 'JUPYTERHUB_ACTIVITY_URL', 'value': 'http://10.86.124.187:8081/hub/api/users/jovyan/activity'}, {'name': 'JUPYTERHUB_BASE_URL', 'value': '/'}, {'name': 'JUPYTERHUB_SERVICE_PREFIX', 'value': '/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_SERVICE_URL', 'value': 'http://0.0.0.0:8888/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_ROOT_DIR', 'value': '/home/jovyan'}, {'name': 'JUPYTERHUB_DEBUG', 'value': '1'}]}], 'inferenceAcceleratorOverrides': []}, 'startedAt': datetime.datetime(2022, 3, 4, 23, 0, 26, 469000, tzinfo=tzlocal()), 'startedBy': 'jovyan', 'tags': [], 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'taskDefinitionArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task-definition/JupyterNotebook:87', 'version': 2}], 'failures': [], 'ResponseMetadata': {'RequestId': 'beb2b798-4140-4d34-b84a-b1517d81e07a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'beb2b798-4140-4d34-b84a-b1517d81e07a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '3077', 'date': 'Fri, 04 Mar 2022 10:00:26 GMT'}, 'RetryAttempts': 0}}
[D 2022-03-04 23:00:26.549 JupyterHub Spawner:294] ecs:DescribeTasks = {'tasks': [{'attachments': [], 'attributes': [{'name': 'ecs.cpu-architecture', 'value': 'x86_64'}], 'availabilityZone': 'ap-southeast-2b', 'clusterArn': 'arn:aws:ecs:ap-southeast-2:035973170720:cluster/dap-bdc-nonprod-dev-01-datalab-ECSCluster', 'connectivity': 'CONNECTED', 'connectivityAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'containers': [{'containerArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e/f4d5b41a-d6c4-4ea4-94b0-b4b53d405e59', 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'name': 'jupyternotebook', 'image': '035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.87', 'imageDigest': 'sha256:7afde9c9aa82c7083699c060b35da8a793db55d2808c30cf2b9955b60d531aff', 'runtimeId': 'ababef0cefcb295c46a80196a1b88972d41826ddd08315d0b636e82e056d5f7c', 'lastStatus': 'RUNNING', 'networkBindings': [{'bindIP': '0.0.0.0', 'containerPort': 8888, 'hostPort': 49250, 'protocol': 'tcp'}], 'networkInterfaces': [], 'healthStatus': 'UNKNOWN', 'cpu': '0'}], 'cpu': '1024', 'createdAt': datetime.datetime(2022, 3, 4, 23, 0, 25, 613000, tzinfo=tzlocal()), 'desiredStatus': 'RUNNING', 'enableExecuteCommand': False,'group': 'family:JupyterNotebook', 'healthStatus': 'UNKNOWN', 'lastStatus': 'RUNNING', 'launchType': 'EC2', 'memory': '512', 'overrides': {'containerOverrides': [{'name': 'jupyternotebook', 'environment': [{'name': 'PATH', 'value': '/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin'}, {'name': 'LANG', 'value': 'en_US.UTF-8'}, {'name': 'JUPYTERHUB_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JPY_API_TOKEN', 'value': '21b19c6e2d31429aad7db7ebedbc6f3d'}, {'name': 'JUPYTERHUB_ADMIN_ACCESS','value': '1'}, {'name': 'JUPYTERHUB_CLIENT_ID', 'value': 'jupyterhub-user-jovyan-meena'}, {'name': 'JUPYTERHUB_HOST', 'value': ''}, {'name': 'JUPYTERHUB_OAUTH_CALLBACK_URL', 'value': '/user/jovyan/meena/oauth_callback'}, {'name': 'JUPYTERHUB_OAUTH_SCOPES', 'value': '["access:servers!server=jovyan/meena", "access:servers!user=jovyan"]'}, {'name': 'JUPYTERHUB_USER', 'value': 'jovyan'}, {'name': 'JUPYTERHUB_SERVER_NAME', 'value': 'meena'}, {'name': 'JUPYTERHUB_API_URL', 'value': 'http://10.86.124.187:8081/hub/api'}, {'name': 'JUPYTERHUB_ACTIVITY_URL', 'value': 'http://10.86.124.187:8081/hub/api/users/jovyan/activity'}, {'name': 'JUPYTERHUB_BASE_URL', 'value': '/'}, {'name': 'JUPYTERHUB_SERVICE_PREFIX', 'value': '/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_SERVICE_URL', 'value': 'http://0.0.0.0:8888/user/jovyan/meena/'}, {'name': 'JUPYTERHUB_ROOT_DIR', 'value': '/home/jovyan'}, {'name': 'JUPYTERHUB_DEBUG', 'value': '1'}]}], 'inferenceAcceleratorOverrides': []}, 'startedAt': datetime.datetime(2022, 3, 4, 23, 0, 26, 469000, tzinfo=tzlocal()), 'startedBy': 'jovyan', 'tags': [], 'taskArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task/dap-bdc-nonprod-dev-01-datalab-ECSCluster/c2cc065ea248407ba66843f33c6d0f8e', 'taskDefinitionArn': 'arn:aws:ecs:ap-southeast-2:035973170720:task-definition/JupyterNotebook:87', 'version': 2}], 'failures': [], 'ResponseMetadata': {'RequestId': 'beb2b798-4140-4d34-b84a-b1517d81e07a', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'beb2b798-4140-4d34-b84a-b1517d81e07a', 'content-type': 'application/x-amz-json-1.1', 'content-length': '3077', 'date': 'Fri, 04 Mar 2022 10:00:26 GMT'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:26.549 JupyterHub Spawner:304] Container running on port 49250
PART 2
[D 2022-03-04 23:00:26.574 JupyterHub Spawner:310] ecs:DescribeContainerInstances = {'containerInstances': [{'containerInstanceArn': 'arn:aws:ecs:ap-southeast-2:035973170720:container-instance/dap-bdc-nonprod-dev-01-datalab-ECSCluster/f027356e1ba74be1a68809cb009ad713', 'ec2InstanceId': 'i-093a2a7c7ad9ecf69', 'version': 12048, 'versionInfo': {'agentVersion': '1.57.1', 'agentHash': '089b7b64', 'dockerVersion': 'DockerVersion: 20.10.12'}, 'remainingResources': [{'name': 'CPU', 'type': 'INTEGER', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 3072}, {'name': 'MEMORY', 'type': 'INTEGER', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 30523}, {'name': 'PORTS', 'type': 'STRINGSET', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 0, 'stringSetValue': ['22', '2376', '2375', '51678', '51679']}, {'name': 'PORTS_UDP', 'type': 'STRINGSET', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 0, 'stringSetValue': []}], 'registeredResources': [{'name': 'CPU', 'type': 'INTEGER', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 4096},{'name': 'MEMORY', 'type': 'INTEGER', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 31547}, {'name': 'PORTS', 'type': 'STRINGSET', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 0, 'stringSetValue': ['22', '2376', '2375', '51678', '51679']}, {'name': 'PORTS_UDP', 'type': 'STRINGSET', 'doubleValue': 0.0, 'longValue': 0, 'integerValue': 0, 'stringSetValue': []}], 'status': 'ACTIVE', 'agentConnected': True, 'runningTasksCount': 2, 'pendingTasksCount': 0, 'attributes': [{'name': 'ecs.capability.secrets.asm.environment-variables'}, {'name': 'ecs.capability.branch-cni-plugin-version', 'value': '199bfc65-'}, {'name': 'ecs.ami-id', 'value': 'ami-0885384fdf0a73e7e'}, {'name': 'ecs.capability.secrets.asm.bootstrap.log-driver'}, {'name': 'ecs.capability.task-eia.optimized-cpu'}, {'name': 'ecs.capability.ecr-endpoint'}, {'name': 'ecs.capability.docker-plugin.local'}, {'name': 'ecs.capability.task-cpu-mem-limit'}, {'name': 'ecs.capability.secrets.ssm.bootstrap.log-driver'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.30'}, {'name': 'ecs.capability.full-sync'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.31'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.32'}, {'name': 'ecs.capability.firelens.options.config.file'}, {'name': 'ecs.capability.logging-driver.awsfirelens.log-driver-buffer-limit'}, {'name': 'ecs.availability-zone', 'value': 'ap-southeast-2b'}, {'name': 'ecs.capability.aws-appmesh'}, {'name': 'com.amazonaws.ecs.capability.logging-driver.awslogs'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.24'}, {'name': 'ecs.capability.task-eni-trunking'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.25'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.26'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.27'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.28'}, {'name': 'com.amazonaws.ecs.capability.privileged-container'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.29'}, {'name': 'ecs.cpu-architecture', 'value': 'x86_64'}, {'name': 'com.amazonaws.ecs.capability.ecr-auth'}, {'name': 'ecs.capability.firelens.fluentbit'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.20'}, {'name': 'ecs.os-type', 'value': 'linux'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.21'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.22'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.23'}, {'name': 'ecs.capability.private-registry-authentication.secretsmanager'}, {'name': 'ecs.capability.task-eia'}, {'name': 'com.amazonaws.ecs.capability.logging-driver.awsfirelens'}, {'name': 'ecs.capability.firelens.options.config.s3'}, {'name': 'com.amazonaws.ecs.capability.logging-driver.json-file'}, {'name': 'ecs.capability.execution-role-awslogs'}, {'name': 'ecs.vpc-id', 'value': 'vpc-0aa2edd2d3c8607ba'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.17'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.18'}, {'name': 'com.amazonaws.ecs.capability.docker-remote-api.1.19'}, {'name': 'ecs.capability.task-eni'}, {'name': 'ecs.capability.firelens.fluentd'}, {'name': 'ecs.capability.efs'}, {'name': 'ecs.capability.execution-role-ecr-pull'}, {'name': 'ecs.capability.task-eni.ipv6'}, {'name': 'ecs.capability.container-health-check'}, {'name': 'ecs.os-family', 'value': 'LINUX'}, {'name': 'ecs.subnet-id', 'value': 'subnet-0de64cea50664c480'}, {'name': 'ecs.instance-type', 'value': 'r5.xlarge'}, {'name': 'com.amazonaws.ecs.capability.task-iam-role-network-host'}, {'name': 'ecs.capability.container-ordering'}, {'name': 'ecs.capability.cni-plugin-version', 'value': '55b2ae77-2020.09.0'}, {'name': 'ecs.capability.env-files.s3'}, {'name': 'ecs.capability.secrets.ssm.environment-variables'}, {'name': 'ecs.capability.pid-ipc-namespace-sharing'}, {'name': 'com.amazonaws.ecs.capability.task-iam-role'}], 'registeredAt': datetime.datetime(2021, 12, 16, 16, 15, 43, 183000, tzinfo=tzlocal()), 'attachments': [], 'tags': []}], 'failures': [], 'ResponseMetadata': {'RequestId': '4e65984d-4144-49ae-92e0-a9296dfef310', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': '4e65984d-4144-49ae-92e0-a9296dfef310', 'content-type': 'application/x-amz-json-1.1', 'content-length': '4693', 'date': 'Fri, 04 Mar 2022 10:00:26 GMT'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:26.574 JupyterHub Spawner:317] Fetching IP addresses of instance: i-093a2a7c7ad9ecf69
[D 2022-03-04 23:00:26.703 JupyterHub Spawner:319] ec2:DescribeInstances = {'Reservations': [{'Groups': [], 'Instances': [{'AmiLaunchIndex': 0, 'ImageId': 'ami-0885384fdf0a73e7e', 'InstanceId': 'i-093a2a7c7ad9ecf69', 'InstanceType': 'r5.xlarge', 'LaunchTime': datetime.datetime(2021, 12, 16, 3, 15, 6, tzinfo=tzutc()), 'Monitoring': {'State': 'enabled'}, 'Placement': {'AvailabilityZone': 'ap-southeast-2b', 'GroupName': '', 'Tenancy': 'default'}, 'PrivateDnsName': 'ip-10-86-124-110.ap-southeast-2.compute.internal', 'PrivateIpAddress': '10.86.124.110', 'ProductCodes': [], 'PublicDnsName': '', 'State': {'Code': 16, 'Name': 'running'}, 'StateTransitionReason': '', 'SubnetId': 'subnet-0de64cea50664c480', 'VpcId': 'vpc-0aa2edd2d3c8607ba', 'Architecture': 'x86_64', 'BlockDeviceMappings': [{'DeviceName': '/dev/sda1', 'Ebs': {'AttachTime': datetime.datetime(2021, 12, 16, 3, 15, 6, tzinfo=tzutc()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-08ba6aef8ef0ee97d'}}, {'DeviceName': '/dev/xvda', 'Ebs': {'AttachTime': datetime.datetime(2021, 12, 16, 3, 15, 6, tzinfo=tzutc()), 'DeleteOnTermination': True, 'Status': 'attached', 'VolumeId': 'vol-096c2ef57d1de8dfa'}}], 'ClientToken': '5b45f704-f1d0-f526-0696-22668b636e4e', 'EbsOptimized': False, 'EnaSupport': True, 'Hypervisor': 'xen', 'IamInstanceProfile': {'Arn': 'arn:aws:iam::035973170720:instance-profile/dap-bdc-nonprod-dev-01-datalab-ECSClusterRoleInstanceProfile', 'Id': 'AIPAQQYBLAYQCZAKREBD3'}, 'NetworkInterfaces': [{'Attachment': {'AttachTime': datetime.datetime(2021, 12, 16, 3, 15, 6, tzinfo=tzutc()), 'AttachmentId': 'eni-attach-03f1c8cfce11e4143', 'DeleteOnTermination': True, 'DeviceIndex': 0, 'Status': 'attached', 'NetworkCardIndex': 0}, 'Description': '', 'Groups': [{'GroupName': 'VPC Endpoints', 'GroupId': 'sg-01561680b48a23c28'}, {'GroupName': 'Core Services', 'GroupId': 'sg-057423a4fadfb55a0'}, {'GroupName': 'dap-bdc-nonprod-dev-01-datalab-ECSClusterSG', 'GroupId': 'sg-0dd11436fa3d3f4ef'}], 'Ipv6Addresses': [], 'MacAddress': '06:a8:e4:0a:81:72', 'NetworkInterfaceId': 'eni-0b636bbfd6f84ab86', 'OwnerId': '035973170720', 'PrivateDnsName': 'ip-10-86-124-110.ap-southeast-2.compute.internal', 'PrivateIpAddress': '10.86.124.110', 'PrivateIpAddresses': [{'Primary': True, 'PrivateDnsName': 'ip-10-86-124-110.ap-southeast-2.compute.internal', 'PrivateIpAddress': '10.86.124.110'}], 'SourceDestCheck': True, 'Status': 'in-use', 'SubnetId': 'subnet-0de64cea50664c480', 'VpcId': 'vpc-0aa2edd2d3c8607ba', 'InterfaceType': 'interface'}], 'RootDeviceName': '/dev/sda1', 'RootDeviceType': 'ebs', 'SecurityGroups': [{'GroupName': 'VPC Endpoints', 'GroupId': 'sg-01561680b48a23c28'}, {'GroupName': 'Core Services', 'GroupId': 'sg-057423a4fadfb55a0'}, {'GroupName': 'dap-bdc-nonprod-dev-01-datalab-ECSClusterSG','GroupId': 'sg-0dd11436fa3d3f4ef'}], 'SourceDestCheck': True, 'Tags': [{'Key': 'backup_policy', 'Value': 'NONE'}, {'Key': 'aws:autoscaling:groupName', 'Value': 'dap-bdc-nonprod-dev-01-datalab-ECSLaunchConfig20211216031457370000000001'}], 'VirtualizationType': 'hvm', 'CpuOptions': {'CoreCount': 2, 'ThreadsPerCore': 2}, 'CapacityReservationSpecification': {'CapacityReservationPreference': 'open'}, 'HibernationOptions': {'Configured': False}, 'MetadataOptions': {'State': 'applied', 'HttpTokens': 'optional', 'HttpPutResponseHopLimit': 1, 'HttpEndpoint': 'enabled', 'HttpProtocolIpv6': 'disabled', 'InstanceMetadataTags': 'disabled'}, 'EnclaveOptions': {'Enabled': False}, 'PlatformDetails': 'Red Hat Enterprise Linux', 'UsageOperation': 'RunInstances:0010', 'UsageOperationUpdateTime': datetime.datetime(2021, 12, 16, 3, 15, 6, tzinfo=tzutc()), 'PrivateDnsNameOptions': {'HostnameType': 'ip-name', 'EnableResourceNameDnsARecord': False, 'EnableResourceNameDnsAAAARecord': False}}], 'OwnerId': '035973170720', 'RequesterId': '081202882002', 'ReservationId': 'r-05a7d81b147035c7b'}], 'ResponseMetadata': {'RequestId': 'b0b3f78d-b63a-4626-92f4-220a44cb892f', 'HTTPStatusCode': 200, 'HTTPHeaders': {'x-amzn-requestid': 'b0b3f78d-b63a-4626-92f4-220a44cb892f', 'cache-control': 'no-cache, no-store', 'strict-transport-security': 'max-age=31536000; includeSubDomains', 'vary': 'accept-encoding', 'content-type': 'text/xml;charset=UTF-8', 'transfer-encoding': 'chunked', 'date': 'Fri, 04 Mar 2022 10:00:26 GMT', 'server': 'AmazonEC2'}, 'RetryAttempts': 0}}
[I 2022-03-04 23:00:26.704 JupyterHub Spawner:328] Container running on ip: 10.86.124.110
[I 2022-03-04 23:00:26.704 JupyterHub Spawner:330] Finished with the start method
[D 2022-03-04 23:00:26.709 JupyterHub spawner:1221] Polling subprocess every 300s
[D 2022-03-04 23:00:26.718 JupyterHub scopes:491] Checking access via scope servers
[D 2022-03-04 23:00:26.719 JupyterHub scopes:389] Unrestricted access to /hub/spawn-pending/jovyan/meena via servers
[I 2022-03-04 23:00:26.719 JupyterHub pages:405] jovyan:meena is pending spawn
[I 2022-03-04 23:00:26.723 JupyterHub log:189] 200 GET /hub/spawn-pending/jovyan/meena (jovyan@::ffff:10.86.124.143) 6.60ms
[D 2022-03-04 23:00:27.191 JupyterHub scopes:491] Checking access via scope read:servers
[D 2022-03-04 23:00:27.191 JupyterHub scopes:389] Unrestricted access to /hub/api/users/jovyan/servers/meena/progress via read:servers
[I 2022-03-04 23:00:27.831 JupyterHub log:189] 200 GET /hub/api (@10.86.124.110) 0.76ms
[D 2022-03-04 23:00:27.842 JupyterHub base:281] Recording first activity for <APIToken('21b1...', user='jovyan', client_id='jupyterhub')>
[D 2022-03-04 23:00:27.846 JupyterHub scopes:301] Authenticated with token <APIToken('21b1...', user='jovyan', client_id='jupyterhub')>
[D 2022-03-04 23:00:27.849 JupyterHub scopes:491] Checking access via scope users:activity
[D 2022-03-04 23:00:27.849 JupyterHub scopes:402] Argument-based access to /hub/api/users/jovyan/activity via users:activity
[D 2022-03-04 23:00:27.850 JupyterHub users:855] Activity for user jovyan: 2022-03-04T10:00:27.744500Z
[D 2022-03-04 23:00:27.851 JupyterHub users:873] Activity on server jovyan/meena: 2022-03-04T10:00:27.744500Z
[I 2022-03-04 23:00:27.856 JupyterHub log:189] 200 POST /hub/api/users/jovyan/activity (jovyan@10.86.124.110) 16.73ms
[D 2022-03-04 23:00:28.898 JupyterHub utils:230] Server at http://10.86.124.110:49250/user/jovyan/meena/ responded with 302
[D 2022-03-04 23:00:28.898 JupyterHub _version:74] jupyterhub and jupyterhub-singleuser both on version 2.1.1
[I 2022-03-04 23:00:28.899 JupyterHub base:944] User jovyan:meena took 3.640 seconds to start
[I 2022-03-04 23:00:28.899 JupyterHub proxy:286] Adding user jovyan to proxy /user/jovyan/meena/ => http://10.86.124.110:49250
[D 2022-03-04 23:00:28.899 JupyterHub proxy:821] Proxy: Fetching POST http://127.0.0.1:8001/api/routes/user/jovyan/meena
23:00:28.900 [ConfigProxy] info: Adding route /user/jovyan/meena -> http://10.86.124.110:49250
23:00:28.901 [ConfigProxy] info: Route added /user/jovyan/meena -> http://10.86.124.110:49250
23:00:28.901 [ConfigProxy] info: 201 POST /api/routes/user/jovyan/meena
[I 2022-03-04 23:00:28.902 JupyterHub users:749] Server jovyan:meena is ready
[I 2022-03-04 23:00:28.902 JupyterHub log:189] 200 GET /hub/api/users/jovyan/servers/meena/progress (jovyan@::ffff:10.86.124.143) 1713.68ms
[D 2022-03-04 23:00:29.315 JupyterHub scopes:491] Checking access via scope servers
[D 2022-03-04 23:00:29.315 JupyterHub scopes:389] Unrestricted access to /hub/spawn-pending/jovyan/meena via servers
[I 2022-03-04 23:00:29.315 JupyterHub log:189] 302 GET /hub/spawn-pending/jovyan/meena -> /user/jovyan/meena (jovyan@::ffff:10.86.124.143) 3.47ms
[I 2022-03-04 23:00:30.142 JupyterHub log:189] 302 GET /static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=fb45616eef2c454960f91fcd2a04efeda84cfacccf0c5d741ba2793dc1dbd6d3ab01aaae6485222945774c7d7a9a2e9fb87e0d8ef1ea96893aa6906147a371bb -> /hub/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=fb45616eef2c454960f91fcd2a04efeda84cfacccf0c5d741ba2793dc1dbd6d3ab01aaae6485222945774c7d7a9a2e9fb87e0d8ef1ea96893aa6906147a371bb (@::ffff:10.86.124.143) 0.93ms
[I 2022-03-04 23:00:30.148 JupyterHub log:189] 302 GET /static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=5edf53bf6bb9c3b1ddafd8594825a7e2ed621f19423e569c985162742f63911c09eba2c529f8fb47aebf27fafdfe287d563347f58c1126b278189a18871b6a9a -> /hub/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=5edf53bf6bb9c3b1ddafd8594825a7e2ed621f19423e569c985162742f63911c09eba2c529f8fb47aebf27fafdfe287d563347f58c1126b278189a18871b6a9a (@::ffff:10.86.124.143) 0.59ms
[I 2022-03-04 23:00:30.158 JupyterHub log:189] 302 GET /static/style/style.min.css?v=b092d0a2da5df36f2b073ddb4eafcd6c8094c4fa21b6dcd3f7185ce16c04ad66424083d785b81607a26b4b85b69a560574ada7db75262c886655f99d651c482e -> /hub/static/style/style.min.css?v=b092d0a2da5df36f2b073ddb4eafcd6c8094c4fa21b6dcd3f7185ce16c04ad66424083d785b81607a26b4b85b69a560574ada7db75262c886655f99d651c482e (@::ffff:10.86.124.143) 0.65ms
[I 2022-03-04 23:00:30.167 JupyterHub log:189] 302 GET /custom/custom.css -> /hub/custom/custom.css (@::ffff:10.86.124.143) 1.08ms
[I 2022-03-04 23:00:30.168 JupyterHub log:189] 302 GET /static/components/es6-promise/promise.min.js?v=bea335d74136a63ae1b5130f5ac9a50c6256a5f435e6e09fef599491a84d834a8b0f011ca3eaaca3b4ab6a2da2d3e1191567a2f171e60da1d10e5b9d52f84184 -> /hub/static/components/es6-promise/promise.min.js?v=bea335d74136a63ae1b5130f5ac9a50c6256a5f435e6e09fef599491a84d834a8b0f011ca3eaaca3b4ab6a2da2d3e1191567a2f171e60da1d10e5b9d52f84184 (@::ffff:10.86.124.143) 1.15ms
[I 2022-03-04 23:00:30.169 JupyterHub log:189] 302 GET /static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 -> /hub/static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 (@::ffff:10.86.124.143) 0.64ms
[I 2022-03-04 23:00:30.178 JupyterHub log:189] 302 GET /static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 -> /hub/static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 (@::ffff:10.86.124.143) 1.68ms
[I 2022-03-04 23:00:30.178 JupyterHub log:189] 302 GET /static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec -> /hub/static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec (@::ffff:10.86.124.143) 1.64ms
[I 2022-03-04 23:00:30.179 JupyterHub log:189] 302 GET /static/components/requirejs/require.js?v=d37b48bb2137faa0ab98157e240c084dd5b1b5e74911723aa1d1f04c928c2a03dedf922d049e4815f7e5a369faa2e6b6a1000aae958b7953b5cc60411154f593 -> /hub/static/components/requirejs/require.js?v=d37b48bb2137faa0ab98157e240c084dd5b1b5e74911723aa1d1f04c928c2a03dedf922d049e4815f7e5a369faa2e6b6a1000aae958b7953b5cc60411154f593 (@::ffff:10.86.124.143) 1.62ms
[W 2022-03-04 23:00:30.528 JupyterHub log:189] 404 GET /hub/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css?v=fb45616eef2c454960f91fcd2a04efeda84cfacccf0c5d741ba2793dc1dbd6d3ab01aaae6485222945774c7d7a9a2e9fb87e0d8ef1ea96893aa6906147a371bb (@::ffff:10.86.124.143) 0.80ms
[W 2022-03-04 23:00:30.530 JupyterHub log:189] 404 GET /hub/static/components/jquery-typeahead/dist/jquery.typeahead.min.css?v=5edf53bf6bb9c3b1ddafd8594825a7e2ed621f19423e569c985162742f63911c09eba2c529f8fb47aebf27fafdfe287d563347f58c1126b278189a18871b6a9a (@::ffff:10.86.124.143) 0.57ms
[W 2022-03-04 23:00:30.550 JupyterHub log:189] 404 GET /hub/static/style/style.min.css?v=b092d0a2da5df36f2b073ddb4eafcd6c8094c4fa21b6dcd3f7185ce16c04ad66424083d785b81607a26b4b85b69a560574ada7db75262c886655f99d651c482e (@::ffff:10.86.124.143) 0.61ms
[W 2022-03-04 23:00:30.589 JupyterHub log:189] 404 GET /hub/custom/custom.css (jovyan@::ffff:10.86.124.143) 26.54ms
[W 2022-03-04 23:00:30.590 JupyterHub log:189] 404 GET /hub/static/components/es6-promise/promise.min.js?v=bea335d74136a63ae1b5130f5ac9a50c6256a5f435e6e09fef599491a84d834a8b0f011ca3eaaca3b4ab6a2da2d3e1191567a2f171e60da1d10e5b9d52f84184 (@::ffff:10.86.124.143) 0.61ms
[W 2022-03-04 23:00:30.592 JupyterHub log:189] 404 GET /hub/static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 (@::ffff:10.86.124.143) 0.58ms
[W 2022-03-04 23:00:30.595 JupyterHub log:189] 404 GET /hub/static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 (@::ffff:10.86.124.143) 0.61ms
[W 2022-03-04 23:00:30.600 JupyterHub log:189] 404 GET /hub/static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec (@::ffff:10.86.124.143) 0.59ms
[D 2022-03-04 23:00:30.604 JupyterHub log:189] 200 GET /hub/static/components/requirejs/require.js?v=d37b48bb2137faa0ab98157e240c084dd5b1b5e74911723aa1d1f04c928c2a03dedf922d049e4815f7e5a369faa2e6b6a1000aae958b7953b5cc60411154f593 (@::ffff:10.86.124.143) 0.85ms
[I 2022-03-04 23:00:30.972 JupyterHub log:189] 302 GET /static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 -> /hub/static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 (@::ffff:10.86.124.143) 0.85ms
[I 2022-03-04 23:00:31.258 JupyterHub log:189] 200 GET /hub/login (@::ffff:10.86.124.92) 1.93ms
[W 2022-03-04 23:00:31.319 JupyterHub log:189] 404 GET /hub/static/components/react/react.production.min.js?v=9a0aaf84a316c8bedd6c2ff7d5b5e0a13f8f84ec02442346cba0b842c6c81a6bf6176e64f3675c2ebf357cb5bb048e0b527bd39377c95681d22468da3d5de735 (@::ffff:10.86.124.143) 0.82ms
[I 2022-03-04 23:00:31.671 JupyterHub log:189] 302 GET /static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 -> /hub/static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 (@::ffff:10.86.124.143) 0.89ms
[W 2022-03-04 23:00:32.027 JupyterHub log:189] 404 GET /hub/static/components/react/react-dom.production.min.js?v=6fc58c1c4736868ff84f57bd8b85f2bdb985993a9392718f3b4af4bfa10fb4efba2b4ddd68644bd2a8daf0619a3844944c9c43f8528364a1aa6fc01ec1b8ae84 (@::ffff:10.86.124.143) 0.83ms
[I 2022-03-04 23:00:32.421 JupyterHub log:189] 302 GET /static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec -> /hub/static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec (@::ffff:10.86.124.143) 0.86ms
[W 2022-03-04 23:00:32.780 JupyterHub log:189] 404 GET /hub/static/components/create-react-class/index.js?v=894ad57246e682b4cfbe7cd5e408dcd6b38d06af4de4f3425991e2676fdc2ef1732cbd19903104198878ae77de12a1996de3e7da3a467fb226bdda8f4618faec (@::ffff:10.86.124.143) 0.80ms
[I 2022-03-04 23:00:33.186 JupyterHub log:189] 302 GET /static/components/jquery/jquery.min.js?v=20220304100027 -> /hub/static/components/jquery/jquery.min.js?v=20220304100027 (@::ffff:10.86.124.143) 0.84ms
[W 2022-03-04 23:00:33.553 JupyterHub log:189] 404 GET /hub/static/components/jquery/jquery.min.js?v=20220304100027 (@::ffff:10.86.124.143) 0.85ms
[I 2022-03-04 23:00:33.954 JupyterHub log:189] 302 GET /static/base/images/favicon.ico?v=50afa725b5de8b00030139d09b38620224d4e7dba47c07ef0e86d4643f30c9bfe6bb7e1a4a1c561aa32834480909a4b6fe7cd1e17f7159330b6b5914bf45a880 -> /hub/static/base/images/favicon.ico?v=50afa725b5de8b00030139d09b38620224d4e7dba47c07ef0e86d4643f30c9bfe6bb7e1a4a1c561aa32834480909a4b6fe7cd1e17f7159330b6b5914bf45a880 (@::ffff:10.86.124.143) 0.91ms
[W 2022-03-04 23:00:34.305 JupyterHub log:189] 404 GET /hub/static/base/images/favicon.ico?v=50afa725b5de8b00030139d09b38620224d4e7dba47c07ef0e86d4643f30c9bfe6bb7e1a4a1c561aa32834480909a4b6fe7cd1e17f7159330b6b5914bf45a880 (@::ffff:10.86.124.143) 0.79ms
ERROR-404 - Not Found. You are requesting a page that does not exists.
ECS NOTEBOOK CONTAINER LOGS
2022-03-04 23:00:31[W 2022-03-04 10:00:31.401 jovyan log:189] 404 GET /user/jovyan/meena/logo (@::ffff:10.86.124.143) 1.71ms
2022-03-04 23:00:31[D 2022-03-04 10:00:31.399 jovyan handlers:251] Using contents: services/contents
2022-03-04 23:00:31[D 2022-03-04 10:00:31.399 jovyan auth:570] No user identified
2022-03-04 23:00:29[W 2022-03-04 10:00:29.830 jovyan log:189] 404 GET /user/jovyan/meena (@::ffff:10.86.124.143) 22.93ms
2022-03-04 23:00:29[D 2022-03-04 10:00:29.829 jovyan handlers:836] Path components/requirejs/require.js served from /usr/local/lib/python3.9/site-packages/notebook/static/components/requirejs/require.js
2022-03-04 23:00:29[D 2022-03-04 10:00:29.828 jovyan handlers:836] Path components/es6-promise/promise.min.js served from /usr/local/lib/python3.9/site-packages/notebook/static/components/es6-promise/promise.min.js
2022-03-04 23:00:29[D 2022-03-04 10:00:29.829 jovyan handlers:836] Path components/react/react.production.min.js served from /usr/local/lib/python3.9/site-packages/notebook/static/components/react/react.production.min.js
2022-03-04 23:00:29[D 2022-03-04 10:00:29.829 jovyan handlers:836] Path components/react/react-dom.production.min.js served from /usr/local/lib/python3.9/site-packages/notebook/static/components/react/react-dom.production.min.js
2022-03-04 23:00:29[D 2022-03-04 10:00:29.829 jovyan handlers:836] Path components/create-react-class/index.js served from /usr/local/lib/python3.9/site-packages/notebook/static/components/create-react-class/index.js
2022-03-04 23:00:29[D 2022-03-04 10:00:29.828 jovyan handlers:836] Path components/jquery-typeahead/dist/jquery.typeahead.min.css served from /usr/local/lib/python3.9/site-packages/notebook/static/components/jquery-typeahead/dist/jquery.typeahead.min.css
2022-03-04 23:00:29[D 2022-03-04 10:00:29.828 jovyan handlers:836] Path style/style.min.css served from /usr/local/lib/python3.9/site-packages/notebook/static/style/style.min.css
2022-03-04 23:00:29[D 2022-03-04 10:00:29.827 jovyan handlers:836] Path base/images/favicon.ico served from /usr/local/lib/python3.9/site-packages/notebook/static/base/images/favicon.ico
2022-03-04 23:00:29[D 2022-03-04 10:00:29.827 jovyan handlers:836] Path components/jquery-ui/themes/smoothness/jquery-ui.min.css served from /usr/local/lib/python3.9/site-packages/notebook/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css
2022-03-04 23:00:29[D 2022-03-04 10:00:29.809 jovyan handlers:251] Using contents: services/contents
2022-03-04 23:00:29[D 2022-03-04 10:00:29.808 jovyan auth:570] No user identified
2022-03-04 23:00:29[I 2022-03-04 10:00:29.046 jovyan log:189] 302 GET /user/jovyan/meena/ -> /user/jovyan/meena (@10.86.124.187) 0.61ms
2022-03-04 23:00:27[I 2022-03-04 10:00:27.984 jovyan mixins:597] Updating Hub with activity every 300 seconds
2022-03-04 23:00:27[D 2022-03-04 10:00:27.985 jovyan mixins:559] Notifying Hub of activity 2022-03-04T10:00:27.744500Z
2022-03-04 23:00:27[D 2022-03-04 10:00:27.981 jovyan _version:74] jupyterhub and jupyterhub-singleuser both on version 2.1.1
2022-03-04 23:00:27[I 2022-03-04 10:00:27.981 jovyan notebookapp:2329] Serving notebooks from local directory: /home/jovyan
2022-03-04 23:00:27[I 2022-03-04 10:00:27.981 jovyan notebookapp:2329] Jupyter Notebook 6.4.8 is running at:
2022-03-04 23:00:27[I 2022-03-04 10:00:27.981 jovyan notebookapp:2329] http://ababef0cefcb:8888/
2022-03-04 23:00:27[I 2022-03-04 10:00:27.981 jovyan notebookapp:2330] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
2022-03-04 23:00:27[I 2022-03-04 10:00:27.975 jovyan mixins:641] Starting jupyterhub-singleuser server version 2.1.1
2022-03-04 23:00:27[I 2022-03-04 10:00:27.745 jovyan notebookapp:1593] Authentication of /metrics is OFF, since other authentication is disabled.
2022-03-04 23:00:27[D 2022-03-04 10:00:27.734 jovyan config_manager:96] Paths used for configuration of jupyter_notebook_config:
2022-03-04 23:00:27/usr/etc/jupyter/jupyter_notebook_config.json
2022-03-04 23:00:27[D 2022-03-04 10:00:27.735 jovyan config_manager:96] Paths used for configuration of jupyter_notebook_config:
2022-03-04 23:00:27/home/jovyan/.local/etc/jupyter/jupyter_notebook_config.json
2022-03-04 23:00:27[D 2022-03-04 10:00:27.735 jovyan config_manager:96] Paths used for configuration of jupyter_notebook_config:
2022-03-04 23:00:27/home/jovyan/.jupyter/jupyter_notebook_config.json
2022-03-04 23:00:27[D 2022-03-04 10:00:27.734 jovyan config_manager:96] Paths used for configuration of jupyter_notebook_config:
2022-03-04 23:00:27/etc/jupyter/jupyter_notebook_config.json
2022-03-04 23:00:27[D 2022-03-04 10:00:27.734 jovyan config_manager:96] Paths used for configuration of jupyter_notebook_config:
2022-03-04 23:00:27/usr/local/etc/jupyter/jupyter_notebook_config.json
2022-03-04 23:00:27[D 2022-03-04 10:00:27.729 jovyan application:753] Loaded config file: /home/jovyan/.jupyter/jupyter_notebook_config.py
2022-03-04 23:00:27[D 2022-03-04 10:00:27.729 jovyan application:731] Looking for jupyter_notebook_config in /
2022-03-04 23:00:27[D 2022-03-04 10:00:27.728 jovyan application:753] Loaded config file: /etc/jupyter/jupyter_notebook_config.py
2022-03-04 23:00:27[D 2022-03-04 10:00:27.728 jovyan application:731] Looking for jupyter_notebook_config in /usr/local/etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.728 jovyan application:731] Looking for jupyter_notebook_config in /usr/etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.728 jovyan application:731] Looking for jupyter_notebook_config in /home/jovyan/.local/etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.728 jovyan application:731] Looking for jupyter_notebook_config in /home/jovyan/.jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:731] Looking for jupyter_config in /home/jovyan/.jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.727 jovyan application:731] Looking for jupyter_config in /
2022-03-04 23:00:27[D 2022-03-04 10:00:27.727 jovyan application:731] Looking for jupyter_notebook_config in /etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:174] Searching ['/', '/home/jovyan/.jupyter', '/home/jovyan/.local/etc/jupyter', '/usr/etc/jupyter', '/usr/local/etc/jupyter', '/etc/jupyter'] for config files
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:731] Looking for jupyter_config in /etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:731] Looking for jupyter_config in /usr/local/etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:731] Looking for jupyter_config in /usr/etc/jupyter
2022-03-04 23:00:27[D 2022-03-04 10:00:27.726 jovyan application:731] Looking for jupyter_config in /home/jovyan/.local/etc/jupyter
2022-03-04 23:00:27[I 2022-03-04 10:00:27.714 SingleUserNotebookApp mixins:615] Starting jupyterhub single-user server version 2.1.1
2022-03-04 23:00:27[I 2022-03-04 10:00:27.714 SingleUserNotebookApp mixins:629] Extending notebook.notebookapp.NotebookApp from notebook 6.4.8
2022-03-04 23:00:27Executing the command: /usr/local/bin/jupyterhub-singleuser --ip=0.0.0.0 --hub-api-url=http://10.86.124.187:8081/hub/api --hub-prefix=/user/jovyan/meena/ --base-url=/ --user=jovyan
2022-03-04 23:00:26/usr/local/bin/start-singleuser.sh: ignoring /usr/local/bin/start-notebook.d/*
2022-03-04 23:00:26/bin/bash: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
2022-03-04 23:00:26/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin:/usr/local/bin
2022-03-04 23:00:26http://10.86.124.187:8081/hub/api is JUPYTERHUB_API_URL
2022-03-04 23:00:26--ip=0.0.0.0 --hub-api-url=http://10.86.124.187:8081/hub/api --hub-prefix=/user/jovyan/meena/ --base-url=/ --user=jovyan
CUSTOM SPAWNER
import os
import pwd
import subprocess
import re
import boto3
from botocore.config import Config
from botocore.exceptions import ClientError
from jupyterhub.spawner import Spawner
from tornado import gen
from traitlets import (
Unicode,
Bool,
Int
)
from .helpers import dict_to_awskv, safeget
#if os.name == 'nt':
# import psutil
#from .utils import url_path_join
class JHOptionsSpawner(Spawner):
cluster_name = Unicode("notebook-cluster",
help="Name of the cluster setup").tag(config=True)
task_definition = Unicode("notebook_spawner_task:3",
help="The task definition in <defn>:<revision> format").tag(config=True) #Python’s string type uses the Unicode Standard for representing all different possible characters.
container_name = Unicode("jupyternotebook", help="Container name that is specified in the task definition").tag(config=True)
expose_public_ip = Bool(False, help="Expose public ip to the hub. If false, then the private IP is returned").tag(config=True)
aws_region_name = Unicode(None, help="The region to use in instantiating AWS clients", allow_none=True).tag(config=True)
task_arn = Unicode()
container_instance_arn = Unicode()
container_ip = Unicode()
container_port = Int(0)
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
aws_config = Config(region_name=self.aws_region_name)
self.ecs_client = boto3.client("ecs", config=aws_config)
self.ec2_client = boto3.client("ec2", config=aws_config)
self.ip = '0.0.0.0'
self.port = 8888
def _options_form_default(self):
options = []
return """
<style type="text/css">
div.note
{{
-moz-border-radius: 6px;
-webkit-border-radius: 6px;
background-color: #f0f7fb;
background-position: 9px 0px;
background-repeat: no-repeat;
border: solid 1px #3498db;
border-radius: 6px;
line-height: 18px;
overflow: hidden;
padding: 15px 60px;
}}
</style>
<div class=note>
<strong>
Welcome {user}!
<br />
<br />
BDC provides a Data Lab (DL) to segregate data for an individual
business use case or model, as agreed in the Data Lab governance
meeting.
<br />
<br />
If you are a part of more than one Data Lab or need to run more
than one Data Lab, you can Spawn a new Data Lab with a new
Server Name.
</strong>
</div>
<p>
<br />
<strong>
Please select the service and Data Lab to associate it
from the options below to create a new instance
</strong>
</p>
<label>Please select the data lab you would like to connect to</label>
<select name="datalab_names" size="1">
<option value="Datalab1" style="color: black;
font-weight: 700;">Datalab1</option>
<option value="Datalab2" style="color: black;
font-weight: 700;">Datalab2</option>
<option value="Datalab3" style="color: black;
font-weight: 700;">Datalab3</option>
<option value="Datalab4" style="color: black;
font-weight: 700;">Datalab4</option>
</select>
""".format(''.join(options), user=self.user.name)
def options_from_form(self, formdata):
options = {}
options['datalab_names'] = formdata['datalab_names']
return options
def load_state(self, state):
"""Restore state about spawned single-user server after a hub restart.
Local processes only need the process id.
"""
super().load_state(state)
if 'task_arn' in state:
self.task_arn = state['task_arn']
if 'container_instance_arn' in state:
self.container_instance_arn = state['container_instance_arn']
if 'container_ip' in state and 'container_port' in state:
self.container_ip = state['container_ip']
self.container_port = state['container_port']
def get_state(self):
"""Save state that is needed to restore this spawner instance after a hub restore.
Local processes only need the process id.
"""
state = super().get_state()
if self.task_arn:
state['task_arn'] = self.task_arn
if self.container_instance_arn:
state['container_instance_arn'] = self.container_instance_arn
if self.container_ip and self.container_port:
state['container_ip'] = self.container_ip
state['container_port'] = self.container_port
return state
def clear_state(self):
"""Clear stored state about this spawner (pid)"""
super().clear_state()
self.container_ip = ''
self.container_instance_arn = ''
self.container_port = 0
self.task_arn = ''
def get_env(self):
env = super().get_env()
return env
def setup_overrides(self):
# Set default overrides
overrides = {
'containerOverrides': [
{
'name': self.container_name
}
]
}
# Check for custom image
#lab_def = "035973170720.dkr.ecr.ap-southeast-2.amazonaws.com/dap-bdc-nonprod-dev-01-datalab-ecr:0.7"
#try:
# response = self.ecs_client.describe_task_definition(
# taskDefinition=lab_def
# )
# if isinstance(response, dict):
# if response['taskDefinition']['status'] != 'ACTIVE':
#
# raise Exception("Task definition {} for lab is not ACTIVE".format(lab_def))
# elif isinstance(response, list):
# raise Exception("List of task defintions not yet supported")
# else:
# raise Exception("Response Type not support")
# self.log.info("Setting task definition to {}".format(lab_def))
# self.task_definition = lab_def
#except Exception as error:
# self.log.error("Error loading lab defintion {} - defaulting to {}".format(lab_def, self.task_definition))
# self.log.error(error)
# Setup rest of overrides
env = self.get_env()
overrides['containerOverrides'][0]['environment'] = dict_to_awskv(env)
return overrides
@gen.coroutine
def poll(self):
try:
if self.task_arn:
desc_task_resp = self.ecs_client.describe_tasks(
cluster=self.cluster_name,
tasks=[self.task_arn]
)
self.log.debug("ecs:DescribeTasks = {!s}".format(desc_task_resp))
status = safeget(desc_task_resp, 'tasks', 0, 'lastStatus')
if status and status.lower() in ('pending', 'running'):
# If the Spawner has not finished starting, it should behave as if it is running (status=None).
# See https://jupyterhub.readthedocs.io/en/stable/api/spawner.html#jupyterhub.spawner.Spawner.poll for more details.
return None
self.log.warning("ECS task with ARN {} is either in STOPPED state or doesn't exist.".format(self.task_arn))
self.clear_state()
# if there was an error in retrieving the status of notebook server or if it's no longer running,
# we poll should return integer exit code.
# We can get here if notebook task was stopped outside of Spawner (stopped via console, exited, etc)
task_exit = safeget(desc_task_resp, 'tasks', 0, 'containers', 0, 'exitCode')
# 0 must be returned, when state is unknown, but notebook can potentially exit with 0 exit code
return task_exit if task_exit else 1
# If the Spawner has not been initialized (neither loaded state, nor called start),
# it should behave as if it is not running (status=0).
return 0
except (KeyError, ClientError) as exp:
self.log.error("Error calling describe_tasks for task with ARN {}: {}".format(self.task_arn, exp))
self.clear_state()
# any error in getting the status of notebook should be reported up as integer error
return 1
def is_running(self):
return self.poll() is None
@gen.coroutine
def start(self):
if not self.is_running():
self.log.info("Running new task")
self.log.info(self.cluster_name)
self.log.info(self.task_definition)
self.log.info(self.user.name)
overrides = self.setup_overrides()
run_task_resp = self.ecs_client.run_task(
cluster=self.cluster_name,
taskDefinition=self.task_definition,
startedBy=self.user.name,
count=1,
overrides=overrides
)
self.log.debug("ecs:RunTask = {!s}".format(run_task_resp))
self.log.info("ecs:RunTask = {!s}".format(run_task_resp))
self.task_arn = safeget(
run_task_resp,
'tasks', 0, 'containers', 0, 'taskArn',
exception="Could not get server task"
)
self.container_instance_arn = safeget(
run_task_resp,
'tasks', 0, 'containerInstanceArn',
exception="Could not get server instance"
)
self.log.info("Spawned notebook container")
self.log.info("Fetching task info")
while True:
if self.task_arn:
desc_task_resp = self.ecs_client.describe_tasks(cluster=self.cluster_name, tasks=[self.task_arn])
self.log.debug("ecs:DescribeTasks = {!s}".format(desc_task_resp))
last_status = safeget(desc_task_resp, 'tasks', 0, 'containers', 0, 'lastStatus')
if last_status == 'RUNNING': # success
break
elif last_status == 'STOPPED': # failure
self.log.error("The container unusually stopped")
reason = safeget(desc_task_resp, 'tasks', 0, 'containers', 0, 'reason')
raise RuntimeError(reason if reason is not None else "Error starting container")
else: # wait
self.log.info("Waiting for container instance status to move from %s to RUNNING" % last_status)
yield gen.sleep(1)
else: # wait
self.log.info("Waiting for container instance status to move from %s to RUNNING" % last_status)
yield gen.sleep(1)
# Wait for ECS to send task change event with networkBindings
while True:
self.log.debug("ecs:DescribeTasks = {!s}".format(desc_task_resp))
port = safeget(
desc_task_resp,
'tasks', 0, 'containers', 0, 'networkBindings', 0, 'hostPort',
)
if port is not None: # success
break
else: # wait
yield gen.sleep(1)
self.container_port = int(port)
self.log.info("Container running on port {:d}".format(self.container_port))
desc_cont_resp = self.ecs_client.describe_container_instances(
cluster=self.cluster_name,
containerInstances=[self.container_instance_arn]
)
self.log.debug("ecs:DescribeContainerInstances = {!s}".format(desc_cont_resp))
ec2_instance_id = safeget(
desc_cont_resp,
'containerInstances', 0, 'ec2InstanceId',
exception="Could not determine server host"
)
self.log.info("Fetching IP addresses of instance: {}".format(ec2_instance_id))
desc_inst_resp = self.ec2_client.describe_instances(InstanceIds=[ec2_instance_id])
self.log.debug("ec2:DescribeInstances = {!s}".format(desc_inst_resp))
public_ip = safeget(desc_inst_resp, 'Reservations', 0, 'Instances', 0, 'PublicIpAddress')
private_ip = safeget(
desc_inst_resp,
'Reservations', 0, 'Instances', 0, 'PrivateIpAddress',
exception="Could not determine server ip"
)
self.container_ip = public_ip if self.expose_public_ip and public_ip is not None else private_ip
self.log.info("Container running on ip: {}".format(self.container_ip))
self.log.info("Finished with the start method")
# by this time we should have ip and port either from new task or loaded from state
if not self.container_ip or not self.container_port:
raise RuntimeError("Error starting container: either port or ip is not set by the time start() is finished.")
return (self.container_ip, self.container_port)
@gen.coroutine
def stop(self, now=False):
self.log.info("Stopping task {}".format(self.task_arn))
stop_task_resp = self.ecs_client.stop_task(
cluster=self.cluster_name,
task=self.task_arn,
reason="Shutdown by the hub"
)
self.log.debug("ecs:StopTask = {!s}".format(stop_task_resp))
self.log.info("The requested task has been stopped")
self.clear_state()
JUPYTERHUB CONFIG
Configuration file for jupyterhub.
import os
import pwd
import subprocess
import socket
c = get_config()
c.JupyterHub.config_file = ‘jupyterhub_config.py’
c.JupyterHub.allow_named_servers = True
c.JupyterHub.named_server_limit_per_user = 3
Number of days for a login cookie to be valid. Default is two weeks.
c.JupyterHub.cookie_max_age_days = 3
Redirect user to server (if running), instead of control panel.
c.JupyterHub.redirect_to_server = False
from traitlets import default
c.JupyterHub.spawner_class = ‘bdcspawner.JHOptionsSpawner’
Set the log level by value or name.
c.JupyterHub.log_level = ‘DEBUG’
Enable debug-logging of the single-user server
c.Spawner.debug = True
c.Spawner.poll_interval = 300
c.Spawner.start_timeout = 600
c.JupyterHub.admin_access = True
The below will allow users to change their password by logging in to,
https://bdcnonprod-dev-jgd01-datalab-jupyter.discoverycloud-nonprod.aws.us.thetime.com:8000/hub/auth/change-password
#c.JupyterHub.authenticator_class = ‘firstuseauthenticator.FirstUseAuthenticator’
#c.FirstUseAuthenticator.create_users = True
def pre_spawn_hook(JHOptionsSpawner):
username = JHOptionsSpawner.user.name
print(username + “is username”)
try:
pwd.getpwnam(username)
except KeyError:
subprocess.check_call([‘useradd’, ‘-ms’, ‘/bin/bash’, username])
#c.Spawner.pre_spawn_hook = pre_spawn_hook
c.JHOptionsSpawner.pre_spawn_hook = pre_spawn_hook
#c.JHOptionsSpawner.self.ip = ‘0.0.0.0’
#c.JHOptionsSpawner.self.port = 8888
#Below line is required for JupyterLab to appear as a default screen when logging in
#c.Spawner.cmd=[“jupyter-labhub”]
c.PAMAuthenticator.open_sessions = False
#notebook_dir = os.environ.get(‘HOME’)
#notebook_dir = ‘/home/jovyan’
#c.Spawner.notebook_dir = ‘/home/jovyan’
c.Spawner.notebook_dir = ‘/home/jovyan’
#network_name=‘jupyterhub-network’
#s3_endpoint_url = os.environ.get(‘S3_ENDPOINT_URL’, ‘s3.amazonaws.com’)
c.Spawner.debug = True
#c.Spawner.environment = {‘JUPYTER_ENABLE_LAB’: ‘yes’}
#c.Spawner.environment = {‘JUPYTER_ENABLE_LAB’: ‘’}
#c.JupyterHub.hub_ip = ‘0.0.0.0’
#c.JupyterHub.hub_ip = ‘10.86.124.148’
c.JupyterHub.hub_connect_ip = socket.gethostbyname(socket.gethostname())
#c.JupyterHub.port = 8000
c.Authenticator.admin_users = {‘jovyan’}
c.JupyterHub.internal_ssl = False
c.JupyterHub.bind_url = ‘http://:8000’
Generate certs used for internal ssl
c.JupyterHub.generate_certs = False
ECS Details
c.JHOptionsSpawner.cluster_name = ‘dap-bdc-nonprod-dev-01-datalab-ECSCluster’
c.JHOptionsSpawner.task_definition = ‘JupyterNotebook:87’
c.JHOptionsSpawner.aws_region_name = ‘ap-southeast-2’
ECS notebook start could take a while - particularly if first image download
c.Spawner.start_timeout = 600
JUPYTER NOTEBOOK CONFIG
Copyright (c) Jupyter Development Team.
Distributed under the terms of the Modified BSD License.
from jupyter_core.paths import jupyter_data_dir
import subprocess
import os
import errno
import stat
c = get_config() # noqa: F821
#c.NotebookApp.token = ‘’
#c.NotebookApp.password = ‘’
c.NotebookApp.ip = “*”
c.NotebookApp.port = 8888
c.NotebookApp.allow_root = True
c.Session.debug = True
c.NotebookApp.notebook_dir = ‘/home/jovyan’
c.FileContentsManager.delete_to_trash = False
Docker File for Notebook Image
# Using standard Redhat Universal Base Image
#FROM registry.access.redhat.com/ubi8/ubi
FROM registry.us.thetime.com/base/python:3.9-ubi8
# Standard Labels
LABEL description="Redhat runtime with CA bundle and POST proxy configured and jupyter notebook" \
maintainer="DAP BDC Developers"
# Setting POST standard proxy environment variables
ENV HTTP_PROXY http://proxy.POST.co.us:10568/
ENV HTTPS_PROXY $HTTP_PROXY
ENV NO_PROXY localhost,127.0.0.*,10.*,.thetime.com,.thetime.com.au,.POST.digital,.time.com.au,crl.POST.co.us,jamf.POST.co.us,sts.POST.co.us
ARG NB_USER="jovyan"
ARG NB_UID="1000"
ARG NB_GID="100"
ENV JUP_DIR=/usr/local/bin \
SHELL=/bin/bash \
NB_USER="${NB_USER}" \
NB_UID=${NB_UID} \
NB_GID=${NB_GID} \
LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8 \
LANGUAGE=en_US.UTF-8
ENV PATH="/usr/local/bin:${JUP_DIR}:${PATH}" \
HOME="/home/${NB_USER}"
# Copy a script that we will use to correct permissions after running certain commands
COPY fix-permissions /usr/local/bin/fix-permissions
RUN chmod a+rx /usr/local/bin/fix-permissions
ARG CA_FILE="/etc/pki/ca-trust/source/anchors/POST_pki_2017.crt"
# Install/Update POST certs
COPY POST_pki_2017.crt $CA_FILE
RUN update-ca-trust extract
ENV SSL_CERT_DIR=/etc/pki/tls/certs \
SSL_CERT_FILE=/etc/pki/tls/cert.pem
# Nameserver configuration
COPY resolv_conf /etc/resolv.conf.override
RUN cp /etc/resolv.conf.override /etc/resolv.conf
# Using EPEL repo
RUN rpm -ivh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
RUN sed -i 's/enabled=1/enabled=1\nproxy=http:\/\/proxy.POST.co.us:10568/g' /etc/yum.repos.d/epel.repo
RUN sed -i '/failovermethod/d' /etc/yum.repos.d/epel*.repo
RUN yum install -y python39
RUN pip3.9 install anaconda
RUN pip3.9 install jupyter
RUN pip3.9 install jupyterhub
RUN yum install -y dnf
RUN dnf module -y install nodejs:14
RUN npm config set proxy http://proxy.POST.co.us:10568
RUN npm install -g configurable-http-proxy
RUN export PATH=$PATH:/usr/local/bin
# Install OS dependency packages
#RUN yum -y update
RUN yum -y --disableplugin=subscription-manager --enablerepo=ubi-8-appstream --enablerepo=ubi-8-baseos install wget ca-certificates tini sudo
RUN yum clean all
# Create NB_USER with name jovyan user with UID=1000 and in the 'users' group
# and make sure these dirs are writable by the `users` group.
RUN echo "auth requisite pam_deny.so" >> /etc/pam.d/su && \
sed -i.bak -e 's/^%admin/#%admin/' /etc/sudoers && \
sed -i.bak -e 's/^%sudo/#%sudo/' /etc/sudoers && \
useradd -l -m -s /bin/bash -N -u "${NB_UID}" "${NB_USER}" && \
usermod -aG root "${NB_USER}" && \
chown "${NB_USER}:${NB_GID}" "${JUP_DIR}" && \
chmod g+w /etc/passwd && \
fix-permissions "${HOME}" && \
fix-permissions "${JUP_DIR}"
# Copy local files as late as possible to avoid cache busting
COPY start.sh start-notebook.sh start-singleuser.sh startJupyterNotebook.sh /usr/local/bin/
# Create Jupyter Notebook configuration files
RUN jupyter notebook --generate-config
COPY jupyter_notebook_config.py /etc/jupyter/
RUN chmod 777 /etc/jupyter/jupyter_notebook_config.py
RUN echo PATH=$PATH >> /root/.bashrc
EXPOSE 8888
# Configure container startup
ENTRYPOINT ["tini", "-g", "--"]
CMD ["/usr/local/bin/start-singleuser.sh"]
#USER root
start.sh
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -e
# Enable nb extensions and widgets
#jupyter contrib nbextension install
#jupyter nbextension enable --py widgetsnbextension
#jupyter nbextension enable --py --sys-prefix qgrid
#jupyter nbextension enable --py --sys-prefix witwidget
# Restore most recent backup
#/usr/local/ndc/bin/restore_home.py
# Global .gitignore
#git config --global core.excludesfile /usr/local/ndc/.gitignore_global
# Strip output from notebooks
#git config --global filter.jupyter_clear_output.clean 'jupyter nbconvert --stdin --stdout --log-level=ERROR --to notebook --ClearOutputPreprocessor.enabled=True'
#git config --global filter.jupyter_clear_output.smudge cat
#git config --global filter.jupyter_clear_output.required true
#git config --global core.attributesfile /usr/local/ndc/.gitattributes
# Exec the specified command or fall back on bash
if [ $# -eq 0 ]; then
cmd=bash
else
cmd=$*
fi
for f in /usr/local/bin/start-notebook.d/*; do
case "$f" in
*.sh)
echo "$0: running $f"; . "$f"
;;
*)
if [ -x $f ]; then
echo "$0: running $f"
$f
else
echo "$0: ignoring $f"
fi
;;
esac
echo
done
# Handle special flags if we're root
if [ $(id -u) == 0 ] ; then
# Only attempt to change the ndc username if it exists
if id ndc &> /dev/null ; then
echo "Set username to: $NB_USER"
usermod -d /home/$NB_USER -l $NB_USER jovyan
fi
chown -R $NB_UID:$NB_GID /home/$NB_USER
# Handle case where provisioned storage does not have the correct permissions by default
# Ex: default NFS/EFS (no auto-uid/gid)
if [[ "$CHOWN_HOME" == "1" || "$CHOWN_HOME" == 'yes' ]]; then
echo "Changing ownership of /home/$NB_USER to $NB_UID:$NB_GID"
chown $CHOWN_HOME_OPTS $NB_UID:$NB_GID /home/$NB_USER
fi
if [ ! -z "$CHOWN_EXTRA" ]; then
for extra_dir in $(echo $CHOWN_EXTRA | tr ',' ' '); do
chown $CHOWN_EXTRA_OPTS $NB_UID:$NB_GID $extra_dir
done
fi
# handle home and working directory if the username changed
if [[ "$NB_USER" != "jovyan" ]]; then
# changing username, make sure homedir exists
# (it could be mounted, and we shouldn't create it if it already exists)
if [[ ! -e "/home/$NB_USER" ]]; then
echo "Relocating home dir to /home/$NB_USER"
mv /home/jovyan "/home/$NB_USER"
fi
# if workdir is in /home/jovyan, cd to /home/$NB_USER
if [[ "$PWD/" == "/home/jovyan/"* ]]; then
newcwd="/home/$NB_USER/"
echo "Setting CWD to $newcwd"
cd "$newcwd"
fi
fi
# Change UID of NB_USER to NB_UID if it does not match
if [ "$NB_UID" != $(id -u $NB_USER) ] ; then
echo "Set $NB_USER UID to: $NB_UID"
usermod -u $NB_UID $NB_USER
fi
# Change GID of NB_USER to NB_GID if it does not match
if [ "$NB_GID" != $(id -g $NB_USER) ] ; then
echo "Set $NB_USER GID to: $NB_GID"
groupmod -g $NB_GID -o $(id -g -n $NB_USER)
fi
# Enable sudo if requested
if [[ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]]; then
echo "Granting $NB_USER sudo access and appending /usr/local/bin to sudo PATH"
echo "$NB_USER ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/notebook
fi
PYTHONPATH="/usr/bin"
# Exec the command as NB_USER with the PATH and the rest of
# the environment preserved
echo "Executing the command: $cmd"
exec /usr/bin/sudo --preserve-env --set-home -E -H -u $NB_USER PATH=$PATH HTTP_PROXY=$HTTP_PROXY HTTPS_PROXY=$HTTP_PROXY PYTHONPATH=$PYTHONPATH $cmd
else
if [[ "$NB_UID" == "$(id -u jovyan)" && "$NB_GID" == "$(id -g jovyan)" ]]; then
# User is not attempting to override user/group via environment
# variables, but they could still have overridden the uid/gid that
# container runs as. Check that the user has an entry in the passwd
# file and if not add an entry. Also add a group file entry if the
# uid has its own distinct group but there is no entry.
whoami &> /dev/null || STATUS=$? && true
if [[ "$STATUS" != "0" ]]; then
if [[ -w /etc/passwd ]]; then
echo "Adding passwd file entry for $(id -u)"
cat /etc/passwd | sed -e "s/^ndc:/nayvoj:/" > /tmp/passwd
echo "jovyan:x:$(id -u):$(id -g):,,,:/home/jovyan:/bin/bash" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
id -G -n 2>/dev/null | grep -q -w $(id -u) || STATUS=$? && true
if [[ "$STATUS" != "0" && "$(id -g)" == "0" ]]; then
echo "Adding group file entry for $(id -u)"
echo "jovyan:x:$(id -u):" >> /etc/group
fi
else
echo 'Container must be run with group root to update passwd file'
fi
fi
# Warn if the user isn't going to be able to write files to $HOME.
if [[ ! -w /home/jovyan ]]; then
echo 'Container must be run with group users to update files'
fi
else
# Warn if looks like user want to override uid/gid but hasn't
# run the container as root.
if [[ ! -z "$NB_UID" && "$NB_UID" != "$(id -u)" ]]; then
echo 'Container must be run as root to set $NB_UID'
fi
if [[ ! -z "$NB_GID" && "$NB_GID" != "$(id -g)" ]]; then
echo 'Container must be run as root to set $NB_GID'
fi
fi
# Warn if looks like user want to run in sudo mode but hasn't run
# the container as root.
if [[ "$GRANT_SUDO" == "1" || "$GRANT_SUDO" == 'yes' ]]; then
echo 'Container must be run as root to grant sudo permissions'
fi
# Execute the command
echo "Executing the command: $cmd"
exec $cmd
fi
start-notebook.sh
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
#set -e
echo JUPYTERHUB_API_TOKEN is ${JUPYTERHUB_API_TOKEN}
#echo RESTARTABLE is ${RESTARTABLE}
#echo JUPYTER_ENABLE_LAB is ${JUPYTER_ENABLE_LAB}
echo NOTEBOOK_ARGS is ${NOTEBOOK_ARGS}
echo JUPYTERHUB_SERVICE_PREFIX is ${JUPYTERHUB_SERVICE_PREFIX}
echo JUPYTERHUB_BASE_URL is ${JUPYTERHUB_BASE_URL}
echo JUPYTERHUB_API_URL is ${JUPYTERHUB_API_URL}
echo PATH is ${PATH}
ls -l /usr/local/bin
whoami
if [[ -n "${JUPYTERHUB_API_TOKEN}" ]]; then
echo "WARNING: using start-singleuser.sh instead of start-notebook.sh to start a server associated with JupyterHub."
exec start-singleuser.sh "$@"
fi
wrapper=""
if [[ "${RESTARTABLE}" == "yes" ]]; then
wrapper="run-one-constantly"
fi
if [[ -n "${JUPYTER_ENABLE_LAB}" ]]; then
# shellcheck disable=SC1091,SC2086
exec /usr/local/bin/start.sh ${wrapper} jupyter lab ${NOTEBOOK_ARGS} "$@"
else
echo "WARNING: Jupyter Notebook deprecation notice update https://github.com/jupyter/docker-stacks#jupyter-notebook-deprecation-notice."
# shellcheck disable=SC1091,SC2086
exec /usr/local/bin/start.sh ${wrapper} jupyter notebook ${NOTEBOOK_ARGS} "$@"
fi
start-singleuser.sh
#!/bin/bash
# Copyright (c) Jupyter Development Team.
# Distributed under the terms of the Modified BSD License.
set -e
if [ ! -z "$JUPYTERHUB_USER" ]; then
NOTEBOOK_ARGS="--user=$JUPYTERHUB_USER $NOTEBOOK_ARGS"
fi
if [ ! -z "$JUPYTERHUB_BASE_URL" ]; then
NOTEBOOK_ARGS="--base-url=$JUPYTERHUB_BASE_URL $NOTEBOOK_ARGS"
fi
if [ ! -z "$JUPYTERHUB_SERVICE_PREFIX" ]; then
NOTEBOOK_ARGS="--hub-prefix=$JUPYTERHUB_SERVICE_PREFIX $NOTEBOOK_ARGS"
fi
if [ ! -z "$JUPYTERHUB_API_URL" ]; then
NOTEBOOK_ARGS="--hub-api-url=$JUPYTERHUB_API_URL $NOTEBOOK_ARGS"
fi
# set default ip to 0.0.0.0
if [[ "${NOTEBOOK_ARGS} $*" != *"--ip="* ]]; then
NOTEBOOK_ARGS="--ip=0.0.0.0 ${NOTEBOOK_ARGS}"
fi
echo $PATH
echo $JUPYTERHUB_API_URL is JUPYTERHUB_API_URL
echo $NOTEBOOK_ARGS
# shellcheck disable=SC1091,SC2086
. /usr/local/bin/start.sh /usr/local/bin/jupyterhub-singleuser ${NOTEBOOK_ARGS} "$@"
I hope I have provided the details you would need
Hi there, Is there any update for me on this?
Hi, your hub logs don’t show any redirects. Have you truncated them?
Hi there,
After incorporating the suggested changes, the error message which I see is different - no longer redirects.
Its page not found - I havent truncated the logs.
Cheers.
Hi! I’m afraid this is a bit confusing now. Are the logs you’ve posted above the latest logs? When exactly are you seeing the “page not found” errors? What URL is shown in your browser when you get that error?
Hi there,
It is the 22nd message above - which begins with Part 2 - shows the exact place where the error occurs.
Yes that was the latest log since I made the changes you had suggested.
Cheers.
Hello Meenaincloud
is possible to help me to send me your Email or whatsappa , I want to set up Jupyter hosted ECS EC2 launch type on AWS so I want to give me some advices about my work