Calibre-web Plugin (Truenas 12)

SneakiCow

Dabbler
Joined
Sep 25, 2015
Messages
13
I have been trying to get the Calibre-web plugin to install but have had limited success. If I build the jail and and clone it into the jail I can get it to work (calibre-web-on-Freenas). Also if I ssh into the jail (of a plugin install) and start a new instance manually it also works (under user root). I took a look at the logs and it seems the webserver is crashing inside the plugin. At that point it becomes far too much for my Noobish ways, so I've left here in hopes someone could point me in the direction to figuring it out. Thanks

[2020-07-31 18:48:02,843] WARN {cps.config_sql:296} Log path None not valid, falling back to default
[2020-07-31 18:48:04,066] INFO {cps:98} Starting Calibre Web...
[2020-07-31 18:48:04,086] WARN {cps.config_sql:323} invalidating configuration
[2020-07-31 18:48:04,172] INFO {cps.server:144} Starting Gevent server on [::]:8083
[2020-07-31 18:52:18,683] INFO {cps.server:207} webserver stop (restart=False)
[2020-07-31 18:52:18,684] INFO {cps.server:184} Performing shutdown of Calibre-Web
[2020-07-31 18:54:05,868] INFO {cps:98} Starting Calibre Web...
[2020-07-31 18:54:05,870] WARN {cps.config_sql:323} invalidating configuration
[2020-07-31 18:54:05,958] INFO {cps.server:144} Starting Gevent server on [::]:8083
[2020-07-31 19:06:30,004] INFO {cps.server:207} webserver stop (restart=False)
[2020-07-31 19:06:30,005] INFO {cps.server:184} Performing shutdown of Calibre-Web
[2020-07-31 19:06:42,578] INFO {cps:98} Starting Calibre Web...
[2020-07-31 19:06:42,580] WARN {cps.config_sql:323} invalidating configuration
[2020-07-31 19:06:42,667] INFO {cps.server:144} Starting Gevent server on [::]:8083
 

SneakiCow

Dabbler
Joined
Sep 25, 2015
Messages
13
Here is some more Info about how I hacked the Plugin to work. This is a total bog job but works. Probably better just to gitclone it like this.

1. Install plugin
2. Enter the shell of the jail (ssh to the box and iocage console <jail_name> or use the gui)
3. ps aux This shows the running processes. There you should see the the user calibreweb running a pidcalibreweb 60503 0.0 0.3 112700 90068 - IJ 21:09 0:03.72 python3 /usr/local/app/calibre-web/cps.py (python3.7) For some reason this is required. If you stop the service Calibre-Web will not work.
4. So now I ran nohup python3 /usr/local/app/calibre-web/cps.py &
5. Calibre-web should now be accessible at <freenas ip>:8083
6. If you run ps aux again, you will see 2 instances of the same cps.py running but it works. if you stop either pid Calibre-web stops

root@CWeb2:~ # ps aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 83023 2.6 0.0 13212 3976 8 SJ 09:42 0:00.01 -csh (csh)
root 83022 2.3 0.0 12024 3188 8 SJ 09:42 0:00.00 login [pam] (login)
root 59373 0.0 0.0 11400 2768 - SsJ 20:48 0:00.06 /usr/sbin/syslogd -c -ss
root 59446 0.0 0.0 11248 2608 - IsJ 20:48 0:00.13 /usr/sbin/cron -J 15 -s
root 60502 0.0 0.0 10844 2284 - IsJ 21:09 0:00.00 daemon: env[60503] (daemon)
calibreweb 60503 0.0 0.3 112700 90068 - IJ 21:09 0:03.72 python3 /usr/local/app/calibre-web/cps.py (python3.7)
root 59969 0.0 0.0 12024 3188 4 IJ 20:49 0:00.00 login [pam] (login)
root 59970 0.0 0.0 13272 4032 4 I+J 20:49 0:00.05 -csh (csh)
root 61424 0.0 0.3 116540 94672 4 IJ 21:16 0:08.56 /usr/local/bin/python3 /usr/local/app/calibre-web/cps.py (python3.7)
root 83026 0.0 0.0 11824 3120 8 R+J 09:42 0:00.00 ps aux

7. You can automate this process by following the end steps (8 & 9) here.


So as far as I can figure something seems likely broken inside of and rc.d file but I cant figure out where or what because I'm just someone mess about and googles alot, and has no real clue.
 
Top