Export dont work

Asked by Martin P

Hello,
I have problem with export in SchoolTool 2.6.0.1 on Ubuntu 13.10. When I want export something (gradebook, journal etc), schooltool give me message "Scheduled." with text "You can close this dialog and download the exported data later from your home page."
But when I go to homepage, in messages are messages like "Generating gradebook..." or "Generating export...", but pdf or xls files is not exported, no link to download generated..
Sorry for my bad english :/
Thank you for help :)

Question information

Language:
English Edit question
Status:
Solved
For:
SchoolTool Edit question
Assignee:
No assignee Edit question
Solved by:
Martin P
Solved:
Last query:
Last reply:
Revision history for this message
Gediminas Paulauskas (menesis) said :
#1

Look if all 4 processes are RUNNING:

  $ sudo service schooltool status

If celery_report process is running, its log may have details

  $ sudo less /var/log/schooltool/celery_report.log

Also look at the schooltool log file

  $ sudo less /var/log/schooltool/error.log

Revision history for this message
Martin P (m-picalek) said :
#2

Hello,
when i look at $ sudo service schooltool status, there are FATAL at celery_report.. I see log $ sudo less /var/log/schooltool/celery_report.log, and there is problem with python-dateutil (pkg_resources.DistributionNotFound: python-dateutil>=1.5,<2.0), I install it, but now in $ sudo service schooltool status is

schooltool FATAL Exited too quickly (process log may have details)
services:celery_report RUNNING pid 4304, uptime 0:03:21
services:redis RUNNING pid 4302, uptime 0:03:21
services:zeo FATAL Exited too quickly (process log may have details)

in $ sudo less /var/log/schooltool/error.log is:

2013-11-04 17:23:43,346 ['/var/run/schooltool/zeo.sock'] No verification necessary -- empty cache
2013-11-04 17:23:43,376 main db: evolving in mode EVOLVEMINIMUM
2013-11-04 17:31:29,833 ['/var/run/schooltool/zeo.sock'] ClientStorage (pid=3083) created RW/normal for storage: '1'
2013-11-04 17:31:29,834 created temporary cache file '<fdopen>'
2013-11-04 17:31:29,891 ['/var/run/schooltool/zeo.sock'] Testing connection <ManagedClientConnection /var/run/schooltool/zeo.sock>
2013-11-04 17:31:29,892 (/var/run/schooltool/zeo.sock) received handshake 'Z3101'
2013-11-04 17:31:29,993 ['/var/run/schooltool/zeo.sock'] Server authentication protocol None
2013-11-04 17:31:29,995 ['/var/run/schooltool/zeo.sock'] Connected to storage: /var/run/schooltool/zeo.sock
2013-11-04 17:31:29,996 ['/var/run/schooltool/zeo.sock'] No verification necessary -- empty cache
2013-11-04 17:31:30,008 main db: evolving in mode EVOLVEMINIMUM

and in $ sudo less /var/log/schooltool/zeo.log
2013-11-04T17:23:43 INFO ZEO.StorageServer new connection : <ManagedServerConnection >
------
2013-11-04T17:23:43 INFO ZEO.zrpc.Connection(S) () received handshake 'Z3101'
------
2013-11-04T17:31:08 INFO ZEO.StorageServer disconnected
------
2013-11-04T17:31:15 INFO ZEO.runzeo (3081) opening storage '1' using FileStorage
------
2013-11-04T17:31:16 INFO ZEO.StorageServer StorageServer created RW with storages: 1:RW:/var/lib/schooltool/Data.fs
------
2013-11-04T17:31:16 INFO ZEO.zrpc (3081) listening on /var/run/schooltool/zeo.sock
------
2013-11-04T17:31:29 INFO ZEO.StorageServer new connection : <ManagedServerConnection >
------
2013-11-04T17:31:29 INFO ZEO.zrpc.Connection(S) () received handshake 'Z3101'
------
2013-11-04T17:36:59 INFO ZEO.StorageServer disconnected

And now Schooltool dont work :/

Revision history for this message
Gediminas Paulauskas (menesis) said :
#3

I still don't see any errors here. Missing python-dateutil looks very strange, since python-celery depends on python-dateutil.

Have you restarted the schooltool service?

sudo service schooltool stop
sudo service schooltool start
sudo service schooltool status

Maybe you have installed something locally (using "pip install" or "easy_install") and it interferes with system-installed schooltool dependencies?

$ ls /usr/local/lib/python2.7/dist-packages/

Revision history for this message
Martin P (m-picalek) said :
#4

I install with python setup.py install python-dateutil... Now I remove it, but its not work. But i try to remove Data.fs from /var/lib/schooltool and schooltool is alive :)
But new problem is here :D Exist any script that can convert Data.fs to for example Data.xls? Because with Data.fs schooltool dont work, without it Schooltool work... I try use automatic backup (Data.fs.0), but with this schooltool dont work too.
Thank you :)

Revision history for this message
Gediminas Paulauskas (menesis) said :
#5

"Does not work" is too little information to understand what the problem is.

Make sure to stop the server before removing or restoring data files.

$ sudo service schooltool stop
$ sudo cp /var/lib/schooltool/Data.fs.0 /var/lib/schooltool/Data.fs
$ sudo service schooltool start

If you tried to install or reinstall several times, there are backups made every time. Look at the modification times to decide which file to restore to.

$ sudo ls -ltr /var/lib/schooltool/
total 2200
-rw-r--r-- 1 schooltool schooltool 4204 Sep 9 16:25 Data.fs.index
drwx------ 4 schooltool schooltool 4096 Sep 25 02:08 blobs
-rw-r--r-- 1 schooltool schooltool 108682 Oct 17 14:24 Data.fs.3.gz
-rw-r--r-- 1 schooltool schooltool 108575 Oct 21 17:46 Data.fs.2.gz
-rw-r--r-- 1 schooltool schooltool 108575 Oct 21 17:46 Data.fs.1.gz
-rw-r--r-- 1 schooltool schooltool 946577 Oct 21 17:46 Data.fs.0
-rw-r--r-- 1 schooltool schooltool 946577 Oct 21 17:46 Data.fs
-rw-r--r-- 1 schooltool schooltool 0 Nov 4 16:21 Data.fs.tmp
-rw-r--r-- 1 schooltool schooltool 6 Nov 4 16:21 Data.fs.lock
-rw-r--r-- 1 schooltool schooltool 1219 Nov 4 21:29 redis-dump.rdb

Are the files really owned by 'schooltool' user?

If you want to try an older database, you need to uncompress it, e.g. gunzip /var/lib/schooltool/Data.fs.3.gz

All this is described in http://book.schooltool.org/database.html

====

But I don't think database file is the problem. If 'zeo' or 'schooltool' does not start, nothing is written to the database.

The problems should be visible from the log files /var/log/schooltool/error.log or zeo.log, supervisord.log, celery_report.log from the same directory. Could you copy some text from the end of these files here? What you posted in comment #2 looks all good, but later you had some different problems.

Revision history for this message
Gediminas Paulauskas (menesis) said :
#6

And to answer your last question – no, there is no script that converts Data.fs to Data.xls . "School Export" link that you asked about does that (export to a human-readable Excel file).

Revision history for this message
Martin P (m-picalek) said :
#7

Thank you for help, today i try to restore Data.fs from backup, and its work... :)
I do not know, what I did wrong yesterday :/
Once again, thank you very much :)

Revision history for this message
Romano (romano-studer) said :
#8

Hi all
I have got the same problem.
I try to export into an excel file.
I get "Generating School export... plus the date and time stamp.

Nothing ever happens.

BTW this is a brand new install on brand new ubuntu server.
I only imported sample data and created a few people to see how it works.

Regards
Romano

Revision history for this message
Tom Hoffman (tom-hoffman) said :
#9

OK, the debugging steps in the first comment still apply.

Revision history for this message
Romano (romano-studer) said :
#10

Look if all 4 processes are RUNNING:

  $ sudo service schooltool status

If celery_report process is running, its log may have details

  $ sudo less /var/log/schooltool/celery_report.log

Also look at the schooltool log file

  $ sudo less /var/log/schooltool/error.log

I have done a restart of the service.
yes all 4 processes are running.
celery_report

worker: Cold shutdown (MainProcess)
[2015-02-24 12:12:40,443: WARNING/Worker-1] (1286) CW: error connecting to /var/run/schooltool/zeo.sock: ECONNREFUSED
("\nThe 'celeryd' command is deprecated, please use 'celery worker' instead:\n\n$ celery worker --loader=schooltool.task.celery:ReportLoader --config=schooltool.task.config.worker_report --queues=zodb.report,default\n\n",)

 -------------- <email address hidden> v3.1.6 (Cipater)
---- **** -----
--- * *** * -- Linux-3.13.0-45-generic-x86_64-with-Ubuntu-14.04-trusty
-- * - **** ---
- ** ---------- [config]
- ** ---------- .> broker: redis://127.0.0.1:7079/0
- ** ---------- .> app: default:0x7fbaa39d7ad0 (schooltool.task.celery.ReportLoader)
- ** ---------- .> concurrency: 1 (prefork)
- *** --- * --- .> events: OFF (enable -E to monitor this worker)
-- ******* ----
--- ***** ----- [queues]
 -------------- .> default exchange=default(direct) key=default
                .> zodb.report exchange=zodb.report(direct) key=zodb.report

[2015-02-24 12:13:35,457: WARNING/MainProcess] <email address hidden> ready.

schooltool log is just miles of entries...
would it help you to see this?

Regards
Romano

Revision history for this message
Tom Hoffman (tom-hoffman) said :
#11

What's at the end of the error.log?

Revision history for this message
Romano (romano-studer) said :
#12

Here is the last few entries:

2015-02-24 12:08:23,459 Competing writes/reads at /calendar: database conflict error (oid 0x6e02, class BTrees.OOBTree.OOBTree, serial this txn started with 0x03ad2d8460191c77 2015-02-24 01:08:22.522990, serial currently committed 0x03ad2d846338f988 2015-02-24 01:08:23.255287)
2015-02-24 12:13:52,332 ['/var/run/schooltool/zeo.sock'] ClientStorage (pid=11014) created RW/normal for storage: '1'
2015-02-24 12:13:52,346 created temporary cache file '<fdopen>'
2015-02-24 12:13:52,354 ['/var/run/schooltool/zeo.sock'] Testing connection <ManagedClientConnection /var/run/schooltool/zeo.sock>
2015-02-24 12:13:52,595 (/var/run/schooltool/zeo.sock) received handshake 'Z3101'
2015-02-24 12:13:52,675 ['/var/run/schooltool/zeo.sock'] Server authentication protocol None
2015-02-24 12:13:52,728 ['/var/run/schooltool/zeo.sock'] Connected to storage: /var/run/schooltool/zeo.sock
2015-02-24 12:13:52,731 ['/var/run/schooltool/zeo.sock'] No verification necessary -- empty cache
2015-02-24 12:13:52,799 main db: evolving in mode EVOLVEMINIMUM
2015-02-25 08:24:31,445 http://203.143.84.237:7080/apple-touch-icon-120x120-precomposed.png
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
    obj = request.traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
    ob = super(BrowserRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
    ob = super(HTTPRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 260, in traverse
    obj = publication.traverseName(self, obj, entry_name)
  File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 198, in traverseName
    ob2 = adapter.publishTraverse(request, nm)
  File "/usr/lib/python2.7/dist-packages/schooltool/traverser/traverser.py", line 79, in publishTraverse
    raise NotFound(self.context, name, request)
NotFound: Object: <schooltool.app.app.SchoolToolApplication object at 0x7f07bda2c848>, name: u'apple-touch-icon-120x120-precomposed.png'
2015-02-25 08:24:31,674 http://203.143.84.237:7080/apple-touch-icon-120x120.png
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
    obj = request.traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
    ob = super(BrowserRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
    ob = super(HTTPRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 260, in traverse
    obj = publication.traverseName(self, obj, entry_name)
  File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 198, in traverseName
    ob2 = adapter.publishTraverse(request, nm)
  File "/usr/lib/python2.7/dist-packages/schooltool/traverser/traverser.py", line 79, in publishTraverse
    raise NotFound(self.context, name, request)
NotFound: Object: <schooltool.app.app.SchoolToolApplication object at 0x7f07bda2c848>, name: u'apple-touch-icon-120x120.png'
2015-02-25 08:24:31,788 http://203.143.84.237:7080/apple-touch-icon.png
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
    obj = request.traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
    ob = super(BrowserRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
    ob = super(HTTPRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 260, in traverse
    obj = publication.traverseName(self, obj, entry_name)
  File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 198, in traverseName
    ob2 = adapter.publishTraverse(request, nm)
  File "/usr/lib/python2.7/dist-packages/schooltool/traverser/traverser.py", line 79, in publishTraverse
    raise NotFound(self.context, name, request)
NotFound: Object: <schooltool.app.app.SchoolToolApplication object at 0x7f07bda2c848>, name: u'apple-touch-icon.png'
2015-02-25 08:24:31,944 http://203.143.84.237:7080/apple-touch-icon.png
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/zope/publisher/publish.py", line 129, in publish
    obj = request.traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/browser.py", line 540, in traverse
    ob = super(BrowserRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/http.py", line 457, in traverse
    ob = super(HTTPRequest, self).traverse(obj)
  File "/usr/lib/python2.7/dist-packages/zope/publisher/base.py", line 260, in traverse
    obj = publication.traverseName(self, obj, entry_name)
  File "/usr/lib/python2.7/dist-packages/zope/app/publication/zopepublication.py", line 198, in traverseName
    ob2 = adapter.publishTraverse(request, nm)
  File "/usr/lib/python2.7/dist-packages/schooltool/traverser/traverser.py", line 79, in publishTraverse
    raise NotFound(self.context, name, request)
NotFound: Object: <schooltool.app.app.SchoolToolApplication object at 0x7f07bda2c848>, name: u'apple-touch-icon.png'