Hi Robert, thanks for answering. We do not have a gateway installed. We normally are behind NginX (which does the https to http translation) and F5 (which does the load balancing). Today I did a new test using a direct connection to a dispatcher from a Windows server in the datacenter to make sure to bypass the NginX and loadbalancer. I saw some anomolies:
First I noticed this interesting message in the first line of the ca_jupyter_hub docker log:
/opt/conda/lib/python3.6/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.25.3) or chardet (3.0.4) doesn't match a supported version!
Second I noticed this in the Jupyter_service_instance.log (which is created automatically when you start a new notebook from Cognos):
Container must be run with group "root" to update passwd file
Executing the command: jupyterhub-singleuser --ip=0.0.0.0
[W 2019-10-29 09:34:40.929 SingleUserNotebookApp configurable:168] Config option `open_browser` not recognized by `SingleUserNotebookApp`. Did you mean `browser`?
[W 2019-10-29 09:34:40.932 SingleUserNotebookApp configurable:168] Config option `token` not recognized by `SingleUserNotebookApp`.
[I 2019-10-29 09:34:41.140 SingleUserNotebookApp extension:59] JupyterLab extension loaded from /opt/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 2019-10-29 09:34:41.140 SingleUserNotebookApp extension:60] JupyterLab application directory is /opt/anaconda3/share/jupyter/lab
[I 2019-10-29 09:34:41.183 SingleUserNotebookApp notebookapp:1590] Will shut down after 5400 seconds with no kernels or terminals.
[I 2019-10-29 09:34:41.184 SingleUserNotebookApp singleuser:404] Starting jupyterhub-singleuser server version 0.9.4
[I 2019-10-29 09:34:41.192 SingleUserNotebookApp notebookapp:1685] Serving contents
[I 2019-10-29 09:34:41.192 SingleUserNotebookApp notebookapp:1685] The Jupyter Notebook is running at:
[I 2019-10-29 09:34:41.192 SingleUserNotebookApp notebookapp:1685]
http://(339654d9c547 or 127.0.0.1):8888/bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/
[I 2019-10-29 09:34:41.192 SingleUserNotebookApp notebookapp:1686] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[I 2019-10-29 09:34:41.399 SingleUserNotebookApp log:158] 302 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/ -> /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/caNotebookInfo? (@172.19.0.3) 0.85ms
[I 2019-10-29 09:34:41.605 SingleUserNotebookApp log:158] 302 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/caload/notebooks/new?kernel_name=python3&trust=jupyter&redirects=1 -> /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/notebooks/new?kernel_name=python3 (@10.192.37.217) 146.98ms
[I 2019-10-29 09:34:41.726 SingleUserNotebookApp log:158] 302 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/notebooks/new?kernel_name=python3 -> /bi/v1/jupyter/hub/api/oauth2/authorize?client_id=jupyterhub-user-xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_&redirect_uri=%2Fbi%2Fv1%2Fjupyter%2Fuser%2FxQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_%2Foauth_callback&response_type=code&state=[secret] (@10.192.37.217) 2.04ms
[I 2019-10-29 09:34:42.067 SingleUserNotebookApp auth:993] Logged-in user {'kind': 'user', 'name': 'xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_', 'admin': False, 'groups': [], 'server': '/bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/', 'pending': None, 'created': '2019-10-29T09:34:39.807037Z', 'last_activity': '2019-10-29T09:34:42.060530Z', 'servers': None}
[I 2019-10-29 09:34:42.068 SingleUserNotebookApp log:158] 302 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/oauth_callback?code=[secret]&state=[secret] -> /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/notebooks/new?kernel_name=python3 (@10.192.37.217) 52.33ms
[I 2019-10-29 09:34:42.507 SingleUserNotebookApp log:158] 200 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/notebooks/new?kernel_name=python3 (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 330.53ms
[I 2019-10-29 09:34:43.879 SingleUserNotebookApp log:158] 200 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/config/common?_=1572341683672 (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 2.57ms
[I 2019-10-29 09:34:43.882 SingleUserNotebookApp log:158] 200 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/config/notebook?_=1572341683671 (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 2.28ms
[I 2019-10-29 09:34:44.184 SingleUserNotebookApp log:158] 200 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/contents/new?type=notebook&_=1572341683673 (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 2.29ms
[I 2019-10-29 09:34:45.090 SingleUserNotebookApp log:158] 200 GET /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/contents/new1/checkpoints?_=1572341683674 (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 1.20ms
[I 2019-10-29 09:34:45.724 SingleUserNotebookApp kernelmanager:164] Kernel started: 796308de-d211-4130-8edd-a842759841d1
[I 2019-10-29 09:34:45.725 SingleUserNotebookApp log:158] 201 POST /bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/sessions (
xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_@10.192.37.217) 28.58ms
Looks like a configuration issue? Hopefully one of you has seen this before? :-)
Kind regards,
Matthijs
------------------------------
Analytical Engine
------------------------------
Original Message:
Sent: Fri October 25, 2019 01:45 PM
From: ROBERT MCAULEY
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Matthijs,
Do you have a gateway in place by any chance? If so, a rewrite rule will be needed on that gateway to allow the websocket connection to be redirected to the appropriate place.
If you've got an apache 2.4 gateway, take a look at section 4 of the following:
https://www.ibm.com/support/knowledgecenter/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.inst_cr_winux.doc/t_config_ish_with_ssl.html#task_d1m_35h_x1b__apache_gateway_step
If you've got an IIS gateway, take a look at section 6 d) of the following:
https://www.ibm.com/support/knowledgecenter/en/SSEP7J_11.1.0/com.ibm.swg.ba.cognos.inst_cr_winux.doc/t_gateway_iis.html
If there's no gateway in place, we may have to investigate why the websocket connection from the browser cannot reach the jupyter server.
Let me know if this helps,
Rob
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Fri October 25, 2019 11:38 AM
From: Analytical Engine
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi all, a few months have passed and I gave it some rest. I recently picked this up again. We now have in our DEV environment a Cognos 11.1.4 setup with a dedicated Jupyter notebook server configured at port 8081.
When I start a new notebook from Cognos it opens the Jupyter notebook screen with the yellow "connecting to kernel" message in de top pane on the right. However then it fails with the message A connection to the notebook server could not be established. The notebook will continue trying to reconnect. Check your network connectino or notebook server configuration [OK]
When I click ok and press F12 in te browser to see the console log it says: SCRIPT12031: WebSocket Error: Network Error 12031, The connection with the server was reset
And it also says: WebSocket connection failed: ws://xxxxxxxxxxx.net:8081/bi/v1/jupyter/user/xQ29nbm9zOnU6dWlkPWxjMjl2aixvdT1wZW9wbGU_/api/kernels/a49f1ab2-56b1-4655-b636-f41e31f4f72c true
--> were xxxxxxxxxxx.net of course resembles my fully qualified hostname in reality.
When I do docker logs <container-id> it does not show me any hint of what can be the issue. In this DEV environment I connect from a Citrix server directly with http to a dispatcher because http from our workstation to a datacenter server is not allowed.
What can be the issue here?
Kind regards,
Matthijs
------------------------------
Analytical Engine
Original Message:
Sent: Thu August 15, 2019 04:01 AM
From: ANTONIO MARZIANO
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Error message:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='rcianalytics', port=9300): Max retries exceeded with url: /bi/v1/me (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x7fed0c9c3048>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution',))
You're using an internal ip address 172.19.0.3 so check if that is reachable from the CA server. You can check on the Jupyter server by running 'ip a' for multiple ip addresses.
Fix that and then restart Jupyter by executing /cognos/Jupyter/dist/scripts/unix/ ./stop.sh | ./start.sh
------------------------------
ANTONIO MARZIANO
Original Message:
Sent: Fri August 09, 2019 10:59 AM
From: ROBERT MCAULEY
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hey Matthijs,
The way the jupyter server knows where Cognos is running is by reading the "Dispatcher URI for external applications" environment variable which can be found in your Cognos Config. It sounds like you have a pretty tricky environment, but try playing around with that environment variable. You'd want to make sure that the protcol, domain, and port are all correct.
let me know if you have any luck, and maybe we could further diagnose the issue by looking at your jupyter docker logs.
Rob
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Fri August 09, 2019 09:01 AM
From: Analytical Engine
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi,
I have exactly the same error when I enter the ip-address of my Virtualbox Linux machine running Jupyter.
Somehow it is connecting because it shows a Jupyter logo in my Windows browser. I understand that communication should be done from Cognos itself as it is not a standalone server. But I do not expect this error.
500 : Internal Server Error
Configuration Error: CA Host info is missing. Contact CAAdministrator
I have a Oracle Virtual Box server with CentOS7 installed with docker and IBM Jupyter notbook server.
In Virtual Box I use port forwarding to my CentOS host.
From my DEV environment running Cognos 11.1.3 I'am able to reach the Virtual Box on the laptop (forwarded SSH and port 8000).
Do I have to configure something on the Jupyter server? For example I'am asking myself how does the Jupyter know where Cognos is running?
Rergards,
Matthijs
------------------------------
Analytical Engine
Original Message:
Sent: Thu August 01, 2019 02:48 PM
From: ROBERT MCAULEY
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Paulo,
Judging from the logs it looks like the Jupyter Server cannot reach your CA server over the network.
The first thing to do is to verify if "rcianalytics" is the correct hostname for the CA server.
If it is not, you would have to correct it by going to the Cognos Configuration and updating the environment variable called:
"dispatcher URL for external applications". Once this is corrected, close your existing notebooks and try opening a new one.
If the hostname is indeed correct, there might be a network issue. There are a few things you could try doing to diagnose the problem:
1) Ping the Cognos host from your Jupyter Server ubuntu host
command: ping rcianalytics
2) Ping the Cognos host from within the Jupyter Hub docker container
commands:
docker exec -it -u 0 ca_jupyter_hub bash
apt-get install iputils-ping
ping rcianalytics
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Wed July 31, 2019 01:28 PM
From: Paulo Klein
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Here the log files.
------------------------------
Paulo Klein
Original Message:
Sent: Wed July 31, 2019 01:24 PM
From: Paulo Klein
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hello @ANTONIO MARZIANO
Thanks for your quickly response.
We did the steps mentioned with nos success.
In attached the log file and some screenshot.
Any advice are welcome.
------------------------------
Paulo Klein
Original Message:
Sent: Wed July 31, 2019 09:32 AM
From: ANTONIO MARZIANO
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Paulo
Try the following:
1. In your Ubuntu OS, run apt-get update -y
2. opt/IBM/cognos/Jupyter/dist/scripts/unix/uninstall.sh
3. opt/IBM/cognos/Jupyter/dist/scripts/unix/prune.sh
4. opt/IBM/cognos/Jupyter/dist/scripts/unix/install.sh
Then check the container ip address:
docker inspect ca_jupyter_hub | grep IPA
Grab the ip address and then add that to the CA - Manage - Configuration - System - Environment
http://<internalIPA>:8000
You might need to come out and back in again before testing notebook.
If that doesn't work, then capture the logs output:
docker logs ca_jupyter_hub > Jupyter.log
attach or look for any errors.
------------------------------
ANTONIO MARZIANO
Original Message:
Sent: Wed July 31, 2019 09:20 AM
From: Paulo Klein
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hello,
I'm in the same issue here.
I create a fresh install of CA on a new environment (ubuntu 16.04) and install a docker (all on the same sarver).
I'm getting the same error.
Any advice are welcome.
------------------------------
Paulo Klein
Original Message:
Sent: Fri June 14, 2019 10:44 AM
From: Chris Bos
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
.... it's working ....
------------------------------
Chris Bos
Original Message:
Sent: Fri June 14, 2019 10:42 AM
From: Chris Bos
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi All,
No.... or Yes!!
It's solved, right now I don't get an error anymore, that's good.
What's not good is I don't know what the issue was.
I de-installed My Docker / Jupyter.
Did a yum update
I reinstalled my Docker / Jupyter.
Installed telnet (for testing my ports, so it is not firewall issue)
Rebooted my Jupyter Server
For now, I am happy it working.
Thank you all for helping me and ......
I still want to know what the trigger is, so I will create a new Jupyter Server next to this one, but will do that when I have time to spare :-)
First I would like to get some expertise with Cognos and Jupyter Notebook.
Kind Regards,
Chris
------------------------------
Chris Bos
Original Message:
Sent: Thu June 13, 2019 07:11 PM
From: ROBERT MCAULEY
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Chris,
Thank you for sharing the server logs. After investigating, I noticed that several of the headers and cookies that should be present in the request from Cognos -> Jupyter are missing. The Jupyter server relies on the cookies that have been set in your browser in order to load the Cognos credentials (and a lack of which would coincide with the error message you saw: "CA Host info is missing").
I would like to learn more about the steps you took to get this error message. My main questions are:
1) Did you first log into Cognos from your browser and then clicked on "New -> Notebook" to generate this error message?
2) Could there be a gateway in place that is limiting the headers/cookies that are sent in the request?
It is important to note that the Jupyter server is not designed to work as a standalone service, but relies on a connection to Cognos. Accessing the Jupyter server directly via http://jupyter-server:8000/bi/v1/jupyter is great for debugging, but it will not allow you open a notebook without first going through Cognos.
Let me know if you need any clarification and I will be happy to help!
Regards,
Rob
------------------------------
ROBERT MCAULEY
Original Message:
Sent: Tue June 11, 2019 12:44 PM
From: Chris Bos
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Tony,
Within Cognos I used
- http://192.168.68.117:8000
- http://IBM-JUPYTER-DEMO:8000
- http://192.168.68.117:8000/bi/v1/jupyter
- http://IBM-JUPYTER-DEMO:8000/bi/v1/jupyter
I can ping from every environment to and from my Jupyter Server.
All with success.
But still the same error.
Looking @ the docker logs <IMAGEID> I see the same error: CA Host is Missing. Contact CAAdministrator.
What and were is the host missing..... I think this is my problem, my Jupyter Server can't connect to ... My Cognos Server, I think.
Any other suggestions ?
Kind Regards,
Chris
------------------------------
Chris Bos
Original Message:
Sent: Tue June 11, 2019 10:55 AM
From: ANTONIO MARZIANO
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Could be a dns issue....anyway, your URI is http://IBM-JUPYTER-DEMO:8000
So try http://IBM-JUPYTER-DEMO:8000/bi/v1/jupyter and if that brings back the status page, then replace the entry in the CA - MANAGE - CONFIGURATION - SYSTEM - ENVIRONMENT and test.
Does it work?
------------------------------
ANTONIO MARZIANO
Original Message:
Sent: Tue June 11, 2019 10:28 AM
From: Chris Bos
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Tony,
Thanks (again) for your reply.
When I do a docker logs <image> is see a line what's looks like an issue?
Why is there no IP or HOSTNAME in the http://<hostname>:8000/bi/v1/jupyter
[I 2019-06-11 14:11:48.534 JupyterHub app:1939] JupyterHub is now running at http://:8000/bi/v1/jupyter/
Could this be my issue ?
docker inspect <IMAGEID> | grep IP -> give me the internal IP
docker inspect <IMAGEID> | grep HOST give me the right hostname
docker inspect <IMAGEID> | grep Port gives me the right port number
------------------------------
Chris Bos
Original Message:
Sent: Tue June 11, 2019 08:49 AM
From: ANTONIO MARZIANO
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi Chris
You need to reference the external dispatcher in the URI i.e.
http://<dispatcherURI>:<port>/bi/v1/jupyter/hub
So, in Manage - Configuration - System - Environment and add the Jupyter URI e.g. http://<ipaddress>:8000
Where <ipaddress> could be: Hostname of the server running the Jupyter image or if BOTH jupyter and CA are on the same instance then you can use the container ip address.
run docker inspect ca_jupyter_hub | grep IP
You can also check the logs :
docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
912726b6f705 ca_jupyter_server-instance:latest "tini -g -- start-si…" 7 days ago Up 6 minutes 8888/tcp ca_jupyter-xOjpBbm9ueW1vdXM_5F
docker logs 912726b6f705
Then check the latest entries for details.
Let me know
------------------------------
ANTONIO MARZIANO
Original Message:
Sent: Tue June 11, 2019 08:32 AM
From: Chris Bos
Subject: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work
Hi,
I am trying to connect the Jupyter Notebook to my Cognos environment, but when I select 'New Notebook' I am getting the error" Internal Server Error".
When I test the Jupyter (http://<IP-ADRESS>:8000/bi/v1/jupyter/hub), I am getting the error: CA host is missing.
I did a clean Cognos 11.1.2 installation on a Windows Server
I installed the Jupyter Server on a CentOS, and followed the IBM installation manuals / steps.
When testing the Docker / Jupyter, I get feedback it's running.
I am new to Docker / Jupyter stuff, so probably I am missing a simple step.
In wich log files can I look what's missing ?
And should there be Jupyter log files on my CentOS ?
Searched the system, but there is only one uninstall log file available on my system.
Any direction is appreciated.
Kind Regards,
Chris


------------------------------
Chris Bos
------------------------------
#CognosAnalyticswithWatson