Sagecell server failure

39 views
Skip to first unread message

Kwankyu Lee

unread,
Apr 12, 2018, 3:55:46 AM4/12/18
to sage-cell
Hi,

I noticed my sagecell server fails to start.

Apr 12 16:48:52 hades sage[1016]:   File "web_server.py", line 15, in <module>
Apr 12 16:48:52 hades sage[1016]:     import handlers
Apr 12 16:48:52 hades sage[1016]:   File "/home/sage/sagecell/sagecell/handlers.py", line 282, in <module>
Apr 12 16:48:52 hades sage[1016]:     KernelRouter = sockjs.tornado.SockJSRouter(SockJSHandler, "/sockjs")
Apr 12 16:48:52 hades sage[1016]:   File "/home/sage/sagecell/sage/local/lib/python2.7/site-packages/sockjs/tornado/router.py", line 111, in __init_
Apr 12 16:48:52 hades sage[1016]:     self.io_loop)
Apr 12 16:48:52 hades sage[1016]: TypeError: __init__() takes exactly 3 arguments (4 given)

It seems that I am getting this after recent updates to the ubuntu os via apt. Any idea? 


Kwankyu 

Andrey Novoseltsev

unread,
Apr 12, 2018, 11:14:03 PM4/12/18
to sage-cell
No idea and given that we do not use system python - no idea how the os upgrade could cause it...

Kwankyu Lee

unread,
Apr 13, 2018, 12:18:33 AM4/13/18
to sage-cell


On Friday, April 13, 2018 at 12:14:03 PM UTC+9, Andrey Novoseltsev wrote:
No idea and given that we do not use system python - no idea how the os upgrade could cause it...

Right... Thanks anyway! 

Kwankyu Lee

unread,
Apr 13, 2018, 1:27:51 AM4/13/18
to sage-cell
I found a clue. 

tornado deprecated (version >= 4.1) `io_loop` argument of the class tornado.ioloop.PeriodicCallback and removed (version >= 5.0) the argument. But sockjs.tornado was not updated accordingly yet.



Andrey Novoseltsev

unread,
Apr 15, 2018, 8:14:24 PM4/15/18
to sage-cell
On Thursday, 12 April 2018 23:27:51 UTC-6, Kwankyu Lee wrote:
I found a clue. 

tornado deprecated (version >= 4.1) `io_loop` argument of the class tornado.ioloop.PeriodicCallback and removed (version >= 5.0) the argument. But sockjs.tornado was not updated accordingly yet.

That does not explain why you have the error, given that Sage has an older version of tornado and SageMathCell is supposed to use whatever is installed in Sage. sockjs.tornado does not seem to be maintained much - I managed to get a CORS-related patch in, but the version on PyPi still does not have it. Perhaps nowadays sockjs is just not really necessary anymore?

Kwankyu Lee

unread,
Apr 16, 2018, 8:31:45 PM4/16/18
to sage-cell
Hi Andrey,

This is my final report about this issue. 

As I could not fix things, I ended up removing all sage and sagecell and reinstalled them from scratch. Then I got 

AttributeError: type object 'IOLoop' has no attribute 'initialized'

I learned that this is caused by a wrong version (5.0.2) of tornado. So I downgraded tornado to the version 4.3. Then voilà, the problem disappeared!

I don't know how the "too advanced" version of tornado had got to be installed into sage...

Some other remarks:

(1) In README.md, "for building virtual machine images in contib/vm. In particular, " 

--> "contrib/vm"

(2) In README.md, "Of particular interest are host and username entries of the _default_config dictionary"

You seem to have changed "_default_config" to "provider_info".


That's it. Thank you for maintaining SageMathCell!


Kwankyu

Andrey Novoseltsev

unread,
Apr 16, 2018, 10:47:08 PM4/16/18
to sage-cell
On Monday, 16 April 2018 18:31:45 UTC-6, Kwankyu Lee wrote:
Hi Andrey,

This is my final report about this issue. 

As I could not fix things, I ended up removing all sage and sagecell and reinstalled them from scratch. Then I got 

AttributeError: type object 'IOLoop' has no attribute 'initialized'

I learned that this is caused by a wrong version (5.0.2) of tornado. So I downgraded tornado to the version 4.3. Then voilà, the problem disappeared!

I don't know how the "too advanced" version of tornado had got to be installed into sage...

Hmmm, I wonder if "--upgrade" in Step 3 of instructions can do it. I'm pretty sure the switch was there for a reason as we had to have newer version of something a long time ago, but now perhaps it is OK not to upgrade implicit dependencies.


Some other remarks:

(1) In README.md, "for building virtual machine images in contib/vm. In particular, " 

--> "contrib/vm"

(2) In README.md, "Of particular interest are host and username entries of the _default_config dictionary"

You seem to have changed "_default_config" to "provider_info".


Thank you! Fixed both - I try to go over these instructions whenever I need to install a new development server, but that does not happen very often. If you find any other other issues or missing points in documentation, please report or submit a PR!

Reply all
Reply to author
Forward
0 new messages