Problem starting Notebook

482 views
Skip to first unread message

phil

unread,
Feb 13, 2008, 1:00:33 PM2/13/08
to sage-newbie
I downloaded sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux.tar.gz
and unarchived it. Sage starts and seems to run ok. But running
"notebook()" to start a notebook is not working. It prompts to enter
a passphrase and domain name to create a certificate. Then there is
an exception that says: "<type 'exceptions.IOError'>: [Errno 2] No
such file or directory: '/home/evolution/.sage/dsage/dsage_key.pub'"
When I look in /home/evolution/.sage/dsage, I do not see
dsage_key.pub, but I do see cacert.pem, cert.cfg, db, and pubcert.pem.
I am missing a dependency of some sort or is something else wrong?

Thanks

William Stein

unread,
Feb 13, 2008, 3:29:43 PM2/13/08
to sage-...@googlegroups.com

Specify exaclty what computer you're running this on (os, hardware, etc.),
and send the complete exact output from Sage when you do the following:

(1) rm -rf $HOME/.sage
(2) sage: notebook()

Also, you can try the insecure notebook:
sage: inotebook()

It's more likely to work and is fine to use if you are the
only user on your computer.

William

phil

unread,
Feb 13, 2008, 5:38:50 PM2/13/08
to sage-newbie


On Feb 13, 12:29 pm, "William Stein" <wst...@gmail.com> wrote:
>
> Specify exaclty what computer you're running this on (os, hardware, etc.),
> and send the complete exact output from Sage when you do the following:
I am using Sage on Ubuntu 7.10 on a Core 2 Duo T7200.

> (1) rm -rf $HOME/.sage
> (2) sage: notebook()
Insecure notebook works. For secure notebook, I get:

sage: notebook()
The notebook files are stored in: /home/evolution/.sage//sage_notebook



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:
That password is way too short. Enter a password with at least 6
characters.
Enter new password:
Retype new password:
Please login to the notebook with the username 'admin' and the above
password.
Password changed for user 'admin'.
In order to use an SECURE encrypted notebook, you must first run
notebook.setup().
Now running notebook.setup()
Using dsage certificates.
Creating /home/evolution/.sage/dsage
--------------------------------------------------
Generating public/private key pair for authentication...
Your key will be stored in /home/evolution/.sage/dsage/dsage_key
Just hit enter when prompted for a passphrase
--------------------------------------------------
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
passphrase too short: have 3 bytes, need > 4
Saving the key failed: /home/evolution/.sage/dsage/dsage_key.


Client configuration finished.

Worker configuration finished.

Choose a domain name for your SAGE notebook server,
for example, localhost (personal use) or evolution-laptop (to allow
outside connections).
Domain name [localhost]:
Using default localhost
--------------------------------------------------
Generating SSL certificate for server...
Using openssl to generate key
openssl genrsa > /home/evolution/.sage/dsage/cacert.pem
Generating RSA private key, 512 bit long modulus
.....++++++++++++
.++++++++++++
e is 65537 (0x10001)
Generating a self signed certificate...
X.509 Certificate Information:
Version: 3
Serial Number (hex): 5f9abfd9
Validity:
Not Before: Wed Feb 13 22:34:44 UTC 2008
Not After: Sun Jul 1 22:34:44 UTC 2035
Subject: C=US,O=SAGE (at
localhost),OU=389,ST=Washington,CN=localhost,UID=sage_user
Subject Public Key Algorithm: RSA
Modulus (bits 512):
aa:01:70:ed:6b:55:9d:8d:2c:a2:4e:3b:02:c6:9b:
3d
e5:97:e3:b5:29:51:5d:e5:e1:02:2b:2d:3c:50:4e:
41
6e:79:63:9f:2d:23:bc:30:c6:e4:05:d1:e6:7e:8e:
51
ce:8c:60:0b:93:b7:07:c0:c3:6d:c3:bc:53:37:ee:
37
Exponent:
01:00:01
Extensions:
Basic Constraints (critical):
Certificate Authority (CA): FALSE
Key Purpose (not critical):
TLS WWW Server.
Key Usage (critical):
Digital signature.
Key encipherment.
Subject Key Identifier (not critical):
ebaa800c53fc1acb5aca20f06c7a330c9bd9f843
Other Information:
Public Key Id:
ebaa800c53fc1acb5aca20f06c7a330c9bd9f843



Signing certificate...
--------------------------------------------------
---------------------------------------------------------------------------
<type 'exceptions.IOError'> Traceback (most recent call
last)

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

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/server/notebook/notebook_object.py in
__call__(self, *args, **kwds)
135 """
136 def __call__(self, *args, **kwds):
--> 137 return self.notebook(*args, **kwds)
138
139 notebook = run_notebook.notebook_twisted

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/server/notebook/run_notebook.py in
notebook_twisted(self, directory, port, address, port_tries, secure,
reset, accounts, server_pool, ulimit, timeout, open_viewer,
sagetex_path, start_path)
243 if open_viewer:
244 "Open viewer automatically isn't fully implemented.
You have to manually open your web browser to the above URL."
--> 245 run(port)
246
247 return True

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/server/notebook/run_notebook.py in
run(port)
133 print "In order to use an SECURE encrypted
notebook, you must first run notebook.setup()."
134 print "Now running notebook.setup()"
--> 135 notebook_setup()
136 if not os.path.exists(private_pem) or not
os.path.exists(public_pem):
137 print "Failed to setup notebook. Please try
notebook.setup() again manually."

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/server/notebook/run_notebook.py in
notebook_setup(self)
37 dsage = os.path.join(DOT_SAGE, 'dsage')
38 import sage.dsage.all
---> 39 sage.dsage.all.dsage.setup()
40 shutil.copyfile(dsage + '/cacert.pem', private_pem)
41 shutil.copyfile(dsage + '/pubcert.pem', public_pem)

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/dsage/dsage.py in setup(self,
template)
265
266 from sage.dsage.scripts.dsage_setup import
setup
--> 267 setup(template=template)
268
269 def setup_server(self, *args):

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/dsage/scripts/dsage_setup.py in
setup(template)
207 setup_client()
208 setup_worker()
--> 209 setup_server(template=template)
210 print "Configuration finished.."
211

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/dsage/scripts/dsage_setup.py in
setup_server(template)
200
201 # add default user
--> 202 add_default_user()
203
204 print "Server configuration finished.\n\n"

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/sage/dsage/scripts/dsage_setup.py in
add_default_user()
70 clientdb = ClientDatabase()
71 pubkey = base64.encodestring(
---> 72
keys.getPublicKeyString(filename=pubkey_file).strip())
73 if clientdb.get_user(username) is None:
74 clientdb.add_user(username, pubkey)

/home/evolution/sage-sage-2.10.1-linux-ubuntu32bit-i686-Linux/local/
lib/python2.5/site-packages/twisted/conch/ssh/keys.py in
getPublicKeyString(filename, line, data)
46 """
47 if filename:
---> 48 lines = open(filename).readlines()
49 data = lines[line]
50 if data[0] == '{': # lsh key

William Stein

unread,
Feb 13, 2008, 5:48:52 PM2/13/08
to sage-...@googlegroups.com
The error

> Enter passphrase (empty for no passphrase):
> Enter same passphrase again:
> passphrase too short: have 3 bytes, need > 4
> Saving the key failed: /home/evolution/.sage/dsage/dsage_key.

appears below. Try doing the procedure but actually
enter a reasonable passphrase (or an empty one), and
report back what happens.

--
William Stein
Associate Professor of Mathematics
University of Washington
http://wstein.org

phil

unread,
Feb 14, 2008, 2:00:29 PM2/14/08
to sage-newbie
On Feb 13, 2:48 pm, "William Stein" <wst...@gmail.com> wrote:
> The error
>
> > Enter passphrase (empty for no passphrase):
> > Enter same passphrase again:
> > passphrase too short: have 3 bytes, need > 4
> > Saving the key failed: /home/evolution/.sage/dsage/dsage_key.
>
> appears below. Try doing the procedure but actually
> enter a reasonable passphrase (or an empty one), and
> report back what happens.

Good catch. I missed it in the jumble of error messages.
Using a longer pass phrase solved the problem. It seems somewhat odd
that it allows no pass phrase but not short pass phrases.
Reply all
Reply to author
Forward
0 new messages