Cognos Analytics

Cognos Analytics

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

 View Only
Expand all | Collapse all

Adding additional pkg to docker/jupyter server fails

  • 1.  Adding additional pkg to docker/jupyter server fails

    Posted Mon February 24, 2020 12:06 PM
    Running 11.1.5 in test environment with Docker/Jupyter on Windows. We need to utilize kerberos for security against our database.
    I've added "request-kerberos" to the additional_packages.txt file and ran the build.bat.  The process seems to work until it gets to the "building kerberos extension" and then I get the following error.  
    **************
    Building wheel for pykerberos (setup.py): started
    Building wheel for pykerberos (setup.py): finished with status 'error'
    Complete output from command /opt/anaconda3/bin/python -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-i51pwhl2/pykerberos/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-oc2hf0bm --python-tag cp37:
    running bdist_wheel
    running build
    running build_ext
    building 'kerberos' extension
    creating build
    creating build/temp.linux-x86_64-3.7
    creating build/temp.linux-x86_64-3.7/src
    gcc -pthread -B /opt/anaconda3/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/opt/anaconda3/include/python3.7m -c src/kerberos.c -o build/temp.linux-x86_64-3.7/src/kerberos.o -I/opt/anaconda3/include -DGSSAPI_EXT
    unable to execute 'gcc': No such file or directory
    error: command 'gcc' failed with exit status 1

    ----------------------------------------
    Failed building wheel for pykerberos
    ****************
    Searching online doesn't help as everything I find is linx and not Windows based support.  Can anyone help me with this or point me to where I can solve this issue.  It is critical for us to use Kerberos to test out this connection with Cognos & Jupyter notebooks.
    Thanks in advance for your help.

    PS - the build log text also noted that we were using pip version 19.0.3, however version 20.0.2 is available. - how would I update this?

    ------------------------------
    Scott
    Cognos Administrator
    Wenatchee WA
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Wed March 04, 2020 07:56 PM

    Hey Scott, just a few follow-up questions with your problem:

    1) Are you able to install the package "requests-kerberos" in a notebook directly? The snippet would be "!pip install --user requests-kerberos"

    2) Were you able to install the default package "pixiedust"? I vaguely recall there being an issue with that package.

    I tried installing the package in my environment, which has access to the wider internet, and was successful (both in additional_packages.txt and within my notebook). I'm curious to know why yours may be failing.

    I've used pip 19.0.3, so I don't think upgrading pip will resolve your problem.

    Let me know,
    Rob



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



  • 3.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Fri March 06, 2020 07:16 PM

    Thanks for getting back to me Robert.

     

    To answer your questions:

    1. We did try to run the install in the notebook and received the same basic error message. 
      "... unable to execute 'gcc': No such file or directory
      error: command 'gcc' failed with exit status 1"
      I've discussed the error with IBM Support and they were inclined to think the requests-kerberos package wasn't fully baked.  I'm thinking maybe the 'Windows' version of Docker doesn't have all the same functionalities as the Linux version.  Have nothing to base this assumption on other that your install worked and mine on Windows doesn't.
    2. Regarding pixiedust, yes I had issues originally installing this package but it was due to internal security issues.  I was able to connect to a network connection outside of our internal security and the package installed properly.  At this same time I tried to install the "requests-kerberos" using the 'additional_packages.txt' file. This is when I saw the same "...unable to execute 'gcc': No such file or directory error: command 'gcc' failed with exit status 1" message.
    3. Glad to see the pip version doesn't matter although for future reference, I don't see a method to update this using the instructions provided by IBM.

    My general thoughts are that maybe the Windows version isn't the same as the Linux version.  Based on the document you shared with everyone on this site I would assume you have a Linux installation.  Do you have any way of testing the install on a Windows desktop?  Just asking.

     

    Thank you again for responding and providing your expertise.

     

    Scott

     

    Bar chart

    Scott Taylor

    Cognos Administrator | Senior BI Analyst | ext. 4332

     






  • 4.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Sat March 07, 2020 12:07 PM
    Not a problem Scott.

    I can definitely help you with upgrading pip.
    If you open <jupyter install dir>/dist/scripts/Dockerfile_server_instance, near the top you'll find this line:

    "FROM ca_jupyter_server_instance_original:installed"

    Right under that line, add this:

    USER root
    RUN pip install --upgrade pip

    Save the file and re-install the jupyter server. Your pip should upgrade to version 20.0.2

    I'd like to apologize for earlier because I did only test requests-kerberos on Linux. I gave my windows 10 setup a shot, and to my surprise I got the same error you did (definitely good news because it's reproducible). I then tried upgrading pip, but that didn't solve the problem unfortunately.
    I'm going to dive into the problem early next week.

    I'll keep you posted, and again, sorry for the inconvenience.

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



  • 5.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Sat March 07, 2020 12:17 PM
    I've raised a defect internally for this, and hopefully we'll have a solution for you soon!

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



  • 6.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Mon March 09, 2020 12:29 PM

    Robert,

    Thanks for the PIP instructions. 

     

    Glad to see that I'm not crazy.  I appreciate the additional testing and confirming that the Windows install is different than the Linux version. Thanks too for taking this up IBM development chain.  I already have a case with IBM (TS003432675) regarding this so hopefully they can attach this information to it.

     

    Scott

     

    Bar chart

    Scott Taylor

    Cognos Administrator | Senior BI Analyst | ext. 4332

     






  • 7.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Fri March 20, 2020 01:30 PM
    Hi Scott!
    Apologies for the delay in addressing this.
    requests-kerberos  installation requires the compilation of runtime hooks into security layers, thus the dependency on gcc compiler.
    11.1.5 jupyter does not have os package 'gcc' installed, which causes the additional  package install failure.
    11.1.6 jupyter release will not exhibit this problem.

    iIn the meantime, you can add a few lines to the docker file in the same manner Robert described for the pip upgrade.

    If you open <jupyter install dir>/dist/scripts/Dockerfile_server_instance, near the top you'll find this line:

    "FROM ca_jupyter_server_instance_original:installed"

    Right under that line, add this:

    USER root
    RUN pip install --upgrade pip && apt-get update && apt-get install -y gcc

    Save the file and re-install the jupyter server. Your pip should upgrade to version 20.0.2
    gcc will also be installed, preventing the error with requests-kerberos installation.

    I have tested this and installed requests-kerberos successfully on Windows 10.

    Thanks for your patience, and please let me know if there are any further problems with this situation.

    Murray Reid


    ------------------------------
    Murray Reid
    ------------------------------



  • 8.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Fri March 20, 2020 01:31 PM
    Hello Scott!

    Apologies for delay in response to your issue.
    The problem with this package is due to the fact that requests-kerberos must compile runtime components to integrate with system security modules. The base server instance docker image does not have the gcc installed which is a dependency of kerberos.

    Release 11.1.6 and beyond already address this issue

    In the meantime, it is possible to fix this problem in the same manner as described by Robert for updating the pip version.

    If you open <jupyter install dir>/dist/scripts/Dockerfile_server_instance, near the top you'll find this line:

    "FROM ca_jupyter_server_instance_original:installed"

    Right under that line, add this:

    USER root
    RUN pip install --upgrade pip && apt-get update && apt-get install -y gcc

    Save the file and re-install the jupyter server. Your pip should upgrade to version 20.0.2

    This has been tested and verified to work with 11.1.5 

    Thanks for your patience and please let me know if there is any further difficulty with this situation.

    Murray Reid



    ------------------------------
    Murray Reid
    ------------------------------



  • 9.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Mon March 23, 2020 01:33 PM
    Murry, thanks so much for this wonderful news.  I plan on testing this as soon as we are able to return to our offices.  Currently working from home using the Windows 10 laptop with Jupyter installed.  I can upgrade it from here but I won't be able to test the Cognos/Jupyter connection until the laptop is back in our company domain.
    Really appreciate that you tested this on a windows box and it worked.  Also happy to hear that 11.1.6 was upgraded to correct for this problem.  I look forward to testing and getting this up and running.
    Thanks again for this information!  Stay safe & healthy.
    Scott

    ------------------------------
    Scott
    Cognos Administrator
    Wenatchee WA
    ------------------------------



  • 10.  RE: Adding additional pkg to docker/jupyter server fails

    Posted Wed March 25, 2020 06:34 PM
    Just an update regarding your instructions.  This process worked wonderfully and the Windows 10 system was updated with PIP and kerberos without issues.  I was also able to put the Win10 system back on our business domain and connect to it with Cognos Analytics 11.1.5.  Everything seems to be working correctly now.  With Kerberos now available we can continue to do further testing with Cognos Jupyter Notebooks and connecting to our time-series data (PI data).  Looking forward to the results of this testing.

    Thank you for your expertise and getting this to work for us.

    ------------------------------
    Scott
    Cognos Administrator
    Wenatchee WA
    ------------------------------