I am trying to set up JupyterHub on an RHEL7 VM
, with a Kubernetes cluster of a master and a worker node. After following the steps to set up JupyterHub on a Kubernetes cluster from https://zero-to-jupyterhub.readthedocs.io, the "hub" pod is stuck in a CrashLoopBackOff state while the other two pods are "Running":
kubectl get pods -n jhub
Logs of the hub pod:
kubectl logs hub-dccf64b6d-w4nl8 -n jhub Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/jupyterhub/app.py", line 1620, in launch_instance_async yield self.initialize(argv) File "/usr/lib/python3.6/types.py", line 204, in next return next(self.wrapped) File "/usr/local/lib/python3.6/dist-packages/jupyterhub/app.py", line 1373, in initialize self.init_db() File "/usr/local/lib/python3.6/dist-packages/jupyterhub/app.py", line 888, in init_db dbutil.upgrade_if_needed(self.db_url, log=self.log) File "/usr/local/lib/python3.6/dist-packages/jupyterhub/dbutil.py", line 118, in upgrade_if_needed orm.check_db_revision(engine) File "/usr/local/lib/python3.6/dist-packages/jupyterhub/orm.py", line 462, in check_db_revision current_table_names = set(engine.table_names()) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 2136, in table_names with self._optional_conn_ctx_manager(connection) as conn: File "/usr/lib/python3.6/contextlib.py", line 81, in __enter return next(self.gen) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1932, in _optional_conn_ctx_manager with self.contextual_connect() as conn: File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 2123, in contextual_connect self._wrap_pool_connect(self.pool.connect, None), File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 2162, in _wrap_pool_connect e, dialect, self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 1476, in _handle_dbapi_exception_noconnection exc_info File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/util/compat.py", line 186, in reraise raise value.with_traceback(tb) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/base.py", line 2158, in _wrap_pool_connect return fn() File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 403, in connect return _ConnectionFairy._checkout(self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 782, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 532, in checkout rec = pool._do_get() File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 1277, in _do_get return self._create_connection() File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 350, in _create_connection return _ConnectionRecord(self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 477, in init self.__connect(first_connect_check=True) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/pool.py", line 667, in __connect connection = pool._invoke_creator(self) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/strategies.py", line 105, in connect return dialect.connect(*cargs, **cparams) File "/usr/local/lib/python3.6/dist-packages/sqlalchemy/engine/default.py", line 410, in connect return self.dbapi.connect(*cargs, **cparams) sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) unable to open database file (Background on this error at: http://sqlalche.me/e/e3q8)
Contents of config.yaml:
proxy:
secretToken: "abcd"
hub:
cookieSecret: "abcd"
storage:
dynamic:
storageClass: standard
Am unable to proceed with the setup unless all the pods are in the "Running" state. Any ideas?