cancel
Showing results for 
Search instead for 
Did you mean: 

Jupyter labs notebook kernel died error and restarting on pyodbc connect

jyothiraghav_jinka
Participant
0 Kudos

Hi

I am trying to use Jupyter lab notebook on DIC to connect to the Data Lake Relational engine using pyodbc.

On Jupyter notebook I tried to execute the cell containing statement pyodbc.connect, the kernel dies and restarts.

Just to check if the notebook kernel is able to identify the dsn, I tried giving a wrong dsn and it was immediately giving an error "[unixODBC][Driver Manager]Data source name not found".

Also I checked the same by launching the terminal and executed the connection via a .py file which works.

I also tried executing the statements on ipython from the terminal window and again it works.

So I am trying to understand why the jupyter notebook terminal keeps dying. I also checked the odbc log but there were no entries. I tried few blogs which mentioned on the locale setting to UTF but still did not work.

Please assist.

Thanks
Raghav

Accepted Solutions (0)

Answers (2)

Answers (2)

jimgiffin
Product and Topic Expert
Product and Topic Expert
0 Kudos

Interesting that it works in the terminal and not the notebook. I would raise an incident to CA-DI-OPS to have support take a closer look at the difference between the notebook and terminal.

One random item to check - Did you restart Axino along the way too? Perhaps the connection was cached.

jyothiraghav_jinka
Participant
0 Kudos

Hi James

Tried restarting the Axino and also all the services(just in case) but the same issue persists.

But this time I have started to get issues on command line as well and now the error read "segmentation fault (core dumped)".

Going through some blogs - this refers to some bug on the python libraries or incompatibility -- Please let me know if you had this issue resolved before.

I will also raise a ticket and comeback in case this gets resolved.

Cheers
Raghav

jimgiffin
Product and Topic Expert
Product and Topic Expert
0 Kudos

You might need to increase the default memory and cpu settings in the tenant for Jupyter. Check the System Management tile, on the far right, click the icon for application secrets and configuration and then search for Jupyter and you'll see a lot of default settings that you can try to adjust and retest your notebook. You may have to restart the Jupyter service for the new settings to be read.

jyothiraghav_jinka
Participant
0 Kudos

Hi James

I tried adjusting the below parameters but still same issue:

Jupyter Resources CPU (Limit): 0.5 -> 1 -> 2 -> 4

Jupyter Resources Memory (Limit): 2Gi -> 4Gi -> 4G

Jupyter Resources CPU (Requests): 0.1 -> 0.5 -> 1 -> 4

Jupyter Resources Memory (Request): 0.1Gi -> 2Gi -> 2G

For every change, I had restarted the services -> Jupyter Lab and Core application

My notebook has only 2 statements now in individual cells:

import pyodbc

conn = pyodbc.connect(uid='HDLADMIN',pwd='*******',dsn='HC_DL')

The issue occurs when I execute the pyodbc statement

The same works fine when executing from the terminal window of the same Jupyter lab either by py file or in ipython command line.

Please let me know your thoughts.

Thanks
Raghav