cant even start ubooquity .
[Tutorial]Enabling HTTPS With LetsEncrypt
I got tired of the errors from a self-signed certificate and started a project to try and get an HTTPS certificate from Letsencrypt (its free!) working for Ubooquity. Thought I'd share my results and method if anyone else wants to give it a shot. I started with this post here and modified his script to suit my needs. http://blog.ivantichy.cz/blogpost/view/74
A few caveats...
- If your domain is a sub domain on a popular domain, there is a good chance you won't be able to get a certificate, as they are distributed in limited quantities per domain.
- You can't have a service running on port 9999
- If you are running the server at home, your ISP can't be blocking port 443 (used to verify ownership of the domain)
I'm running Ubooquity on Ubuntu Server 14.04.3 LTS, Your mileage may vary with other distros. You'll need some basic terminal skills and sudo.
First, you'll need to install Letsencrypt
#Install Git if needed apt-get install git #Create a directory for Letsencrypt mkdir /opt/letsencrypt cd /opt git clone https://github.com/letsencrypt/letsencrypt cd letsencrypt
You'll may need to edit a file (I did) in /letsencrypt to account for Ubuntu having an older version of Python in the repository. See this post for more info...
https://community.letsencrypt.org/t/insecureplatformwarning-on-ubuntu-14-04-w-python-2-7-6/2871/3
Once this prereqs are done, here is the script you'll need to run. It won't work out of the box so make sure you read the comments and update the info as needed.
Create a script, set it to executable, and paste this in with your preferred editor.
#!/bin/bash #Original author Ivan Tichy - Original http://blog.ivantichy.cz/blogpost/view/74 -- Updated for Ubooquity by Salty #Please modify these values according to your environment certdir=/etc/letsencrypt/live/yourdomain.com/ #just replace the domain name after /live/ keytooldir=/usr/lib/jvm/java-7-openjdk-amd64/jre/bin/ #java keytool located in jre/bin (see this post if you need help finding this dir http://ubuntuforums.org/showthread.php?t=1054731&p=6643281#post6643281 ) letsencryptdir=/opt/letsencrypt/ #letsencrypt directory here mydomain=yourdomain.com #put your domain name here myemail=your@email.com #your email networkdevice=eth0 #your network device (run ifconfig to get the name) keystoredir=/home/salty/.keystore #located in home dir of user running Ubooquity keystorepass=yoursuperstrongpassword #the password for your keystore #the script itself: cd /opt/letsencrypt #the location of your letsencrypt install git pull origin master #update letsencrypt with the latest files #this temporarily reroutes your traffic to port 443 to port 9999 for the domain ownership test letsencrypt does. #it keeps you from having to shut down Ubooq service iptables -I INPUT -p tcp -m tcp --dport 9999 -j ACCEPT iptables -t nat -I PREROUTING -i $networkdevice -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 9999 #Leave the top one uncommented for testing, it creates fake certs and won't count against the certificate limit from letsencrypt. #Comment out top one and uncomment second command when ready to generate real cert $letsencryptdir/letsencrypt-auto certonly --verbose --standalone --test-cert --break-my-certs -d $mydomain --standalone-supported-challenges tls-sni-01 --tls-sni-01-port 9999 --renew-by-default --email $myemail --agree-tos #$letsencryptdir/letsencrypt-auto certonly --standalone -d $mydomain --standalone-supported-challenges tls-sni-01 --tls-sni-01-port 9999 --renew-by-default --email $myemail --agree-tos #deletes rerouting rule iptables -t nat -D PREROUTING -i $networkdevice -p tcp -m tcp --dport 443 -j REDIRECT --to-ports 9999 iptables -D INPUT -p tcp -m tcp --dport 9999 -j ACCEPT #deletes any previous JKS keys $keytooldir/keytool -delete -alias root -storepass $keystorepass -keystore $keystoredir/ubooq_key.jks $keytooldir/keytool -delete -alias ubooq_key -storepass $keystorepass -keystore $keystoredir/ubooq_key.jks #builds a usable keystore from the CA provided by letsencrypt openssl pkcs12 -export -in $certdir/fullchain.pem -inkey $certdir/privkey.pem -out $certdir/cert_and_key.p12 -name ubooq_key -CAfile $certdir/chain.pem -caname root -password pass:aaa $keytooldir/keytool -importkeystore -srcstorepass aaa -deststorepass $keystorepass -destkeypass $keystorepass -srckeystore $certdir/cert_and_key.p12 -srcstoretype PKCS12 -alias ubooq_key -keystore $keystoredir/ubooq_key.jks $keytooldir/keytool -import -trustcacerts -alias root -deststorepass $keystorepass -file $certdir/chain.pem -noprompt -keystore $keystoredir/ubooq_key.jks
Run the script, do whatever tweaking you need, then when you are generating a good fake cert and keystore, swap the commented out lines in the middle and generate your real certificate and keystore. Add the keystore and password to Ubooquity using the admin web interface and you should be good to go. Afterwards, you can add this to a cron job to re-up your certificate when it expires. GLHF!
Error forcing server restart
At the bottom are the error messages I get.
This is what I believe happens:
- I open Ubooquity on my ipad (using defaut ios navigator, can't remember the name of it)
- I get all the icons, and arrow in the wrong order
- I refresh the page a couple of times, click on a couple of arrow, until finally, one page appears to be fine
- The server stops responding [this is the message I get in the navigator -Safari]
- I have to restart ubooquity from CLI to get it back on its feet again
I believe this is because the way safari handles the parallel connection: it overloads the server because it's requesting to many pages in parallel, the server can't handle it, and this crashes Ubooquity
Would be nice it we could diagnose this problem => we could launch a restart job when this kind of error appears
20160121 23:17:21 [pool-1-thread-2] ERROR com.ubooquity.f.d - Could not list files in folder:
java.nio.file.FileSystemException: /volume1/comics/Calypso: Too many open files
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_65]
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407) ~[na:1.8.0_65]
at java.nio.file.Files.newDirectoryStream(Files.java:457) ~[na:1.8.0_65]
at com.ubooquity.f.d.a(SourceFile:49) ~[Ubooquity.jar:1.8.2]
at com.ubooquity.provider.comic.b.a(SourceFile:166) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:318) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:57) [Ubooquity.jar:1.8.2]
at com.ubooquity.c$1.a(SourceFile:129) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e.a(SourceFile:287) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$f.a(SourceFile:830) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$1$1.run(SourceFile:210) [Ubooquity.jar:1.8.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
20160121 23:17:21 [pool-1-thread-9] ERROR com.ubooquity.f.d - Could not list files in folder:
java.nio.file.FileSystemException: /volume1/comics/Chat (Le): Too many open files
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_65]
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407) ~[na:1.8.0_65]
at java.nio.file.Files.newDirectoryStream(Files.java:457) ~[na:1.8.0_65]
at com.ubooquity.f.d.a(SourceFile:49) ~[Ubooquity.jar:1.8.2]
at com.ubooquity.provider.comic.b.a(SourceFile:166) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:318) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:57) [Ubooquity.jar:1.8.2]
at com.ubooquity.c$1.a(SourceFile:129) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e.a(SourceFile:287) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$f.a(SourceFile:830) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$1$1.run(SourceFile:210) [Ubooquity.jar:1.8.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
20160121 23:17:21 [pool-1-thread-12] ERROR com.ubooquity.f.d - Could not list files in folder:
java.nio.file.FileSystemException: /volume1/comics/Caste Des Méta-Barons (La): Too many open files
at sun.nio.fs.UnixException.translateToIOException(UnixException.java:91) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102) ~[na:1.8.0_65]
at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107) ~[na:1.8.0_65]
at sun.nio.fs.UnixFileSystemProvider.newDirectoryStream(UnixFileSystemProvider.java:407) ~[na:1.8.0_65]
at java.nio.file.Files.newDirectoryStream(Files.java:457) ~[na:1.8.0_65]
at com.ubooquity.f.d.a(SourceFile:49) ~[Ubooquity.jar:1.8.2]
at com.ubooquity.provider.comic.b.a(SourceFile:166) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:318) [Ubooquity.jar:1.8.2]
at com.ubooquity.c.a(SourceFile:57) [Ubooquity.jar:1.8.2]
at com.ubooquity.c$1.a(SourceFile:129) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e.a(SourceFile:287) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$f.a(SourceFile:830) [Ubooquity.jar:1.8.2]
at com.ubooquity.e.e$1$1.run(SourceFile:210) [Ubooquity.jar:1.8.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_65]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_65]
at java.lang.Thread.run(Thread.java:745) [na:1.8.0_65]
Configure Comic Folder on a QNAP TS-451
Hi,
I just installed Ubooquity on my NAS and I can access the admin page but I got an error everytime I triy to add a Comic folder: "Preferences could not be modified.
Directory does not exist or is not readable: /DataVol1/Multimedia/eBooks/Comics"
This is the share as shown in my QNAP Controlpanel:
I have tried to add full access in the QNAP user accounts for guest-users.
Any Suggestions?
Ubooquity crashed after restart
So yesterday I noticed that Ubooquity wasn't running anymore, so I just started it back up and it seemed to be working just fine. Then this morning I actually closed a few windows that I'd left open for a while and I noticed an error window from Ubooquity withe the following text:
"org.h2.jdbc.JdbcSQLException: Database may be already in use: "Locked by another process". Possible solutions: close all other connection(s); use the server mode [90020-187]
So I took a look at the logs and found this:
"20151015 04:10:54 [Thread-3] INFO com.ubooquity.Ubooquity - Ubooquity has closed.
at com.ubooquity.Launcher.main(SourceFile:10) [Ubooquity.jar:1.8.2]"
It looks like on the 15th Ubooquity was performing a scan, then restarted, and choked and died. Since manually starting it back up yesterday, there haven't been any errors.
I keep Ubooquity running on my main server with Win-7 x64, and my media stored on a Netgear ReadyNAS 104. I check the logs on the NAS and it's been running smoothly for several weeks now with out any errors or down time. I don't believe I've ever received this error before, and I've been happily running Ubooquity for several months now.
Any idea what happened?
Improve reading feature
Would it be possible to implement that Ubooquity reads several pages in advance (prefetching of 3 pages for ex.), so page changing would be quicker when reading a comics?
Minimize window on startup
Can't close Ereader menu on Android Chrome
Firstly thanks for an amazing but of software, love seeing how each new version brings great new features.
It happens on every epub I've tried so far.
[Tutorial] Install Ubooquity on a Synology NAS
http://file.button-mashers.net/tutorial.zip
-Matthew
Comic Name incorrectly sorted with numbers in them
Comics are not sorted correctly if named as follows:
Comic Issue 1
Comic Issue 10
Comic Issue 100
Comic Issue 2
Comic Issue 20
Comic Issue 200
Should be sorted like so:
Comic Issue 1
Comic Issue 2
Comic Issue 10
Comic Issue 20
Comic Issue 100
Comic Issue 200
Customer support service by UserEcho