On 9 August 2018 at 12:09, Volker Braun <vbraun.n...@gmail.com> wrote:

> The token is generated before launching the browser, and conflicting ports
> aren't a problem (jupyter just picks an unused one). Check for pesky
> environment variables like JUPYTER_TOKEN and/or try
>
> sage --notebook=jupyter --no-browser --debug
>

No funny environment, I think:

$ env | grep J
(returns nothing)

$ sage --notebook=jupyter --no-browser --debug
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.3, Release Date: 2018-08-03                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                            │
└────────────────────────────────────────────────────────────────────┘
Please wait while the Sage Jupyter Notebook server starts...
[D 12:11:45.311 NotebookApp] Searching [u'/home/jec',
'/home/jec/.sage//jupyter-4.1', '/usr/local/sage/sage-2/local/etc/jupyter',
'/usr/local/etc/jupyter', '/etc/jupyter'] for config files
[D 12:11:45.311 NotebookApp] Looking for jupyter_config in /etc/jupyter
[D 12:11:45.311 NotebookApp] Looking for jupyter_config in
/usr/local/etc/jupyter
[D 12:11:45.311 NotebookApp] Looking for jupyter_config in
/usr/local/sage/sage-2/local/etc/jupyter
[D 12:11:45.312 NotebookApp] Looking for jupyter_config in
/home/jec/.sage//jupyter-4.1
[D 12:11:45.312 NotebookApp] Looking for jupyter_config in /home/jec
[D 12:11:45.313 NotebookApp] Looking for jupyter_notebook_config in
/etc/jupyter
[D 12:11:45.313 NotebookApp] Looking for jupyter_notebook_config in
/usr/local/etc/jupyter
[D 12:11:45.313 NotebookApp] Looking for jupyter_notebook_config in
/usr/local/sage/sage-2/local/etc/jupyter
[D 12:11:45.313 NotebookApp] Loaded config file:
/usr/local/sage/sage-2/local/etc/jupyter/jupyter_notebook_config.py
[D 12:11:45.314 NotebookApp] Looking for jupyter_notebook_config in
/home/jec/.sage//jupyter-4.1
[D 12:11:45.314 NotebookApp] Loaded config file:
/home/jec/.sage/jupyter-4.1/jupyter_notebook_config.json
[D 12:11:45.314 NotebookApp] Looking for jupyter_notebook_config in
/home/jec
[I 12:11:45.315 NotebookApp] Using MathJax: nbextensions/mathjax/MathJax.js
[I 12:11:45.637 NotebookApp] The port 8888 is already in use, trying
another port.
[D 12:11:45.641 NotebookApp] Paths used for configuration of
jupyter_notebook_config:
    /etc/jupyter/jupyter_notebook_config.json
[D 12:11:45.641 NotebookApp] Paths used for configuration of
jupyter_notebook_config:
    /usr/local/etc/jupyter/jupyter_notebook_config.json
[D 12:11:45.642 NotebookApp] Paths used for configuration of
jupyter_notebook_config:
    /usr/local/sage/sage-2/local/etc/jupyter/jupyter_notebook_config.json
[D 12:11:45.642 NotebookApp] Paths used for configuration of
jupyter_notebook_config:
    /home/jec/.sage//jupyter-4.1/jupyter_notebook_config.json
[I 12:11:45.645 NotebookApp] Serving notebooks from local directory:
/home/jec
[I 12:11:45.645 NotebookApp] 0 active kernels
[I 12:11:45.645 NotebookApp] The Jupyter Notebook is running at:
[I 12:11:45.645 NotebookApp] http://localhost:8889/
[I 12:11:45.645 NotebookApp] Use Control-C to stop this server and shut
down all kernels (twice to skip confirmation).


If I then open the browser and put localhost:8889/  in, I still get the
password prompt and the command lone shows

[I 12:15:00.552 NotebookApp] 302 GET / (::1) 0.93ms
[I 12:15:00.607 NotebookApp] 302 GET /tree? (::1) 1.87ms
[D 12:15:00.617 NotebookApp] Using contents: services/contents
[D 12:15:00.674 NotebookApp] Path base/images/favicon.ico served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/base/images/favicon.ico
[D 12:15:00.675 NotebookApp] Path
components/jquery-ui/themes/smoothness/jquery-ui.min.css served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/jquery-ui/themes/smoothness/jquery-ui.min.css
[D 12:15:00.675 NotebookApp] Path
components/jquery-typeahead/dist/jquery.typeahead.min.css served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/jquery-typeahead/dist/jquery.typeahead.min.css
[D 12:15:00.675 NotebookApp] Path style/style.min.css served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/style/style.min.css
[D 12:15:00.677 NotebookApp] Path auth/css/override.css served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/auth/css/override.css
[D 12:15:00.677 NotebookApp] Path components/es6-promise/promise.min.js
served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/es6-promise/promise.min.js
[D 12:15:00.677 NotebookApp] Path components/preact/index.js served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/preact/index.js
[D 12:15:00.677 NotebookApp] Path components/proptypes/index.js served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/proptypes/index.js
[D 12:15:00.678 NotebookApp] Path components/preact-compat/index.js served
from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/preact-compat/index.js
[D 12:15:00.678 NotebookApp] Path components/requirejs/require.js served
from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/components/requirejs/require.js
[D 12:15:00.679 NotebookApp] Path base/images/logo.png served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/base/images/logo.png
[D 12:15:00.680 NotebookApp] 200 GET /login?next=%2Ftree%3F (::1) 70.99ms
[D 12:15:00.710 NotebookApp] Path custom.css served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/custom/custom.css
[D 12:15:00.711 NotebookApp] 304 GET /custom/custom.css (::1) 2.39ms
[D 12:15:00.763 NotebookApp] Path auth/js/main.min.js served from
/usr/local/sage/sage-2/local/lib/python2.7/site-packages/notebook/static/auth/js/main.min.js
[D 12:15:00.764 NotebookApp] 304 GET /static/auth/js/main.min.js (::1)
2.14ms

and still no token is appearing.

Luckily I have other computers all working fine with 8.3, on which I have
moved my current work...

John



>
>
>
> On Thursday, August 9, 2018 at 10:25:44 AM UTC+2, John Cremona wrote:
>>
>>
>>
>> On 9 August 2018 at 08:26, Volker Braun <vbrau...@gmail.com> wrote:
>>
>>> The token does get generated for me, are you sure you don't have any
>>> funny configuration files in ~/.jupyter
>>>
>>
>> The is nothing in there except for a file 'migrated' containing
>> 2016-09-02T15:23:38.838391
>> (with no newline).  I have never done anything to configure jupyter.
>>
>> As I said, it worked always before I built 8.3.
>>
>>
>>> Unless you override it in the config, the generated url should have this
>>> form (including the access token):
>>>
>>> [I 09:21:59.267 NotebookApp] The Jupyter Notebook is running at:
>>> [I 09:21:59.267 NotebookApp] http://localhost:8889/?token=0
>>> df6ca362c920415eb1990bcfa4122baa094a3fdfa0f3709
>>>
>>
>> Yes, that is what I have always seen before.
>>
>> I installed the package Dima suggested but that does not affect this
>> issue.  It still behaves as it did yesterday.  Now the output is
>>
>>
>> $ sage --notebook=jupyter
>> ┌────────────────────────────────────────────────────────────────────┐
>> │ SageMath version 8.3, Release Date: 2018-08-03                     │
>> │ Type "notebook()" for the browser-based notebook interface.        │
>> │ Type "help()" for help.                                            │
>> └────────────────────────────────────────────────────────────────────┘
>> Please wait while the Sage Jupyter Notebook server starts...
>> [I 09:13:40.197 NotebookApp] Using MathJax: nbextensions/mathjax/MathJax.j
>> s
>> [I 09:13:40.455 NotebookApp] The port 8888 is already in use, trying
>> another port.
>> [I 09:13:40.460 NotebookApp] Serving notebooks from local directory:
>> /home/jec/.jupyter
>> [I 09:13:40.460 NotebookApp] 0 active kernels
>> [I 09:13:40.460 NotebookApp] The Jupyter Notebook is running at:
>> [I 09:13:40.461 NotebookApp] http://localhost:8889/
>> [I 09:13:40.461 NotebookApp] Use Control-C to stop this server and shut
>> down all kernels (twice to skip confirmation).
>> [68140:68140:0809/091341.230252:ERROR:sandbox_linux.cc(378)]
>> InitializeSandbox() called with multiple threads in process gpu-process.
>> [I 09:13:41.671 NotebookApp] 302 GET /tree (::1) 1.48ms
>> Created new window in existing browser session.
>>
>> and the new window asks or a password.  I still think it is something to
>> do with this:
>>
>> $ ps aux | grep jupyt
>> lowry    12387  0.0  0.0 137702340 844 ?       S     2017   0:00 python
>> -m sage.repl.ipython_kernel -f /run/user/1074/jupyter/kernel-
>> 6a00c63e-3725-4a1f-9675-d31f3ca4346d.json
>> lowry    13787  0.0  0.0 146488296 3404 ?      S     2017   0:00 python
>> -m sage.repl.ipython_kernel -f /run/user/1074/jupyter/kernel-
>> 6a00c63e-3725-4a1f-9675-d31f3ca4346d.json
>> lowry    49983  0.0  0.0 137942964 330344 ?    Ssl  Jul27   9:19 python
>> -m sage.repl.ipython_kernel -f /run/user/1074/jupyter/kernel-
>> 10384626-e3c4-4112-99fc-c9f3f72db136.json
>> lowry    51560  0.0  0.0 138009880 336400 ?    Ssl  Jul27   0:54 python
>> -m sage.repl.ipython_kernel -f /run/user/1074/jupyter/kernel-
>> 234bb5d0-b319-4b11-91bb-b8a5d0bb4a9d.json
>> lowry    56073  0.0  0.0 415368 36708 pts/51   Sl+  Feb11  41:44 python
>> /usr/local/sage/sage-2/src/bin/sage-notebook --notebook=jupyter
>> --port=8888
>> lowry    56179  0.0  0.4 3498740 2449576 ?     Ssl  Feb11  15:55
>> /usr/local/sage/sage-2/local/bin/python -m ipykernel_launcher -f
>> /run/user/1074/jupyter/kernel-10500b86-2757-4ba6-9504-7ad81c57e5c4.json
>> jec      67068  0.0  0.0  14220  1012 pts/5    S+   09:12   0:00 grep
>> --color=auto jupyt
>>
>> but the user in question is currently somewhere in deepest Iceland.
>>
>> If I simply run chromium-browser on this machine (which I am logging in
>> to remotely) I see those error messages:
>>
>> $ chromium-browser
>> [68969:68969:0809/091759.024888:ERROR:sandbox_linux.cc(378)]
>> InitializeSandbox() called with multiple threads in process gpu-process.
>> [68932:69172:0809/091759.442701:ERROR:bus.cc(394)] Failed to connect to
>> the bus: Could not parse server address: Unknown address type (examples of
>> valid types are "tcp" and on UNIX "unix")
>> [68932:68932:0809/091759.537307:ERROR:gpu_process_transport_factory.cc(1016)]
>> Lost UI shared context.
>>
>> (chromium-browser:68932): LIBDBUSMENU-GLIB-WARNING **: Unable to get
>> session bus: Unknown or unsupported transport 'disabled' for address
>> 'disabled:'
>>
>> which at least shows that some of the error messages I get when trying to
>> run Sage jupyter notebook are nothing to do with Sage.
>>
>>
>>
>>
>>>
>>>
>>> On Wednesday, August 8, 2018 at 5:38:03 PM UTC+2, John Cremona wrote:
>>>>
>>>> I just updagred to 8.3 on a machine (ubuntu 16.04) where I have
>>>> frequently run Sage both command-line and jupyter notebook previously.  Now
>>>> when I type
>>>>
>>>> sage --notebook=jupyter
>>>>
>>>> I see
>>>>
>>>> ┌────────────────────────────────────────────────────────────────────┐
>>>> │ SageMath version 8.3, Release Date: 2018-08-03                     │
>>>> │ Type "notebook()" for the browser-based notebook interface.        │
>>>> │ Type "help()" for help.                                            │
>>>> └────────────────────────────────────────────────────────────────────┘
>>>> Please wait while the Sage Jupyter Notebook server starts...
>>>> [I 16:32:21.039 NotebookApp] Using MathJax:
>>>> nbextensions/mathjax/MathJax.js
>>>> [I 16:32:21.347 NotebookApp] The port 8888 is already in use, trying
>>>> another port.
>>>> [I 16:32:21.353 NotebookApp] Serving notebooks from local directory:
>>>> /home/jec/sage-scripts
>>>> [I 16:32:21.353 NotebookApp] 0 active kernels
>>>> [I 16:32:21.353 NotebookApp] The Jupyter Notebook is running at:
>>>> [I 16:32:21.353 NotebookApp] http://localhost:8889/
>>>> [I 16:32:21.354 NotebookApp] Use Control-C to stop this server and shut
>>>> down all kernels (twice to skip confirmation).
>>>> Gtk-Message: Failed to load module "pk-gtk-module"
>>>> Gtk-Message: Failed to load module "pk-gtk-module"
>>>> [54010:54010:0808/163222.159037:ERROR:sandbox_linux.cc(378)]
>>>> InitializeSandbox() called with multiple threads in process gpu-process.
>>>> [53973:54212:0808/163222.855277:ERROR:bus.cc(394)] Failed to connect
>>>> to the bus: Could not parse server address: Unknown address type (examples
>>>> of valid types are "tcp" and on UNIX "unix")
>>>> [53973:53973:0808/163222.961497:ERROR:gpu_process_transport_factory.cc(1016)]
>>>> Lost UI shared context.
>>>>
>>>> (chromium-browser:53973): LIBDBUSMENU-GLIB-WARNING **: Unable to get
>>>> session bus: Unknown or unsupported transport 'disabled' for address
>>>> 'disabled:'
>>>> [I 16:32:22.976 NotebookApp] 302 GET /tree (::1) 2.53ms
>>>>
>>>>
>>>> and the browser which pops up has a plain login page asking for a
>>>> password.  There is a different user currently running some sessions (2 of
>>>> which look stale as they have been running since 2017) which is why it
>>>> switched from port 8888 to 8889, but I think from the above output that the
>>>> switch is incomplete and it wants me to log into his session on port 8888.
>>>> Perhaps.
>>>>
>>>> John
>>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "sage-support" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to sage-support...@googlegroups.com.
>>> To post to this group, send email to sage-s...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/sage-support.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "sage-support" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sage-support+unsubscr...@googlegroups.com.
> To post to this group, send email to sage-support@googlegroups.com.
> Visit this group at https://groups.google.com/group/sage-support.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"sage-support" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-support+unsubscr...@googlegroups.com.
To post to this group, send email to sage-support@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-support.
For more options, visit https://groups.google.com/d/optout.

Reply via email to