1

I found data science environment image on Kitematic and so I installed and tried use it. But Although I could successfully ran and logs say that

The IPython Notebook is running at: https://[all ip addresses on your system]:8888/

, I cannot open localhost:8888. Could someone help?

Docker port:8888

MAC IP port: 192.168.99.100:32768

Below is Container log on Kitematic.

Generating a 2048 bit RSA private key
...................................+++
........................................................+++
writing new private key to '/key.pem'
-----
[W 22:46:12.956 NotebookApp](B Unrecognized alias: '--matplotlib=inline', it will probably have no effect.
[I 22:46:12.966 NotebookApp](B Writing notebook server cookie secret to /root/.ipython/profile_default/security/notebook_cookie_secret
[I 22:46:12.968 NotebookApp](B Using MathJax from CDN: https://cdn.mathjax.org/mathjax/latest/MathJax.js
[I 22:46:13.013 NotebookApp](B Serving notebooks from local directory: /notebooks
[I 22:46:13.015 NotebookApp](B 0 active kernels 
[I 22:46:13.015 NotebookApp](B The IPython Notebook is running at: https://[all ip addresses on your system]:8888/
[I 22:46:13.016 NotebookApp](B Use Control-C to stop this server and shut down all kernels (twice to skip confirmation).
[W 22:46:49.788 NotebookApp](B SSL Error on 7 ('192.168.99.1', 63676): [Errno 1] _ssl.c:510: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
[E 22:46:49.797 NotebookApp](B Uncaught exception
    Traceback (most recent call last):
      File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 693, in _server_request_loop
        ret = yield conn.read_response(request_delegate)
      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
        value = future.result()
      File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
        raise_exc_info(self._exc_info)
      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 876, in run
        yielded = self.gen.throw(*exc_info)
      File "/usr/local/lib/python2.7/dist-packages/tornado/http1connection.py", line 168, in _read_message
        quiet_exceptions=iostream.StreamClosedError)
      File "/usr/local/lib/python2.7/dist-packages/tornado/gen.py", line 870, in run
        value = future.result()
      File "/usr/local/lib/python2.7/dist-packages/tornado/concurrent.py", line 215, in result
        raise_exc_info(self._exc_info)
      File "<string>", line 3, in raise_exc_info
    SSLError: [Errno 1] _ssl.c:510: error:1408F10B:SSL routines:SSL3_GET_RECORD:wrong version number
user3368526
  • 2,168
  • 10
  • 37
  • 52

1 Answers1

0

If you are not on Linux, you would need to port-forward 8888 to your actual host (Windows or Mac) through the VM.
See "Connect to a Service running inside a docker container from outside"

VBoxManage controlvm "default" natpf1 "tcp-port8888,tcp,,8888,,8888"
VBoxManage controlvm "default" natpf1 "udp-port8888,udp,,8888,,8888"

(Replace default with the name of your docker-machine: see docker-machine ls)

You can also try and use directly the IP of your docker machine:

docker-machine IP <name of VM>
Community
  • 1
  • 1
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250
  • Thanks VonC :) When I tried the first line of the code, I got this error. Syntax error: Invalid parameter '--natpf1' Do you know how to fix it? – user3368526 Feb 01 '16 at 17:00
  • What is your version of VirtualBox? – VonC Feb 01 '16 at 17:01
  • The version is 5.0.14 – user3368526 Feb 01 '16 at 17:23
  • @user3368526 I have fixed the syntax (after reading https://www.virtualbox.org/manual/ch08.html#vboxmanage-controlvm) – VonC Feb 01 '16 at 19:14
  • Thanks so much for the reply VonC :) The code worked but I cannot still access to the notebook (http://localhost:8888).. Do you have any ideas what's going on? I'm using kitematic to run the data-sciecne-environment image. – user3368526 Feb 01 '16 at 20:14
  • @user3368526 Check your Network setting of the VM to see that the ports are forwarded. And then check in your ssh session (docker-machine ssh) if the container is running with its port published to 8888, as explained in http://stackoverflow.com/a/35126026/6309 – VonC Feb 01 '16 at 20:19
  • When I "docker ps", I see 0.0.0.0:32774->8888/tcp, 0.0.0.0:32778->8888/tcp. I think it's forwarded as I expected? – user3368526 Feb 01 '16 at 21:02
  • VonC, thank you very much for your replies. I really appreciate it. I added container logs in the question. – user3368526 Feb 02 '16 at 15:35
  • @user3368526 Any chance to try and run it without using Kinematic? With docker run commands, a bit like in https://www.dataquest.io/blog/data-science-quickstart-with-docker/? – VonC Feb 02 '16 at 16:49