Jupyterlab not working on clean Ubuntu 20.04 LTE

Comments

9 comments

  • Avatar
    Neill Lewis

    Hi Gianfranco,

    I've made some revisions to your docker-compose file and attached them here. It looks like you're not overriding the default start command, and thus the default start command would expect for a configuration file to be at /var/lib/heavyai/heavy.conf not /heavyai-storage/heavyai.conf, and further for your data folder within the container to exist at /var/lib/heavyai/.

    Additionally, the environmental variables used by the jupyterhub/jupyterlab containers haven't been updated, so I've ammended these as well.

    On our end, it looks like our jupyter install page needs an update; sorry for the inconvenience.

    heavy.conf.txt|attachment (92 Bytes) docker-compose.yml.revised.txt|attachment (5.1 KB)

    Hope this helps! Look forward to your feedback.

    Thanks, Neill

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    Thanks for your help Neil, using your files improved the situation.

    Now I can see the Jupyter button with the "admin" user (not valid for jupyerlab access because I can't assign roles to admin user), but I don't see the Jupyterlab button with the "user1" user, to which I assigned the heavyai_jupyter role and all privileges on database:

    heavysql> grant all on database heavyai to user1;
    heavysql> \
    ole_list user1
    heavyai_jupyter
    
    

    In addition, often the http sessions don't disconnect and are left active: here I have two http sessions active, but I don't know how to re-enter properly in the browser in order to log-out , or how to kill (stop) the session in order to free the session.

    heavysql> show user sessions ;
    session_id|login_name|client_address|db_name
    321-9azc|admin|http:localhost:48732|heavyai
    428-R1kc|admin|tcp:localhost:56668|heavyai
    838-kdaT|user1|http:172.19.0.1|heavyai
    
    

    If I try to re-enter the session in browser with both "admin" and "user1" login, I get: image|407x397.

    and I imagine hit this error could be the cause the session is left active and pending. What does "JSON.parse: unexpected end of data at line 1 column 1 of the JSON data" exactly mean, and what should I do to avoid that error?

    I added a ten minutes timeout in heavyai.conf but it would be nice to manage (and kill) sessions if needed: from what moment will this parameter (and in general parameters edited in heavyai.conf) be active?

    idle-session-duration 10
    

    Update: after stopping and restarting heavyai container the Jupyter button is missing with both users admin and user1: it seems that the "JSON.parse:" error is gone, now.

    0
    Comment actions Permalink
  • Avatar
    Neill Lewis

    Hi Gianfranco,

    Now I can see the Jupyter button with the “admin” user (not valid for jupyerlab access because I can’t assign roles to admin user), but I don’t see the Jupyterlab button with the “user1” user, to which I assigned the heavyai_jupyter role and all privileges on database:

    Can you please try to use the role "omnisci_jupyter" instead and also make this change in docker-compose.yml?

    Additionally, under optional settings, try to add this line to allow your admin user access: OMNISCI_ALLOW_SUPERUSER_ROLE: "true" (note rename from HEAVYAI_ to OMNISCI_ if uncommenting existing line).

    Note that a full docker compose up -d is required for changes in docker-compose.yml to be enabled.

    From what moment will this parameter (and in general parameters edited in heavyai.conf) be active?

    These settings require a restart of heavydb and/or heavy_web_server.

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    HI Neil, I followed your hints but I still have no Jupyterlab button in Immerse with both the user "Admin" and "user1". Role omnisci_jupyter is created and granted, and OMNISCI_ALLOW_SUPERUSER_ROLE: "true" is set and activated with compose up -d and restart of heavydb and heavy_web_server.

    heavysql> \
    ole_list user1
    heavyai_jupyter
    omnisci_jupyter
    
    

    docker-compose.yml.txt|attachment (5.2 KB) heavyai.conf.txt|attachment (117 Bytes) servers.json.txt|attachment (38 Bytes)

    This is the heavyai cotainer log, I see something strange:

    2022-09-01T07:05:46.529369127Z - heavydb 17 started
    2022-09-01T07:05:46.529950585Z - heavy_web_server 18 started
    2022-09-01T07:05:49.382755191Z ⇨ http server started on [::]:6273
    2022-09-01T07:05:51.532355298Z Navigate to: http://localhost:6273
    2022-09-01T07:13:30.556937397Z Failed to write to log, write /var/lib/heavyai/storage/log/heavy_web_server.37460dcae923.root.log.ALL.20220901-070546.18: file already closed
    2022-09-01T07:13:30.666992326Z 2022-09-01T07:13:30.666678 E 17 0 7 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6278
    2022-09-01T07:13:30.667022606Z 2022-09-01T07:13:30.666762 E 17 0 9 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6276
    2022-09-01T07:13:30.667093997Z 2022-09-01T07:13:30.666719 E 17 0 8 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6274
    2022-09-01T07:13:32.561755610Z startheavy 7 exited
    2022-09-01T07:13:34.301915394Z startheavy 7 running
    2022-09-01T07:13:34.312219693Z WARN: config file does not exist, ignoring: --config /var/lib/heavyai/heavy.conf
    2022-09-01T07:13:34.312290332Z Backend TCP:  localhost:6274
    2022-09-01T07:13:34.312313508Z Backend HTTP: localhost:6278
    2022-09-01T07:13:34.312319797Z Frontend Web: localhost:6273
    2022-09-01T07:13:34.312325600Z Calcite TCP:  localhost:6279
    
    

    It is searching /var/lib/heavyai/heavy.conf, this seems an error

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    Just an update, heavyai.conf is found correctly now.

    The problem of the missing Jupyter button still persists.

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    I observer in dockerfile.cuda the startheavy command calling heavy.conf insetad of heavyai.conf

    
    CMD /opt/heavyai/startheavy --non-interactive --data /var/lib/heavyai/storage --config /var/lib/heavyai/heavy.conf
    

    and also in the container log the entry:

    2022-09-01T12:32:50.948375791Z WARN: config file does not exist, ignoring: --config /var/lib/heavyai/heavy.conf
    
    

    so I copied my heavyai.conf as heavy.conf and the Jupyter button magically appeared ^_^

    Now, (hopefully) I need a last step in order to complete the installation: opening Jupyter from the user "user1" leads to : image|689x170

    but actually the omnisci_jupyter_role is granted to that user:

    heavysql> \
    ole_list user1
    heavyai_jupyter
    omnisci_jupyter
    heavysql> 
    
    

    Any help for the role issue?

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    Well, i renamed the parameter name in the yml file and now the role is found on the user. But a different error is returned in Jupyterlab :

    image|690x204

    The user "user1" is already connected to Heavyai and Immerse, therefore it isn't an authentication problem.

    I still have this error in the container log, this could be the cause:

    2022-09-02T14:07:47.911421271Z 2022-09-02T14:07:47.911066 E 17 0 9 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6278 2022-09-02T14:07:47.911517968Z 2022-09-02T14:07:47.911094 E 17 0 10 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6274 2022-09-02T14:07:47.911528142Z 2022-09-02T14:07:47.911118 E 17 0 11 HeavyDB.cpp:194 Exception: Thrift server exited: Cannot assign requested address: port 6276

    docker-compose.yml.txt|attachment (5.3 KB) heavy.conf.txt|attachment (119 Bytes) heavyai.conf.txt|attachment (119 Bytes) servers.json.txt|attachment (38 Bytes)

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    I marked the preceding post a Solution, because the original issue (missing Jupyter button) is solved, by setting the new parameter role and parameter value in docker-compose.yml and granting that to the user:

          OMNISCI_JUPYTER_ROLE: omnisci_jupyter
    

    and using the " docker-compose.yml.revised.txt|attachment"

    I will open a new thread for the different error "[Errno 99] Cannot assign requested address: port xxxx".

    Thanks Neill.

    0
    Comment actions Permalink
  • Avatar
    Gianfranco Campana

    [quote="Neill, post:2, topic:3044"] Hi Neill, [/quote]

    could you just explain better what does it mean " overriding the default start command " , please?

    Would I have to change something else respect to what is reported into the documentation, or I missed something already reported here ?

    Could you point me to where are documented the details about "overriding the default start command" ?

    0
    Comment actions Permalink

Please sign in to leave a comment.