Opened 3 years ago

Closed 3 years ago

#26732 closed defect (fixed)

Docker image fails to start jupyter notebook

Reported by: saraedum Owned by:
Priority: critical Milestone: sage-8.5
Component: distribution Keywords:
Cc: embray Merged in:
Authors: Julian Rüth Reviewers: Erik Bray
Report Upstream: N/A Work issues: waiting for the CI pipeline to see that this actually works
Branch: 3eda7e3 (Commits, GitHub, GitLab) Commit: 3eda7e31164e38ebdbadf3de4c1c7714529cc0e7
Dependencies: Stopgaps:

Status badges

Description

In the latest beta, 8.5.beta4, the docker images that we build automatically failed its self tests because it could not spawn the jupyter notebook anymore:

docker run --name sage-jupyter -d sagemath/sagemath:8.5.beta4 sage-jupyter
[…]
[I 01:44:23.585 NotebookApp] Using MathJax: nbextensions/mathjax/MathJax.js
[I 01:44:23.649 NotebookApp] Writing notebook server cookie secret to /home/sage/.local/share/jupyter/runtime/notebook_cookie_secret
SageMath version 8.5.beta4, Release Date: 2018-11-18
Please wait while the Sage Jupyter Notebook server starts...
Traceback (most recent call last):
  File "/home/sage/sage/src/bin/sage-notebook", line 268, in <module>
    launcher(unknown)
  File "/home/sage/sage/src/bin/sage-notebook", line 100, in __init__
    main(argv)
  File "/home/sage/sage/local/lib/python2.7/site-packages/jupyter_core/application.py", line 266, in launch_instance
    return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
  File "/home/sage/sage/local/lib/python2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
    app.initialize(argv)
  File "<decorator-gen-7>", line 2, in initialize
  File "/home/sage/sage/local/lib/python2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
    return method(app, *args, **kwargs)
  File "/home/sage/sage/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 1629, in initialize
    self.init_webapp()
  File "/home/sage/sage/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 1379, in init_webapp
    self.jinja_environment_options,
  File "/home/sage/sage/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 158, in __init__
    default_url, settings_overrides, jinja_env_options)
  File "/home/sage/sage/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 251, in init_settings
    allow_remote_access=jupyter_app.allow_remote_access,
  File "/home/sage/sage/local/lib/python2.7/site-packages/traitlets/traitlets.py", line 556, in __get__
    return self.get(obj, cls)
  File "/home/sage/sage/local/lib/python2.7/site-packages/traitlets/traitlets.py", line 535, in get
    value = self._validate(obj, dynamic_default())
  File "/home/sage/sage/local/lib/python2.7/site-packages/notebook/notebookapp.py", line 872, in _default_allow_remote
    for info in socket.getaddrinfo(self.ip, self.port, 0, socket.SOCK_STREAM):
socket.gaierror: [Errno -2] Name or service not known

Apparently one of the parameters of jupyter has changed with one of the recent upgrades, see https://stackoverflow.com/questions/52706238/jupyter-throwing-error-socket-gaierror-errno-2-name-or-service-not-known.

Change History (8)

comment:1 Changed 3 years ago by saraedum

  • Branch set to u/saraedum/26732

comment:2 Changed 3 years ago by saraedum

  • Commit set to 3eda7e31164e38ebdbadf3de4c1c7714529cc0e7

We'll see if this does the trick here: https://gitlab.com/sagemath/dev/trac/pipelines/37426928


New commits:

3eda7e3Fix sage-jupyter command for latest jupyter

comment:3 Changed 3 years ago by saraedum

  • Status changed from new to needs_review
  • Work issues set to waiting for the CI pipeline to see that this actually works

comment:4 Changed 3 years ago by embray

Thanks. I had been seeing that failure as well but it was really odd, and I thought maybe just a temporary fluke. I wonder why they changed that... =_=

comment:5 Changed 3 years ago by embray

  • Reviewers set to Erik Bray
  • Status changed from needs_review to positive_review

comment:6 Changed 3 years ago by embray

Now test-jupyter passed, but test-dev failed with:

configure: error: "/home/sage/sage/build/pkgs/cephes/type" is missing.
If you would like to try to build Sage anyway (to help porting),
export the variable 'SAGE_PORT' to something non-empty.
Makefile:39: recipe for target 'build/make/Makefile' failed
make[1]: *** [build/make/Makefile] Error 1
make[1]: Leaving directory '/home/sage/sage'
Makefile:31: recipe for target 'base-toolchain' failed
make: *** [base-toolchain] Error 2
ERROR: Job failed: exit code 2

I have no idea what that's about. It doesn't make any sense. I think the cephes package may have been removed so something is going on here where removed SPKGs are not handled well on incremental builds...?

comment:7 Changed 3 years ago by saraedum

Right, cephes was removed 3ec2d4a2bfb28b8466dba010ab0e18fb6dfc7ef0 but the incremental build can not handle removing SPKGs it seems.

That's odd, because all it does is call make build. What would be searching for a removed SPKG? Let's discuss this in a follow up ticket: #26753.

comment:8 Changed 3 years ago by vbraun

  • Branch changed from u/saraedum/26732 to 3eda7e31164e38ebdbadf3de4c1c7714529cc0e7
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.