Ask Your Question
0

Error starting notbook: No available port on Ubuntu 10.10

asked 2012-02-02 22:46:21 -0500

ufechner gravatar image

Hello,

I am using ubuntu 10.10, 32 bit and sage 4.8.

When I try to start the notebook I get the following error message:

    ----------------------------------------------------------------------
| Sage Version 4.8, Release Date: 2012-01-20                         |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------
sage: notebook(reset=true)
The notebook files are stored in: sage_notebook.sagenb



Please choose a new password for the Sage Notebook 'admin' user.
Do _not_ choose a stupid password, since anybody who could guess your password
and connect to your machine could access or delete your files.
NOTE: Only the md5 hash of the password you type is stored by Sage.
You can change your password by typing notebook(reset=True).



Enter new password: 
Retype new password: 
Please login to the notebook with the username 'admin' and the above password.
Password changed for user 'admin'.
ERROR: An unexpected error occurred while tokenizing input
The following traceback may be corrupted or invalid
The error message is: ('EOF in multi-line statement', (97, 0))

---------------------------------------------------------------------------
RuntimeError                              Traceback (most recent call last)

/home/ufechner/.sage/<ipython console> in <module>()

/opt/sage-4.8-linux-32bit-ubuntu_10.04_lts-i686-Linux/devel/sagenb/sagenb/notebook/notebook_object.pyc in __call__(self, *args, **kwds)
    215     """
    216     def __call__(self, *args, **kwds):
--> 217         return self.notebook(*args, **kwds)
    218 
    219     notebook = run_notebook.notebook_twisted

/opt/sage-4.8-linux-32bit-ubuntu_10.04_lts-i686-Linux/devel/sagenb/sagenb/notebook/run_notebook.pyc in notebook_twisted(self, directory, port, interface, address, port_tries, secure, reset, accounts, require_login, server_pool, ulimit, timeout, open_viewer, sagetex_path, start_path, fork, quiet, subnets)
    441             print "*" * 70
    442 
--> 443     port = find_next_available_port(interface, port, port_tries)
    444     if open_viewer:
    445         "Open viewer automatically isn't fully implemented.  You have to manually open your web browser to the above URL."

/opt/sage-4.8-linux-32bit-ubuntu_10.04_lts-i686-Linux/devel/sagenb/sagenb/misc/misc.pyc in find_next_available_port(interface, start, max_tries, verbose)
    132             print "Port %s is already in use."%port
    133             print "Trying next port..."
--> 134     raise RuntimeError, "no available port."
    135 
    136 

RuntimeError: no available port.
sage:

Any idea how to fix this? I don't have any firewall running.

Best regards:

Uwe Fechner

edit retag flag offensive close merge delete

4 answers

Sort by ยป oldest newest most voted
0

answered 2014-11-13 09:51:43 -0500

As it seems, people tend to have this problem when specifying an interface different from 'lo', because the interface parameter in fact refers to the ip address of an interface, not its symbolic name. In your case I'd guess the 'lo' interface itself didn't exist in the first place.

edit flag offensive delete link more

Comments

kcrisman gravatar imagekcrisman ( 2015-07-02 19:41:38 -0500 )edit
0

answered 2012-02-18 17:31:44 -0500

SirFibonacci gravatar image

If you do have a firewall running, it's likely to be ufw (uncomplicated firewall), the default firewall on Ubuntu. However, it shouldn't be enabled by default.

AFAIK, you can manually disable ufw by typing:

sudo ufw disable
edit flag offensive delete link more
0

answered 2012-02-03 11:51:57 -0500

Volker Braun gravatar image

I bet you actually have a firewall running.

The only alternative is that another program has already bound port 8000, you can chcek with

 netstat  -p -l -n | grep 8000
edit flag offensive delete link more

Comments

1

No other program is using port 8000. Any idea, how to check if a firewall is running?

ufechner gravatar imageufechner ( 2012-02-06 00:58:41 -0500 )edit
0

answered 2012-02-03 06:56:22 -0500

Jason Grout gravatar image

Try specifying the port with notebook(port=8080). Is another Sage notebook instance running?

edit flag offensive delete link more

Comments

I tried to specify the port. Same error message. An other notebook instance is not running.

ufechner gravatar imageufechner ( 2012-02-06 00:56:45 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-02-02 22:46:21 -0500

Seen: 792 times

Last updated: Nov 13 '14