Hi Robert,
Thanks again for your reply.
And many thanks for the commando's I can use for (future) issue tracing :-)
Followed your tips and I found something in the log file what could be the issue ?
->
Blocking Cross Origin API request for .... <-
SingleUserNotebookApp handlers:480] Blocking Cross Origin API request for /bi/v1/jupyter/user/xTERBUDp1OnVpZD1jZmJvcyxvdT1wZW9wbGU_/api/sessions. Origin:
http://[Cognos Server]:[port], Host: IBM-JUPSRV2-DEMO:8000
Searched on the internet and found some posts (
https://github.com/twosigma/beakerx/issues/1963) within the Python world.
In this post a person was trying with another browser (FireFox) and there he faced not this error.
When I use FireFox, I also don't get this error, so looks like it's brwoser related ?
So when I use Chroom, I see this error in de log file.
When I use FireFox, I don't see this error in the log file.
Before testing I did use the prune.sh / stop.sh / startup.sh scripts making sure it's a fresh log.
1) Do you agree this could be my issue ?
2) And do you have a direction how I can solve this so it works also with Chroom ?
Kind Regards,
------------------------------
Chris Bos
------------------------------
Original Message:
Sent: Mon January 06, 2020 09:13 AM
From: ROBERT MCAULEY
Subject: Jupyter Notebook Kernel not found
Hi Chris,
Let's take a look at the Docker logs to see what went wrong with your kernel :-)
This is what you'd need:
1) Start a new notebook in Cognos
2) On CentOS: docker ps -a (so you can find the name of your running notebook container - it should look like ca_jupyter-<some alpha-numeric string>)
3) On CentOS: docker logs <name of your running notebook container>
This will give you the logs of your currently running notebook. If there's a kernel error, my bet is there will be an error message there.
I tried reproducing your issue in my own environment, but I wasn't able to unfortunately. Would you be able to share the exact version of the jupyter notebook kit that you installed? I would like to take a closer look.
As for getting the version of your kernel, you can check the ipykernel package version using:
1) on CentOS: docker ps -a (to get the name of your notebook container once again - it should look like ca_jupyter-<some alpha-numeric string>)
2) on CentOS: docker exec -it <name of your container> bash
3) Within the docker container now: conda list | grep ipykernel
As for getting the list of your running kernels, unfortunately there isn't a command that allows you to do that as the kernels are managed internally by the notebook.
Regards,
Rob
------------------------------
ROBERT MCAULEY
------------------------------
Original Message:
Sent: Thu January 02, 2020 05:05 PM
From: Chris Bos
Subject: Jupyter Notebook Kernel not found
Hi Robert,
Thanks for the hints.
1: Using the FQDN or the IP gives me the same result. I am able to ping on FQDN and IP from and to the Cognos Server and/or Jupyter Server.
2: Modified the config.conf $(hostname) from HOST_NAME to IP and did a uninstall / install, startup with the same result.
(right now I am back on the default setting HOST_NAME and not the IP)
3: I think Python is running in Docker (see att)
Question:
1: how can I check the kernel, running and version ?
2: from Cognos you can restart the Kernel, it looks nothing happens, but can I look in a log file what's going on when restarting?
Can't see anything in the Cognos log files, but perhaps I should look into some Jupyter logfiles on my CentOS ?
3: where am I looking for when investergate the docker logs as you mentioned ?
Kind Regards,
------------------------------
Chris Bos
Original Message:
Sent: Thu January 02, 2020 02:08 PM
From: ROBERT MCAULEY
Subject: Jupyter Notebook Kernel not found
Hi Chris,
Thanks for all the info above. Everything looks like it's in good condition.
Two things I noticed:
1) You're using IP addresses to communicate between jupyter and Cognos, but the websocket request (that starts the python 3 kernel connection) is using your Centos' hostname. Do you think that may pose a problem? I would try pinging the jupyter server from Cognos using the Centos hostname, just to make sure the hostname is reachable :-)
If it isn't, feel free to modify the config.conf file in your jupyter installation directory to use the IP address of the jupyter server instead of the $(hostname) variable. Don't forget to rebuild the server once you make that change.
2) In your above post you tried python3 --version on your Centos machine I imagine, but you'd need to verify that python 3 is running in the docker container itself. Once you open a new notebook, it should spawn the docker container. Verify that python 3 is running by doing:
docker ps -a (this will let you see the name of the newly spawned container)
docker exec -it <name of container> bash
python --version (or python3 --version, I'm not sure which will work)
If you're still running into issues, let's take a look at the docker logs. There could be something interesting in there :-)
Regards,
Rob
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Thu January 02, 2020 04:24 AM
From: Chris Bos
Subject: Jupyter Notebook Kernel not found
Hi Robert,
Sorry, but sometimes Google is giving the wrong answer.....
There is a Python 3.6.5 version running on my system.
(python3 -- version)
------------------------------
Chris Bos
Original Message:
Sent: Wed January 01, 2020 10:51 AM
From: Chris Bos
Subject: Jupyter Notebook Kernel not found
Hi Robert,
Don't worry, it was Christmas / New Year time, so I wasn't expected any fast response :-).
I have done some more investergation and I think Cognos is expecting the Python-3, but I can't see it's running or available.
1 - Right now I don't have a Gateway installed.
2 - Right now I use a IP address, not a FQDN in Cognos Environment (http://<IP>:8000)
3 - In my config.conf on my Jupyter CentOS environment, the setting is set to $(hostname)
4 - Command Hostname is giving me the right hostname of my Jupyter hostname
From my Cognos Analytics environment I am able to ping to my Jupyter environment.
From my Jupyter environment, I am able to pint to my Cognos Analytics environment.
-- so, not firewall issue there --
I am new with Docker / Python, but I think my issue is that Cognos expect an running Python-3 and I can't see that version running on my Jupyter right now.
I stared with a clean fresh CentOS 7.6.
Installed Docker-CE
Tested it's running
Did a [ python --version ] and Python 2.7.5 was running.
In all the 'kernel.json' files I see reference to a Python-3 , but I can't see where or how it's running / installed.
Perhaps, this is my issue ?
I can install Python-3, but I don't know if Cognos Jupyter works with a 'default' installation of Python.
docker inspect <ID> | grep IP
docker inspect <ID> | grep HOST
docker inspect <ID> | grep Port
All gives me the expected information of my environment, so I don't think this is the issue.
When I look into the kernel.json:
kernel.json:
{
"argv": [
"/opt/anaconda3/bin/python",
"-m",
"ipykernel_launcher",
"-f",
"{connection_file}"
],
"display_name": "Python 3",
"language": "python"
But my /opt:
drwx--x--x. 4 root root 28 Dec 29 04:24 containerd
drwxrwxr-x. 3 root root 20 Dec 29 04:33 ibm
drwxr-xr-x. 2 root root 6 Oct 30 2018 rh
Any hints how and what I can test with the Python-3 is weolcome.
Kind Regards,
------------------------------
Chris Bos
Original Message:
Sent: Mon December 30, 2019 11:28 AM
From: ROBERT MCAULEY
Subject: Jupyter Notebook Kernel not found
Hi Chris,
sorry for the late reply!
It would be concerning if the installation didn't succeeed somehow. With kernel errors, the root cause is typically a misconfiguration of the cognos config, the jupyter server, or the gateway.
Do you have a gateway in front of Cognos by any chance?
In your cognos config under environment, are the URLs fully qualified domain names?
In your jupyter installation directory in config.conf, is the HOST_NAME variable set to $(hostname)?
If you run the "hostname" command on your centos machine, does it return the fully qualified domain name of the machine?
Regards,
Rob
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Sun December 29, 2019 05:21 AM
From: Chris Bos
Subject: Jupyter Notebook Kernel not found
Hi All,
I think I found my issue.
Looking at the kernel.json setting it looking for some software located at /opt/anaconda3/bin/python but it's not there.
So I think my Installation went wrong....
I will continue with this and will post the outcome to you.
Kind Regards,
------------------------------
Chris Bos