unable to start Sage notebook after VMware/Windows crash

65 views
Skip to first unread message

Brian

unread,
Sep 29, 2010, 4:31:22 PM9/29/10
to sage-support
Hi,

I'm using Sage in a commercial environment to perform physics
simulations of optical systems. As our computing environment is XP,
I'm running Sage on WinXP in VMware Player 3.1.0 build-261024.

This morning, after suspending my machine, the VMware player froze. I
had to either power down, or just end the VMware Player. I apologize -
I can't recall which. It was right before an important meeting, so
things were rather rushed. (What I did *not* do was end VMware Player
using the Task Manager).

When I restarted VMware Player/Sage, I was unable to access my Sage
notebook. If I run the Sage Notebook script, the window closes with
some error message to fast to read. If I start up Firefox, I can load
internet files. I can also load an HTML version of the notebook I had
saved (since I've had Sage clear out the notebook file when the server
hangss!). However, if I try to evaluate cells, I get a "Searching for
Sage server" message in a red box at the top of the page.

I am able to open up the notebook - which, on my system, is at /home/
sage/.sage/sage_notebook.sagenb/home/admin/10/worksheet.html. However,
it is now blank (it was not this morning - I've taken to checking
because server crashes have previously over-wrtten my running notebook
with a blank file: a bug for another day!).

However, Firefox cannot find the Sage server. If I start up Firefox, I
get a "Service Temporarily Unavailable" message. (The server is
temporarily unable to service your request due to maintenance downtime
or capacity problems. Please try again later. Apache/2.2.12 (Ubuntu)
Server at localhost Port 80)

The usual "Point browser in MS Windows to http://xxx.xxx.xxx.xxx"
message appears.

If I start Sage from the command line, I get the following messages:

****
Please wait while the Sage Notebook server starts...
...
Traceback (most recent call last):
File "/home/sage/sage/local/bin/sage-notebook", line 36, in <module>
notebook(port=8000)
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/notebook/notebook_object.py", line
217, in __call__
return self.notebook(*args, **kwds)
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/notebook/run_notebook.py", line 174,
in notebook_twisted
nb = notebook.load_notebook(directory)
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/notebook/notebook.py", line 1706, in
load_notebook
nb = Notebook(dir)
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/notebook/notebook.py", line 88, in
__init__
self.__conf = S.load_server_conf()
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/storage/filesystem_storage.py", line
183, in load_server_conf
return self._basic_to_server_conf(self._load('conf.pickle'))
File "/home/sage/sage/local/lib/python2.6/site-packages/
sagenb-0.7.5.3-py2.6.egg/sagenb/storage/filesystem_storage.py", line
134, in _load
return cPickle.load(open(self._abspath(filename)))
EOFError
****

Can anyone tell me how to get the Sage server running/functional/
accessible again?

On a related note, can anyone tell me how to "execute" Sage on my
stored HTML (produced by Firefox "Save As" rather than the notebook's
"Save" button)?

Any help would be greatly appreciated, as the project lumbers on in
desperate and immediate need of these optical simulations!

Regards,

Brian King

Brian

unread,
Sep 29, 2010, 8:35:43 PM9/29/10
to sage-support
cont'd.
Oops. my apologies, I have Sage 4.4.alpha0 running on that VMware
player 3.1.0 build-261024...

Brian
> The usual "Point browser in MS Windows tohttp://xxx.xxx.xxx.xxx"

Dan Drake

unread,
Sep 29, 2010, 9:50:21 PM9/29/10
to sage-s...@googlegroups.com
On Wed, 29 Sep 2010 at 01:31PM -0700, Brian wrote:
> If I start Sage from the command line, I get the following messages:
>
> ****
> Please wait while the Sage Notebook server starts...
> ...
> Traceback (most recent call last):
[...]

> File "/home/sage/sage/local/lib/python2.6/site-packages/
> sagenb-0.7.5.3-py2.6.egg/sagenb/storage/filesystem_storage.py", line
> 134, in _load
> return cPickle.load(open(self._abspath(filename)))
> EOFError

According to the Python documentation, EOFError is raised when Python
expects some data from a file, but doesn't get any. My guess is that the
virtual machine got shut down improperly, and some files didn't get
written to disk correctly (or not at all). I'm not sure what to do to
fix this. One guess is to edit the filesystem_storage.py file, and just
above line 134, put something like "print self._abspath(filename)" to
figure out what file it is looking for.

Dan

--
--- Dan Drake
----- http://mathsci.kaist.ac.kr/~drake
-------

signature.asc

Brian

unread,
Sep 29, 2010, 11:32:58 PM9/29/10
to sage-support
Thanks, Dan.
I'll give that a try. I had figured that was probably the case - but
had no way to efficiently figure out what had gotten chomped on by the
crash, as I'm very far from a Python guru.

Brian

Enrico

unread,
Sep 30, 2010, 11:56:33 PM9/30/10
to sage-support
Forgive my impertinence but this sounds like a slightly unstable setup
to be using. I'd just reinstall if dumping a file into sagenb/storage
doesn't work, preferably on a Linux partition rather than in VMWare
and not using an alpha version of Sage.

Enrico

Brian

unread,
Oct 19, 2010, 11:26:01 AM10/19/10
to sage-support
Thanks to Enrico and Dan.

Enrico, I appreciate your response! But that advice isn't going to
work in a commercial environment with locked-in OSes. And - regardless
of the fact that it might be nice if we went Linux! - that's not
likely to change. As to the alpha version - I agree with you in
principle - but that's what was available via sagemath as the "best"
version of sage for Windows (via Downloads path), and I have to get up
and running on my job (which is optical engineering) rather than
spending hours (see OS, above!) trying to recompile from source, with
a virtual machine thrown into the mix...

NONETHELESS, I essentially followed your advice! At least on the
reinstall...

Thankfully, sagemath has posted a more-recent version of Sage for the
Windows/VMWare installation. So I saved all the HTML files I could
(unfortunately, I lost one work file completely. So chalk that one up
on the "cons" list of trying to use sage full-time to do work work, at
least in this environment). Then I de-installed that virtual machine
and started over with the fresh download of sage. I also downloaded
Firefox (which is my default browser at home, but - unfortunately -
not at work) and am running the browser fully in the windows side. I
hope that will protect my notebooks from further crashes...

Now I've cut and pasted cell by cell from the HTML version back into
the Firefox window running sage (loading the HTML file directory
doesn't work because it can't find the Sage server. At least it looks,
though!) and have recovered one worksheet.

So I lost one out of three files (thankfully, the shortest, most-
straightforward on!) and probably about 15 hours of work time. And I
still have to cut-and-paste the second HTML version "back into" Sage
(i.e. back into a Firefox window/tab that can find the Sage server).
But I'm "back up and limping..."

I'm going to try this mode of working (Sage Version 4.5.3, Firefox in
Windows to try to protect from VM crashes...). Hopefully the problems
I've been having won't recur...

Thanks to you both for your time, and your willingness to help!

Regards,

Brian
Reply all
Reply to author
Forward
0 new messages