Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Software > Calibre

Notices

Reply
 
Thread Tools Search this Thread
Old 12-31-2010, 01:28 AM   #1
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
Using Calibre on a NAS

Well, after discovering this wonderful ebook manager, I have tried looking for a way to not have it running on my PC. My eventual goal is for it to be shutdown. I happen to have a DNS321 NAS and have been able to use fun_plug to do a few things to help me reach this goal. Recently, I found a package (version 0.7.34) from a contributor (Peter Lord's repository ) and was able to get this installed and working. (As a sidenote, this did involve loading several dependancies that are not by default loaded on this minimal linux system.)

Now, in order to test the package, I simply opened up Calibre 0.7.35 on my Windows 7 PC and created a new library on my NAS via the GUI. Ran the command line:

Code:
calibre-server --with-library "/mnt/HD_a2/Calibre eBooks" -p 9562
At this point, everything works. I copy over a couple of books, it shows up in the browser, on my iPhone and iPad.

I go ahead and begin copying all of my eBooks over and when I finish, I now receive an error:

Code:
Traceback (most recent call last):
  File "/ffp/bin/calibre-server", line 19, in <module>
    sys.exit(main())
  File "/ffp/lib/calibre/calibre/library/server/main.py", line 114, in main
    db = LibraryDatabase2(opts.with_library)
  File "/ffp/lib/calibre/calibre/library/database2.py", line 153, in __init__
    self.initialize_dynamic()
  File "/ffp/lib/calibre/calibre/library/database2.py", line 354, in initialize_dynamic
    self.refresh()
  File "/ffp/lib/calibre/calibre/library/caches.py", line 630, in refresh
    temp = db.conn.get('SELECT * FROM meta2')
  File "/ffp/lib/calibre/calibre/library/sqlite.py", line 236, in run
    raise DatabaseException(*res)
calibre.library.sqlite.DatabaseException: timestamp out of range for platform time_t
        RemoteTraceback (most recent call last):
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 200, in run
            ok, res = True, func(*args, **kwargs)
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 100, in get
            return ans.fetchall()
          File "/ffp/lib/calibre/calibre/library/sqlite.py", line 29, in convert_timestamp
            return parse_date(val, as_utc=False)
          File "/ffp/lib/calibre/calibre/utils/date.py", line 69, in parse_date
            return dt.astimezone(_utc_tz if as_utc else _local_tz)
          File "/ffp/lib/python2.6/site-packages/dateutil/tz.py", line 92, in utcoffset
            if self._isdst(dt):
          File "/ffp/lib/python2.6/site-packages/dateutil/tz.py", line 135, in _isdst
            return time.localtime(timestamp+time.timezone).tm_isdst
        ValueError: timestamp out of range for platform time_t
I have tried copying the database directly to the NAS with all files and folders and also by using the GUI to copy the books (without delete) to the new library. Either way it fails.

Ironically, it does work within the GUI still on the Windows 7 machine.

If I check the date on the NAS, it does return:
Code:
Fri Dec 31 06:23:52 UTC 2010
whereas, the Windows 7 machine is set to EST. I don't think this is the problem as it works when I copy a book or two, but when I copy the entire database or begin to copy it fails...

Ideas or thoughts?
Shawn_KY is offline   Reply With Quote
Old 01-01-2011, 03:28 PM   #2
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
I am looking through the library to see if there are any crazy things going on there... Perhaps a weird title, etc. using something that Linux can not read, but so far, still no luck.

Has anyone else tried this with the DNS321?
Shawn_KY is offline   Reply With Quote
Advert
Old 01-04-2011, 08:33 AM   #3
chaley
Grand Sorcerer
chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.chaley ought to be getting tired of karma fortunes by now.
 
Posts: 11,703
Karma: 6658935
Join Date: Jan 2010
Location: Notts, England
Device: Kobo Libra 2
Random thought: I had similar errors from the calibre-server when there was no timezone information condifured. I don't remember the exact message, but it had something to do with timevalues being too large. This sounds a lot like what you are seeing.

On my debian lenny machine, I fixed it by running dpkg-reconfigure tzdata. I don't know what you need to do on your NAS.
chaley is offline   Reply With Quote
Old 01-04-2011, 05:54 PM   #4
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
I was wondering about that... I'll have to look for the source or where or what files it is looking at.... I am pretty sure it comes from the NAS being on UTC (oddly enough, it is set to EST inside the NAS OS) and the Windows 7 being EST... I'll also check on the latest versions to see if something else changed along the way. Thanks for the help!
Shawn_KY is offline   Reply With Quote
Old 01-05-2011, 12:01 AM   #5
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
Well, it didn't seem to make any difference with the TZ file being in place... So I did an upgrade to the newest version... still no change in the errors.


I went ahead blew away the database again and starting moving it back, little by little running calibre-server without options except the path, and it continues to work. This leads me to believe that it must be something in the content of the books loaded.

Oddly enough, if I add the --daemonize option, the server does not run (no errors either). Any way to get a log of what is going on?
Shawn_KY is offline   Reply With Quote
Advert
Old 01-05-2011, 12:06 AM   #6
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
run it with --develop to get a debug log
kovidgoyal is offline   Reply With Quote
Old 01-05-2011, 12:41 AM   #7
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
Well, I was using the following command:
calibre-server --develop --with-library "/mnt/HD_a2/Calibre eBooks" -p 9562 --daemonize

I switched it to using:
calibre-server --develop --with-library /mnt/HD_a2/Calibre\ eBooks/ -p 9562 --daemonize


Everything seems to be working... so I am manually moving books until it breaks (hopefully it won't!!) ... By chance will this be writing to a log file anywhere? This is a headless NAS so I won't actually see the output otherwise...
Shawn_KY is offline   Reply With Quote
Old 01-05-2011, 05:57 AM   #8
itimpi
Wizard
itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.itimpi ought to be getting tired of karma fortunes by now.
 
Posts: 4,552
Karma: 950151
Join Date: Nov 2008
Device: Sony PRS-950, iphone/ipad (Marvin/iBooks/QuickReader)
No - this will not be writing to a log but to the console session it is running in.

If you want the output sent to a file then add an appropriate redirect of stdout/stderr to a file to the command that is launching the calibre server.
itimpi is offline   Reply With Quote
Old 01-05-2011, 10:34 AM   #9
kovidgoyal
creator of calibre
kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.kovidgoyal ought to be getting tired of karma fortunes by now.
 
kovidgoyal's Avatar
 
Posts: 43,776
Karma: 22666666
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
logging is done to the files server_access_log.txt and server_error_log.txt that are stored in the calibre config directory. If you use develop, logging is done to console, and as itimpi said you can redirect it to wherever you want.
kovidgoyal is offline   Reply With Quote
Old 01-07-2011, 01:24 AM   #10
Shawn_KY
Junior Member
Shawn_KY began at the beginning.
 
Posts: 7
Karma: 10
Join Date: Dec 2010
Device: iPad
I'll have to look at how this was compiled for the NAS because the log files are not being written when the daemonize option is used... I can run it manually and output to a file, which was helpful to see what was going on...

So far so good, must have been something in the library causing the original error. All in all, the server is up and running on the NAS as long as I put in the info manually. It does not find it automatically with the local computers sharing option in Stanza. I'll take this any day of the week tho.

Thanks for all of your help!
Shawn_KY is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Kindle and Calibre user with problem importing large library into Calibre pleabargain Calibre 1 12-07-2010 10:19 AM
Calibre hangs on startup after moving to NAS smartin Calibre 4 09-26-2010 04:21 PM
Keeping book on NAS but metadata.db on local (Ubuntu) q345 Related Tools 33 05-28-2010 03:13 AM
Seriously thoughtful Anyone have any experience of NAS devices? HarryT Lounge 9 12-10-2009 04:50 AM
Library on NAS server? bous Calibre 5 11-26-2009 05:03 AM


All times are GMT -4. The time now is 07:17 PM.


MobileRead.com is a privately owned, operated and funded community.