First time here? Check out the FAQ!

Ask Your Question
0

Notebook hangs when run from command line

asked 13 years ago

ctennenh gravatar image

updated 10 years ago

FrédéricC gravatar image

I'm getting comfortable with Sage with my own work, and have tasked my students with registering at sagenb.org and working through some problems. I would like to run a Sage server from my desktop machine at home to access when I'm out, instead of trying to synchronize my worksheets.

I'm running OS X 10.7 on a Mac Mini, and have properly forwarded the appropriate port. When I run sage in the Terminal, then the command

notebook(interface='', server_pool=['sage1@localhost'], accounts=False, secure=True)

things seem to work smoothly. I can access the login screen from a remote machine, run worksheets, and evaluate commands. However, when I try to run sage from the command line with

...sage --notebook interface='' server_pool=['sage1@localhost'] accounts=False secure=True

I'm still able to access the login screen from a remote machine and run worksheets, but when I try to evaluate something it hangs. The command I'm using is something I put together from pieces I found on the Sage wiki, but I admit even after reading a number of tutorials over and over I'm still not sure what all the parameters mean.

I'd like to run this server at boot, so I'm calling it via a bash script. If there's another way to do things I'm all ears. Does anyone have any suggestions?

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 13 years ago

Jason Grout gravatar image

I always start up my sage server by using the -c option to have Sage run a command. Here is my startup script:

#!/bin/sh

~/sage/sage -c "notebook(interface='localhost', directory='./sage_notebook.sagenb',port=8000, accounts=True, timeout=3600, server_pool=['sage%d@localhost'%i for i in range(10)], ulimit='-u 100 -t 36000 -v 500000', open_viewer=False)"

See step 8 of http://wiki.sagemath.org/SageServer

Preview: (hide)
link
0

answered 13 years ago

ctennenh gravatar image

updated 13 years ago

Thanks so much. That seems to work at first, it doesn't hang, but then I get no output from evaluating a cell. It just jumps to the next line with nothing to show for it. I've tried it in Chrome and Firefox. Could it be my parameters? I'm just trying to open it up to me as a user.

edit: Playing with the settings I think I've sorted it out. I'm running /Applications/sage/sage -c "notebook(interface='',secure=True,accounts=False)" and it seems to work well. I'm not sure what caused the issue above, but it was clearly one of the settings. I appreciate the help.

Preview: (hide)
link

Comments

It was probably the server_pool setting.

Jason Grout gravatar imageJason Grout ( 12 years ago )

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 13 years ago

Seen: 1,051 times

Last updated: Apr 18 '12