Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URL supplied by docker not working on Windows 10 #8

Closed
Robinlovelace opened this issue Aug 1, 2018 · 6 comments
Closed

URL supplied by docker not working on Windows 10 #8

Robinlovelace opened this issue Aug 1, 2018 · 6 comments

Comments

@Robinlovelace
Copy link

Reproducibile example on managed Windows 10 with docker:

docker run --rm -p 8788:8787 -v `pwd`:/home/gdser/host -it darribas/gds
/usr/local/bin/start-notebook.sh: ignoring /usr/local/bin/start-notebook.d/*

Container must be run with group root to update passwd file
Executing the command: jupyter notebook
[I 11:54:48.476 NotebookApp] Writing notebook server cookie secret to /home/jovyan/.local/share/jupyter/runtime/notebook_cookie_secret
[W 11:54:48.703 NotebookApp] WARNING: The notebook server is listening on all IP addresses and not using encryption. This is not recommended.
[I 11:54:48.745 NotebookApp] JupyterLab beta preview extension loaded from /opt/conda/lib/python3.6/site-packages/jupyterlab
[I 11:54:48.745 NotebookApp] JupyterLab application directory is /opt/conda/share/jupyter/lab
[I 11:54:48.850 NotebookApp] Serving notebooks from local directory: /home/jovyan
[I 11:54:48.850 NotebookApp] 0 active kernels
[I 11:54:48.851 NotebookApp] The Jupyter Notebook is running at:
[I 11:54:48.851 NotebookApp] http://9e3eb6dd4679:8888/?token=1ff76ee0bba7357eaadf3194feb11da07357f1fb741df0a4
[I 11:54:48.851 NotebookApp] Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[C 11:54:48.852 NotebookApp]

    Copy/paste this URL into your browser when you connect for the first time,
    to login with a token:
        http://9e3eb6dd4679:8888/?token=1ff76ee0bba7357eaadf3194feb11da07357f1fb741df0a4&token=1ff76ee0bba7357eaadf3194feb11da07357f1fb741df0a4
^C[I 11:55:36.801 NotebookApp] interrupted
Serving notebooks from local directory: /home/jovyan
0 active kernels
The Jupyter Notebook is running at:
http://9e3eb6dd4679:8888/?token=1ff76ee0bba7357eaadf3194feb11da07357f1fb741df0a4

I navigate to that url and get nothing, it says We can’t connect to the server at 9e3eb6dd4679. on Firefox. Wonder if it's a firewall issue. Note:

 docker run -p 8888:8888 jupyter/scipy-notebook:2c80cf3537ca

and

docker run -d -p 8787:8787 -v ${pwd}:/home/rstudio/data robinlovelace/geocompr

work fine. Wonder if it's related to https://groups.google.com/forum/#!topic/springer-data-science-for-transport/Ld2_yFLenCg (cc @charles-fox fyi)

@darribas
Copy link
Owner

darribas commented Aug 1, 2018

It's a known bug of that version of the jupyter container:

jupyter/docker-stacks#642

For a solution, replace the container id (9e3eb6dd4679 in your case) by localhost. That should do it.

@darribas darribas closed this as completed Aug 1, 2018
@Robinlovelace
Copy link
Author

Thanks for the fix. To clarify, what would I change in (or before running) this command:

 docker run --rm -p 8788:8787 -v `pwd`:/home/gdser/host -it darribas/gds

Still can't get it to work.

@darribas
Copy link
Owner

darribas commented Aug 2, 2018

sorry, didn't realise of that. I think that command is outdated (haven't kept up the README as much as I should have). The jupyter/minimal-notebook exposes port 8888, so that'd have to change in the command above. Also, the latest version uses the jupyter setup, which is based on jovyan user. All in all, I think the following should work:

docker run -p 8888:8888 -v `pwd`:/home/jovyan/host -it darribas/gds

Keep in mind this will launch a notebook server, if you want to drop into the container for inspection:

docker run -p 8888:8888 -v `pwd`:/home/jovyan/host -it darribas/gds start.sh

will get you on the command line. Also, keep in mind you're mounting the current directory using pwd, so your host will need to have that bash utility. If you're on Windows, this might not work.

@Robinlovelace
Copy link
Author

Thanks for the fix. Happy to say it works, as illustrated below!

In case it's useful for others, these were the incantations:

 docker run -p 8888:8888 -v `pwd`:/home/jovyan/host -it darribas/gds

which displayed a message in the terminal with the pw. Not tried the one with start.sh but sure it'll work. Many thanks, great work supporting this.

image

@darribas
Copy link
Owner

darribas commented Aug 3, 2018

Excellent! Any chance you could issue a PR into this repo with an updated README.md that includes instructions that actually work? ;)

Also, is this running on Windows or Linux machine (just out of curiosity)?

@Robinlovelace
Copy link
Author

Windows desktop in ITS.

Robinlovelace added a commit to Robinlovelace/gds_env that referenced this issue Aug 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants