4

I am trying to install the IPython html notebook server on dotCloud. The IPython server uses tornado with websockets (and other internal communications using zeromq on tcp sockets).

Hhere's my dotcloud.yml:

www:          
    type: custom
    buildscript: builder
    ports:
       nbserver: tcp

I am following the custom port recipes given here and here. As the logs show, I run the tornado server on 127.0.0.1:$DOTCLOUD_WWW_NBSERVER_PORT:

/var/log/supervisor/www.log:

[NotebookApp] The IPython Notebook is running at: 'http://127.0.0.1:35928/'
[NotebookApp] Use Control-C to stop this server and shut down all kernels.

But when I push, the dotCloud CLI tells me:

WARNING: The service crashed at startup or is listening to the wrong port. It failed to >respond on port "nbserver" (42801) within 30 seconds. Please check the application logs.
...
Deployment finished. Your application is available at the following URLs No URL found. That's ok, it means that your application does not include a webservice."

There's nothing on my-app.dotcloud.com or my-app.dotcloud.com:DOTCLOUD_WWW_NBSERVER_PORT

What am I missing here? Thanks for your help.

UPDATE

Issue solved. The usual HTTP port works fine with websockets so the custom port recipes are not required. This is my new dotcloud.yml:

www:
 type: custom
 buildscript: builder
 ports:
   web: http

works with the following in ipython_notebook_config.py:

 c.NotebookApp.ip = '*'

This makes it so that the tornado webserver listens to all ip addresses.

WARNING: setup security and authentication first!

See Running a Public Notebook Server for more information.

Community
  • 1
  • 1

1 Answers1

0

Glad you got it working!

In the future, and for other readers, you actually want your app to listen on $PORT_NBSERVER and then connect to it on DOTCLOUD_WWW_NBSERVER_PORT. $PORT_NBSERVER is the local port while the latter is the port that's exposed to the outside world through our routing/NAT layer.

If you have any other issue, don't hesitate to reach out to us at http://support.dotcloud.com

Source: I'm a dotCloud employee.

Charles Hooper
  • 2,598
  • 1
  • 17
  • 15
  • Ok, but if the ws is being served via standard http port the DOTCLOUD_WWW_NBSERVER_PORT part shouldn't be necessary right? We should use http ports or tcp ones for websockets? – brutuscat Nov 05 '12 at 08:53