Failed to start the kernel

Chiktika
Chiktika Registered Posts: 24 ✭✭✭✭

Hi,

I was working on a notebook and needed to restart the kernel.

But the kernel never restarted and crashed with this error.

Could you help me to understand why and what can I do now ?

With many thanks.

Traceback (most recent call last):
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/web.py", line 1592, in _execute
    result = yield result
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/gen.py", line 1141, in run
    yielded = self.gen.throw(*exc_info)
  File "/home/dataiku/dataiku-dss-8.0.2/dku-jupyter/packages/notebook/services/sessions/handlers.py", line 81, in post
    user=self.get_current_user(),
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/gen.py", line 1133, in run
    value = future.result()
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/concurrent.py", line 261, in result
    raise_exc_info(self._exc_info)
  File "/home/dataiku/dataiku-dss-8.0.2/python.packages/tornado/gen.py", line 326, in wrapper
    yielded = next(result)
  File "/home/dataiku/dataiku-dss-8.0.2/dku-jupyter/packages/notebook/dataiku/sessionmanager.py", line 55, in create_session
    kernel_context = self.new_kernel_context(head, tail, user, session_id)
  File "/home/dataiku/dataiku-dss-8.0.2/dku-jupyter/packages/notebook/dataiku/sessionmanager.py", line 32, in new_kernel_context
    "sessionId" : session_id
  File "/home/dataiku/dataiku-dss-8.0.2/dku-jupyter/packages/notebook/dataiku/__init__.py", line 27, in pintercom_json_post
    raise Exception("Failed privileged call (%s): %s" % (path, _get_error_message(err_data).encode("utf8")))
Exception: Failed privileged call (jupyter/new-kernel-context): Incorrect path: /home/dataiku/dss_data/config/projects

Best Answer

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker
    Answer ✓

    it's likely that in the project containing this notebook, the external-libraries.json settings are incorrect (in the Libraries section, from the menubar). You should make sure the importLibrariesFromProjects field doesn't contain empty or null strings, are project keys and not project names, and that the projects referred to still exist

Answers

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker

    this error is only what appears in the jupyter side of things, the actual error and stacktrace is in the backend.log of DSS. You can find it in /home/dataiku/dss_data/run, or via the Administration section in DSS

  • Chiktika
    Chiktika Registered Posts: 24 ✭✭✭✭
    edited July 17

    Hi @fchataigner2
    , thanks for your answer, here is an extract of backend log.

    [2020/09/28-13:46:59.009] [qtp738174829-15] [DEBUG] [dku.tracing]  - [ct: 19] Done call: /api/pintercom/jupyter/new-kernel-context [POST] time=19ms user=none [projectKey=CHURN_PREDICTION notebookId=CHURN analysis.ipynb user=elodie sessionId=elodie__DKU__4b2ef43e-ad75-4f3f-827d-b8d0b836dbf5] thrown=IllegalArgumentException
    [2020/09/28-13:46:59.010] [qtp738174829-15] [ERROR] [dip.controllers]  - API call '/dip/api/pintercom/jupyter/new-kernel-context' failed
    java.lang.IllegalArgumentException: Incorrect path: /home/dataiku/dss_data/config/projects
        at com.dataiku.dip.utils.DKUFileUtils.getWithin(DKUFileUtils.java:392)
        at com.dataiku.dip.utils.DKUFileUtils.getWithin(DKUFileUtils.java:376)
        at com.dataiku.dip.DKUApp.getFile(DKUApp.java:134)
        at com.dataiku.dip.dataflow.exec.EnvironmentStash.fillProjectLibsForNonJob(EnvironmentStash.java:247)
        at com.dataiku.dip.notebooks.JupyterSecurityService.createContext(JupyterSecurityService.java:182)
        at com.dataiku.dip.server.intercom.p.JupyterIntercomController.newKernelContext(JupyterIntercomController.java:180)
        at com.dataiku.dip.server.intercom.p.JupyterIntercomController$$FastClassBySpringCGLIB$$b816145d.invoke(<generated>)
        at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
        at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:701)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at com.dataiku.dip.server.controllers.AuditedCallAspect.doCall(AuditedCallAspect.java:62)
        at jdk.internal.reflect.GeneratedMethodAccessor27.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.aspectj.MethodInvocationProceedingJoinPoint.proceed(MethodInvocationProceedingJoinPoint.java:80)
        at com.dataiku.dip.server.controllers.CallTracingAspect.doCall(CallTracingAspect.java:78)
        at jdk.internal.reflect.GeneratedMethodAccessor24.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethodWithGivenArgs(AbstractAspectJAdvice.java:621)
        at org.springframework.aop.aspectj.AbstractAspectJAdvice.invokeAdviceMethod(AbstractAspectJAdvice.java:610)
        at org.springframework.aop.aspectj.AspectJAroundAdvice.invoke(AspectJAroundAdvice.java:65)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
        at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:91)
        at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
        at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:633)
        at com.dataiku.dip.server.intercom.p.JupyterIntercomController$$EnhancerBySpringCGLIB$$177121ac.newKernelContext(<generated>)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:221)
        at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
        at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:743)
        at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:672)
        at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:82)
        at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:933)
        at com.dataiku.dip.server.controllers.DKUDispatcherServlet.doDispatch(DKUDispatcherServlet.java:50)
        at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:867)
        at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:951)
        at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:853)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)
        at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:827)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
        at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:812)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1669)
        at com.dataiku.dip.shaker.server.ResourceFilter.doFilter(ResourceFilter.java:33)
        at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
        at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
        at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
        at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
        at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
        at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
        at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
        at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
        at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
        at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
        at org.eclipse.jetty.server.Server.handle(Server.java:499)
        at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:311)
        at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:258)
        at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:544)
        at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
        at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
        at java.base/java.lang.Thread.run(Thread.java:834)

  • Chiktika
    Chiktika Registered Posts: 24 ✭✭✭✭
    edited July 17

    Nooo it's so simple as that!

    My bad, what a silly error from me, you're right, this cause the crash.

    "importLibrariesFromProjects": [
    ""
    ]

    Many many thanks for your quick answer.

    Wish you a greay day!

  • natarpra
    natarpra Registered Posts: 1 ✭✭✭

    Hi,

    I was facing the same issue as well, navigated to my external-libraries.json file, and found a null string there. Could you elaborate more on what is a "project key" and how do I find out what this is is, so that I can fix my .json file?

  • fchataigner2
    fchataigner2 Dataiker Posts: 355 Dataiker

    Hi

    projects in DSS have a name that you see in the UI, but also an identifier that we refer to as "project key". It's the name of the actual folder containing the project's files on disk. In your browser, you can see the projectKey in the location bar when you're on some page inside the project. It's usually a uppercase-no-whitespace version of the project name

Setup Info
    Tags
      Help me…