I can now ... I made it that far from when I typed the question and
when you replied.

Now the script is runnable ... I can type (as root) "/etc/init.d/
startnotebook" and the server will spring to life.

But, when I reboot, it does not work correctly.  The nohup.out file is
created, but is a zero length file.  And the
webbserver is not running ... nmap shows that port 8000 is not open.

Since the script runs after booting, I'm thinking I now have a debian
problem and not a sage problem.  Not sure
yet though.


On Dec 8, 4:22 pm, "William Stein" <[EMAIL PROTECTED]> wrote:
> On Dec 8, 2007 3:51 PM, wdbragg <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > William,
>
> > I have been trying for hours to get the notebook server to start
> > automatically using init scripts.
> > I am trying the method you posted earlier in this list.
>
> > ( All of this is on a fresh install of debian etch )
>
> > I have an init script called /etc/init.d/startnotebook that is called
> > in rcS.d
>
> > sager:/# more /etc/init.d/startnotebook
> > #! /bin/sh
>
> > cd /home/sage1
> > sage notebook.py > nohup.out &
> > sager:/#
>
> > (The hostname 'sager')
>
> > Now here is the notebook.py file:
>
> > sager:/home/sage1# more notebook.py
> > from sage.all import *
>
> > notebook(accounts=True, address='192.168.1.117',
> > server_pool=['[EMAIL PROTECTED]'], secure=True, ulimit='-v 1000000')
> > sager:/home/sage1#
>
> > I created the user 'sage1' .. I created rsa keys as this user.  As
> > this user I can type "ssh [EMAIL PROTECTED] and it works without having
> > to enter a password.  I can start sage as this user and start the
> > notebook and all works perfectly.
>
> Can you -- as the root user -- type
>
>    ssh [EMAIL PROTECTED]
>
> and have it work without entering a password?
>
> Above you seem to say that you can only do the above *as* sage1.
>
>
>
> > But, when I run the script as root (as would happen at boot) it fails.
>
> > sager:/# /etc/init.d/startnotebook
> > sager:/# [EMAIL PROTECTED]'s password:
> > Permission denied, please try again.
> > [EMAIL PROTECTED]'s password:
> > Permission denied, please try again.
> > [EMAIL PROTECTED]'s password:
> > Permission denied (publickey,password).
>
> > Failed to load application: Unable to start sage
> > Traceback (most recent call last):
> >   File "/home/sage1/notebook.py", line 3, in <module>
> >     notebook(accounts=True, address='192.168.1.117',
> > server_pool=['[EMAIL PROTECTED]'], secure=True, ulimit='-v 1000000')
> >   File "/usr/local/sage-2.8.15/local/lib/python2.5/site-packages/sage/
> > server/notebook/notebook_object.py", line 137, in __call__
> >     return self.notebook(*args, **kwds)
> >   File "/usr/local/sage-2.8.15/local/lib/python2.5/site-packages/sage/
> > server/notebook/run_notebook.py", line 226, in notebook_twisted
> >     run(port)
> >   File "/usr/local/sage-2.8.15/local/lib/python2.5/site-packages/sage/
> > server/notebook/run_notebook.py", line 212, in run
> >     raise socket.error
> > socket.error
>
> > sager:/#
>
> > I googled to the best of my ability.  I tried changing the permissions
> > on .ssh/authorized_keys2.  I am out of ideas.  Can you suggest
> > anything that might help here?
>
> --
> William Stein
> Associate Professor of Mathematics
> University of Washingtonhttp://wstein.org
--~--~---------~--~----~------------~-------~--~----~
To post to this group, send email to sage-support@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sage-support
URLs: http://sage.math.washington.edu/sage/ and http://sage.scipy.org/sage/
-~----------~----~----~----~------~----~------~--~---

Reply via email to