Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
Expand all | Collapse all

Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

  • 1.  Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue June 11, 2019 08:32 AM
    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


  • 2.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue June 11, 2019 08:50 AM
    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
    ------------------------------



  • 3.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue June 11, 2019 10:29 AM
    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
    ------------------------------



  • 4.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue June 11, 2019 10:55 AM
    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
    ------------------------------



  • 5.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue June 11, 2019 12:45 PM
      |   view attached
    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
    ------------------------------



  • 6.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed June 12, 2019 02:47 AM
    Hi,

    are u using single environtment for CA server?
    I had same issue, and I fixed it by changing Disp URI for external applications to IP4 in CA configuration.
    So, steps:
    CA server configuration
    stop server
    change to Disp URI for external applications to IP4 
    save and restart server.


    ------------------------------
    Farhod Rasulov
    ------------------------------



  • 7.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed June 12, 2019 12:20 PM
    Hi Farhod,

    Thank you for your reply.

    Yes, I have a Single Installation (Windows Based).

    Could you give me a little more context how to set the
    Dispatcher URI for External Applications to IP4?

    Within the section [Environment] of Cognos Configuration: 

    IP version for host name resolution is set to: Use IPv4 Addresses
    Dispatcher URI for External Applications: http://<HOSTNAME>:<PORT>/bi/v1/disp

    Thanks in advance.

    Chris


    ------------------------------
    Chris Bos
    ------------------------------



  • 8.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed June 12, 2019 06:19 PM
    Hi All,

    When using  http://<HOSTNAME>:<PORT>/bi/v1/jupyter I am getting the 500 error (CA Host info is missing).

    Looking at the docker logs <IMAGEID> I can see the same error at the same time I tried.

    Why does I have this line in the log file, where my HOSTNAME is not used ?

    .......... JupyterHub proxy:578] Starting proxy @ http://:8000/bi/v1/jupyter/ .........

    With Google I found many log samples with the same log content, but used hostname / IP addresses for the JupyterHub

    Google Sample:
    [I 2018-03-22 18:39:53.919 JupyterHub app:1581] JupyterHub is now running at http://10.240.27.175:8000/

    Based on this and my error (Host is missing) I expected to see my hostname in my log file.
    Where is the hostname set within Jupyter ?

    docker inspect <imageid> | grep HOST gives me the HOSTNAME

    I think my issue is not the Cognos Server, but the Jupyter Server, based on the error and logfile.
     
    Kind Regards,

    Chris

    ------------------------------
    Chris Bos
    ------------------------------



  • 9.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Thu June 13, 2019 10:09 AM
    I also experienced the 500 error (CA Host Info is missing) and discovered that my Jupyter server did not have access through the firewall to the Cognos Analytics Application Server port (port 9300 by default).   The Application Server URI is sent to the Jupyter Server from the Cognos session and then the  Jupyter server then opens a connection directly back to the dispatcher.

    Not sure if this is the same issue in your case or not...

    -Greg

    ------------------------------
    Gregory Mullinax
    ------------------------------



  • 10.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Thu June 13, 2019 03:22 PM
    Hi Gregory,

    Thanks for your reply.

    From the Jupyter Server I am able to log into the Cognos Analytics when I start a Browser Session.
    I have installed GNOME Desktop on my CentOS doing that.

    So I don't think firewall / port denied is the issue in my case.

    Kind Regards,

    Chris


    ------------------------------
    Chris Bos
    ------------------------------



  • 11.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 09:41 AM

    Hi Chris,

    thank you for sharing the server logs. After some investigation, it looks like all of the required HTTP headers and cookies are missing from the request to the Jupyter Server (which resulted in the error message: CA Host info is missing). Also, it looks like the request did not originate from Cognos.

    It is important to note that the Jupyter Server component was not designed to work as a standalone service, but to be tightly coupled with Cognos. It will only work if you navigate to Cognos in your browser, log in, and open a notebook through the Cognos UI.

    I was wondering if we could try a little experiment:

    1) Navigate to Cognos Analytics in your browser
    2) Log in
    3) Click the "+" icon at the bottom left corner if the screen, and select "Notebook"
    4) If this fails, enter the Jupyter Server and retrieve the logs (docker logs ca_jupyter_hub)

    If you could share those logs with me that would be great! 

    Regards,
    Rob



    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 12.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 02:12 AM
    Hi Chris,

    I changed in cognos configuration for Dispatcher URI for External Applications from http://<HOSTNAME>:<PORT>/bi/v1/disp to http://IP(numeric):<PORT>/bi/v1/disp

    then restarted service.

    Afterwards, Cognos server could communicate with all external services, as IP4 gives full adress rather than DSN name. sometimes it is difficult for container find DNS hostname as they search over system host.

    Regards
    Farhod

    ------------------------------
    Farhod Rasulov
    ------------------------------



  • 13.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 09:05 AM
    Hi Farhod,

    Thanks for your reply.

    I have also tried using <IP>:<Port> but with the same results. (Error, host is missing)

    Could you try looking at your Jupyter Server and what's in the log for the jupyter_hub ?

    docker ps -a
    Find the image number of your jupyter_hub and use that ID to generate the log
    docker logs <IMAGEID>

    I see the line:
    .......... JupyterHub proxy:578] Starting proxy @ http://:8000/bi/v1/jupyter/ .........

    I would expect seing a line like: 
    Starting proxy @ http://IBM-JUPYTER_DEMO:8000/bi/v1/jupyter/
    or
    Starting proxy @ http://192.168.68.117:8000/bi/v1/jupyter/ 

    Based on my error: HOST is missing, it could be my problem.

    I haven't found yet where this setting is set within Jupyter.

    Kind Regards,

    Chris




    ------------------------------
    Chris Bos
    ------------------------------



  • 14.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 09:44 AM

    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
    ------------------------------



  • 15.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 10:43 AM
    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
    ------------------------------



  • 16.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 10:45 AM
      |   view attached
    .... it's working ....

    ------------------------------
    Chris Bos
    ------------------------------



  • 17.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri June 14, 2019 12:31 PM
    That's great Chris! Feel free to post any updates here, with any questions you may have.

    Regards,
    Rob

    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 18.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed July 31, 2019 09:21 AM
    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
    ------------------------------



  • 19.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed July 31, 2019 09:32 AM
    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
    ------------------------------



  • 20.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed July 31, 2019 01:25 PM
    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
    ------------------------------



  • 21.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed July 31, 2019 01:29 PM
      |   view attached
    Here the log files.

    ------------------------------
    Paulo Klein
    ------------------------------

    Attachment(s)

    zip
    Jupyter_logs.zip   3 KB 1 version


  • 22.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Thu August 01, 2019 02:48 PM

    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
    ------------------------------



  • 23.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri August 09, 2019 10:39 AM
    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
    ------------------------------



  • 24.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri August 09, 2019 11:00 AM
    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
    ------------------------------



  • 25.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Thu August 15, 2019 04:01 AM
    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
    ------------------------------



  • 26.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri October 25, 2019 11:38 AM
    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
    ------------------------------



  • 27.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Fri October 25, 2019 01:45 PM
    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
    ------------------------------



  • 28.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue October 29, 2019 11:18 AM
    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
    ------------------------------



  • 29.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue October 29, 2019 11:44 AM
    Hey Matthijs,

    Yes I've seen those warnings before :-) Unfortunately, they are benign and are almost certainly not the root of the problem.

    I think we should focus on why the websocket connection between the browser and the "xxxxxxxx.net" host cannot be established. Could it be that the hostname cannot be resolved from the machine that's running the browser? I would try a quick ping test to ensure that the communication between hosts works fine. 

    Another test you could try is modify the config.conf file on the jupyter server to instead of using the machine's hostname, to use its public IP address. The current configuration should be "HOST_NAME=$(hostname)". You'd need to change it to "HOST_NAME=<the machine's ip address>" and restart the jupyter server by running the start script.

    Hopefully that helps,
    Rob

    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 30.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed October 30, 2019 07:17 AM
    Hi Robert, thanks for your quick answer! I appreciate it.

    I did a ping from the windows server where my test browser is located to the Jupyter notebook server on the fully qualified domain name, the same one used in config.conf on Jupyter--> that succeeded.

    I still changed it from FQDN to the IP-address in config.conf, and in Cognos - Configuration - System - Environment also. --> That resulted in the same issue with the connecting to kernel. So no difference

    However I see in the docker ps -ef output that the ca_jupyter_server_instance (which is automatically created when starting a new notebook from Cognos) that it is runnning on 8888/tcp. Does that mean that the browser has to have a direct connection to they notebook server on 8888? Is that the port on which it wants to have the websocket connection?

    I also checked the cogserver.log and cogaudit.log on the dispatcher from which the notebook is started, no hints in there with basic logging.

    Kind regards,
    Matthijs

    ------------------------------
    Analytical Engine
    ------------------------------



  • 31.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed October 30, 2019 12:10 PM
    Hi Matthijs,

    Regarding port 8888, that is an internal port that is managed within the jupyter ecosystem :-) The jupyter hub listens on port 8000 and redirects all traffic to the requested jupyter_server_instance containers at port 8888.

    Regarding the FQDN and IP changes, it's still very puzzling to me. I know you probably verified this, but could you double check that the websocket request (the one pointing to xxxxxxxxxx.net) is the same host as the one you set in the manage -> configuration -> system -> environment? If you changed everything to the IP address, could you verify that both IPs are the same in each place?

    A bit of background on what those IPs/hostnames are used for:

    1) The entry in the manage panel is used to send a request from the dispatcher to xxxxxxxxxx.net to start up the jupyter_server_instance docker container and launch the notebook.
    2) The entry in config.conf is used to establish the websocket address, and once the container comes up, that address is used to create the kernel connection

    Step (1) seems to work fine, because the notebook comes up. Step (2) is what's failing, and it seems that either the browser can't reach xxxxxxxx.net, or a browser setting is disabling websocket requests. If you can, try opening CA in different browsers to see if that helps. I have seen issues with Firefox in the past, specifically with disabling websocket requests.

    Hope that helps,
    Rob

    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 32.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue November 12, 2019 08:21 AM
    Hi Robert,

    Thanks again. Indeed it seems that step 1 is ok, the issue is with step 2.

    I installed Chrome in the data center test server to check if that makes any difference. I also changed the port from 8081 to 8087 --> debug with F12 still gives websocket connetion failed. Error during WebSocket handshake: net: : ERR_CONNECTION_RESET. 

    See screenshot (I anonymized the hostnames):

    It looks like a firewall issue but then again, the new docker container starts up as soon as I choose new notebook from the Cognos menu, and I get the notebook screen. It just can't connect with a websocket to the Python kernel. It uses the same port right?

    Thanks again for all the effort
    Matthijs

    ------------------------------
    Analytical Engine
    ------------------------------



  • 33.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Tue November 12, 2019 10:01 AM
    Hi Matthijs, 

    It does use the same port, however it uses a different protocol (WS instead of HTTP).

    I'm wondering if your firewall is blocking the WS protocol. One test you could try is opening Cognos in a browser that is within the firewall, and creating a new notebook. If that works, you may have to tweak the firewall settings.

    Hopefully that will fix your issue.

    Regards,
    Rob

    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 34.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed November 13, 2019 10:54 AM
    Hi, 

    We have a small breakthrough. I installed Firefox on the same Linux server where Jupyter notebook is running. When I connect from Firefox to the Cognos dispatcher and start a notebook, the connection to the Python kernel succeeds. So the websocket is created. And probably this is because it is running from a browser in the same server. Also this proves that the Notebook installation technically works.

    However I have to find out now why websockets are blocked from the Windows server running Chrome or IE. The Windows Server is in the same network as the dispatcher, and it has the correct port open to the Notebook server.

    I will talk to some other engineers, the firewall guys and probably the architect in our company to help finding out why "http"works but "ws" seems to be filtered or blocked.

    Thanks for all sugestions,
    I will post the root cause as soon as we have it working.
    Kind regards,
    Matthijs



    ------------------------------
    Analytical Engine
    ------------------------------



  • 35.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Wed November 13, 2019 02:10 PM
    Hi Matthijs,

    I'm glad to hear you've made some progress! Let me know if you require any additional information.

    Regards,
    Rob

    ------------------------------
    ROBERT MCAULEY
    ------------------------------



  • 36.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Mon April 13, 2020 03:28 PM
    ​Hi Matthijs,

    Do u have any update on issue as I am getting same error and having same architect diagram.

    Any information is useful.


    Thanks for all suggestion.

    ------------------------------
    Prerna Sharma
    ------------------------------



  • 37.  RE: Cognos Analytics 11.1.2 and Jupyter Notebook doesn't work

    Posted Thu April 16, 2020 05:19 AM
    Hi Prema,

    We stopped with our Notebook experiments as we have other priorities now.
    So no solution found.

    Kind regards,
    Matthijs

    ------------------------------
    Analytical Engine
    ------------------------------



Global message icon