Re: [jupyter] Jupyter Error: Server Not Running

2021-03-31 Thread Charles Forelle
If that’s the server that’s running the Hub, can you run the same command
on a singleuser server? (For instance, from inside the Terminal on Jupyter
lab.)

If that’s the singleuser server, run the same command on the Hub.

On Wed, Mar 31, 2021 at 11:46 AM Sunil Patil 
wrote:

> Hi Charles,
>
> Thanks for getting back to me. I checked versions (ran command, pip freeze
> | grep jupyter) and below is the outcome,
> jupyter==1.0.0
> jupyter-client==5.3.4
> jupyter-console==6.0.0
> jupyter-core==4.6.1
> jupyter-telemetry==0.1.0
> jupyterhub==1.1.0
> jupyterlab==2.2.5
> jupyterlab-server==1.2.0
>
> Could you please advise if any of these versions may be causing this issue?
>
> Thanks,
> Sunil.
>
> On Wed, 31 Mar 2021, 2:46 pm Charles Forelle,  wrote:
>
>> This could be a lot of things but I had similar errors that seemed to
>> stem from a mismatch between versions. Are you running the same versions of
>> jupyterlab and jupyterhub on both the Hub and the singleuser servers?
>>
>> On Wed, Mar 31, 2021 at 8:57 AM Sunil Patil 
>> wrote:
>>
>>> Hi,
>>> Can some one please help me with below issue?
>>> I randomly get errors 'Server Not Running' and 'Your server at ... is
>>> not running. Would you like to restart it?' With option 'Restart' or
>>> 'Dismiss'.
>>> This error occurs even if my code is running.
>>> We have not set up any time out for inactivity in config file
>>> jupyter_notebook_config.py or jupyterhub_config.py.
>>> In jupyter logs I can see errors like: 'Failing suspected API request to
>>> not-running server: /username/jupyter/hub/user/username/api/kernels'
>>>
>>> This behaviour interrupts running code and causes double work.
>>> Can someone please guide me to identify root cause for this issue? and
>>> how to overcome this?
>>>
>>> Thanks,
>>> Sunil
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jupyter+unsubscr...@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jupyter/CAAmKPtigiwy0ZF-eKh-HccQAiUMg2rYJZmNPpQxcVEzvCnQ9tg%40mail.gmail.com
>>> <https://groups.google.com/d/msgid/jupyter/CAAmKPtigiwy0ZF-eKh-HccQAiUMg2rYJZmNPpQxcVEzvCnQ9tg%40mail.gmail.com?utm_medium=email_source=footer>
>>> .
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>>
> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAOFssWyuXtx20b4oqFNffrfM1Kd8YWSt44W8_7bBZT4vJ%3D3yvA%40mail.gmail.com
>> <https://groups.google.com/d/msgid/jupyter/CAOFssWyuXtx20b4oqFNffrfM1Kd8YWSt44W8_7bBZT4vJ%3D3yvA%40mail.gmail.com?utm_medium=email_source=footer>
>> .
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAAmKPtjMYtyW39EoAj%3DJowDed__cpqb%2BOvfiM3-sWN9WwageUw%40mail.gmail.com
> <https://groups.google.com/d/msgid/jupyter/CAAmKPtjMYtyW39EoAj%3DJowDed__cpqb%2BOvfiM3-sWN9WwageUw%40mail.gmail.com?utm_medium=email_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWynr7fN9cFfAV5Dx3bH2Bh7PVNxLdm%2BxZuxMaiK7hdFXA%40mail.gmail.com.


Re: [jupyter] Jupyter Error: Server Not Running

2021-03-31 Thread Charles Forelle
This could be a lot of things but I had similar errors that seemed to stem
from a mismatch between versions. Are you running the same versions of
jupyterlab and jupyterhub on both the Hub and the singleuser servers?

On Wed, Mar 31, 2021 at 8:57 AM Sunil Patil 
wrote:

> Hi,
> Can some one please help me with below issue?
> I randomly get errors 'Server Not Running' and 'Your server at ... is not
> running. Would you like to restart it?' With option 'Restart' or 'Dismiss'.
> This error occurs even if my code is running.
> We have not set up any time out for inactivity in config file
> jupyter_notebook_config.py or jupyterhub_config.py.
> In jupyter logs I can see errors like: 'Failing suspected API request to
> not-running server: /username/jupyter/hub/user/username/api/kernels'
>
> This behaviour interrupts running code and causes double work.
> Can someone please guide me to identify root cause for this issue? and how
> to overcome this?
>
> Thanks,
> Sunil
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAAmKPtigiwy0ZF-eKh-HccQAiUMg2rYJZmNPpQxcVEzvCnQ9tg%40mail.gmail.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWyuXtx20b4oqFNffrfM1Kd8YWSt44W8_7bBZT4vJ%3D3yvA%40mail.gmail.com.


Re: [jupyter] Is it possible to remove the username from the url?

2019-06-05 Thread Charles Forelle
I don't know about not having usernames in the url, but are you using an
OAuthenticator (like GoogleOAuthenticator)? The authenticate function is
likely what's choosing the email as the username. You can subclass the
OAuthenticator and modify that function to generate whatever you want as
the username.

On Wed, Jun 5, 2019 at 7:47 PM Ray Hilton  wrote:

> Sorry, I should have been clearer!
>
> In JupyterHub, it uses ones username in the url, which, if you use full
> email addresses, looks like:
>
> /user/r...@example.com/lab
>
> Which should be fine, except Theia insists on encoding that @ as %40 for
> its websockets, and that doesnt work (CHP doesnt mind, but I think the
> jupyter instance does.  Anyway, I was also thinking that perhaps it's not a
> great idea to have the username in the url in the first place as it exposes
> personal information.
>
> So, I was wondering if there was a way of simply not having usernames in
> the jupyterhub structure, but open to other ideas.  Perhaps I could
> generate a user-id on first auth based on the user's email address and that
> would avoid this problem, but it would make for uglier urls.
>
> Ray
>
> On Wed, Jun 5, 2019 at 11:11 PM s...@draves.org  wrote:
>
>> What URLs are you talking about? What Theia app do you mean?
>>
>> On Wed, Jun 5, 2019 at 12:29 AM Ray Hilton 
>> wrote:
>>
>>> Basically, I feel it's a little unnecessary to have the username (in my
>>> case, the entire email address) in the url.  It also leads to people
>>> exposing their email if they copy/paste links.  However, the main reason i
>>> want to use it is because some apps (like Theia) make assumptions about how
>>> to encode the @ in the username (it encodes to %40) which then breaks the
>>> websocket connection.  I have tried solving this in other ways, but I
>>> figured why not just remove the username completely?
>>>
>>> Any thoughts?
>>>
>>> Ray
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Project Jupyter" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to jupyter+unsubscr...@googlegroups.com.
>>> To post to this group, send email to jupyter@googlegroups.com.
>>> To view this discussion on the web visit
>>> https://groups.google.com/d/msgid/jupyter/CAJ%3DX9awAqTALJGvJQtbLih6BDBvYyXKnxA8oxvGgwcLSVAcfsA%40mail.gmail.com
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>> --
>> *CTRL-labs.com *
>> ScottDraves.com 
>> @Scott_Draves 
>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "Project Jupyter" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to jupyter+unsubscr...@googlegroups.com.
>> To post to this group, send email to jupyter@googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/jupyter/CAMaD%2Bf7prierVPygq2TG2q_AzNz4ORmfZagi4%3DD6hrrxwf4-Jw%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/CAJ%3DX9aw4-x1FnQraZBz9j-W0h4NtK-ZB0rVW72RgN%3Dot8JM4UQ%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWyxCNjAnbu0xSBXb64F%3D86vaLtMz2%2Bhn%3DZGYuxUQtyO4w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] How does jupyter show dataframe as html table ?

2017-12-20 Thread Charles Forelle
The pandas DataFrame class defines a _repr_html_ method that returns an
HTML string.

On Wed, Dec 20, 2017 at 2:13 AM Jeff Zhang  wrote:

> Just wondering how does jupyter do that ? Is there any display hook for
> that ? and how's that implemented. Thanks
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/c1139ebd-9f0c-463d-97bf-8b8ad25435c8%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWwVD_w5-Ve%3Ddy2W2%3DEvi21tdKj76EdcS4a7VE%2B_EbSKzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Re: Where to put shared settings for jupyterlab extensions on hub

2017-11-06 Thread Charles Forelle
Thanks Steve. The pre_spawn script does the trick for now.

On Thu, Nov 2, 2017 at 8:58 AM, Steven Silvester <steven.silves...@gmail.com
> wrote:

> Hi Charles,
>
> Yes, the approach you describe sounds correct for now.  We had been
> avoiding the auto-merge behavior that the classic notebook uses because the
> merge order is difficult to get right for every situation.  However, it
> sounds like we should at least allow you to provide a specific defaults
> folder.  I opened https://github.com/jupyterlab/jupyterlab/issues/3179.
>
>
> Regards,
>
> Steve
>
> On Wednesday, November 1, 2017 at 8:29:10 AM UTC-5, Charles Forelle wrote:
>>
>> Hello,
>>
>> I have the following setup:
>> -JupyterHub using the default local spawner
>> -c.Spawner.cmd = ['jupyter', 'labhub'] to run JupyterLab when single-user
>> servers are spawned (labhub extension installed).
>>
>> What's the best way to get common jupyterlab extension settings loaded
>> for each of the users' servers? (One use case: all users need to have the
>> same clientId setting configured for the google-drive extension.)
>>
>> Should I be using c.Spawner.pre_spawn_hook to run a shell script that
>> writes the settings json to /home/{USERNAME}/.jupyter/lab/user-settings?
>> Or is there another option? (I may be fundamentally misunderstanding how
>> these settings work!)
>>
>> JupyterLab 0.28.11
>> JupyterHub 0.8
>>
>> Thanks! I'm grateful for any guidance.
>> -Charles
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/jupyter/0f0b94e2-3933-4c25-954e-7a2578aea474%40googlegroups.com
> <https://groups.google.com/d/msgid/jupyter/0f0b94e2-3933-4c25-954e-7a2578aea474%40googlegroups.com?utm_medium=email_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWyYg1FiZcyRV7%3DJETmcsTpG4PzOPEn2z2eSsLB-E3NnSQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[jupyter] Where to put shared settings for jupyterlab extensions on hub

2017-11-01 Thread Charles Forelle
Hello,

I have the following setup:
-JupyterHub using the default local spawner
-c.Spawner.cmd = ['jupyter', 'labhub'] to run JupyterLab when single-user
servers are spawned (labhub extension installed).

What's the best way to get common jupyterlab extension settings loaded for
each of the users' servers? (One use case: all users need to have the same
clientId setting configured for the google-drive extension.)

Should I be using c.Spawner.pre_spawn_hook to run a shell script that
writes the settings json to /home/{USERNAME}/.jupyter/lab/user-settings? Or
is there another option? (I may be fundamentally misunderstanding how these
settings work!)

JupyterLab 0.28.11
JupyterHub 0.8

Thanks! I'm grateful for any guidance.
-Charles

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWz0h03uw47%2BRH8Ei-P3Z_xCNS4EV3xQtjAfVNPwGbm7jg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [jupyter] Jupyterhub network and/or Configuration errors

2017-10-16 Thread Charles Forelle
I think you want c.JupyterHub.ip and c.JupyterHub.port, not hub_ip and
hub_port

Does that help?

On Mon, Oct 16, 2017 at 3:39 PM Lance Smith  wrote:

>
>  I think I have a simple configuration error, but I can't figure it out. I
> have a Jupyterhub installation that uses SSL via a certificate that was
> given to my by our systems administrator. I have a VM that runs jupyterhub
> remotely and I've configured it by following the instructions
> from the install guide. The only changes to jupyterhub_config.py are below.
>
> I have a DNS name, jupyterhub..org assigned to 10.2.1.52 The hub
> starts without any errors to the console. When I try to go to the URL, it
> just hangs and eventually errors out.
>
> If I try to go directly to the Hub API at http://10.2.1.52:443/hub/, I’ll
> get the login page but I will get caught in a redirect loop and kicked out
>
>
>
> *Error message:*
>
>
>
> Detected possible direct connection to Hub's private ip:
> http://10.2.1.52:443/hub/user/smithla, bypassing proxy.
>
> This will result in a redirect loop.
>
> As far as I can tell, ports 443, 8000 and 8001 are open
>
> root@jupyterhub:/home/smithla/jupyterconfig# netstat -tulnp | grep 443
> tcp0  0 10.2.1.52:443   0.0.0.0:*
> LISTEN  4169/python3
>
> root@jupyterhub:/home/smithla/jupyterconfig# netstat -tulnp | grep 8000
> tcp6   0  0 :::8000 :::*
> LISTEN  4173/node
>
> root@jupyterhub:/home/smithla/jupyterconfig# netstat -tulnp | grep 8001
> tcp0  0 127.0.0.1:8001  0.0.0.0:*
> LISTEN  4173/node
>
>
> Thanks,
>   Lance Smith
>
>
> *jupyterhub_config.py file*
>
> ## The ip for this process
> c.JupyterHub.hub_ip = '10.2.1.52'
>
> ## The port for this process
> c.JupyterHub.hub_port = 443
>
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Project Jupyter" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to jupyter+unsubscr...@googlegroups.com.
> To post to this group, send email to jupyter@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jupyter/d3a8d654-a95b-43c3-80e6-95c3e91496fa%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Project Jupyter" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jupyter+unsubscr...@googlegroups.com.
To post to this group, send email to jupyter@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jupyter/CAOFssWyiwy8BxpVLdmkSjTsUWm6HJodrOJUabyaj34veMG6PBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.