0
Completed

[Tutorial] Install Ubooquity on a Synology NAS

Matthew Sanders 5 years ago updated by Michael 3 years ago 151
I've written a tutorial on how to install and run Ubooquity on Synology branded NAS machines. Download the html/css/javascript archive using the link below. Please host this tutorial and replace the link in FAQs. If you are already using jQuery replace the script line in my code to point to your copy.

http://file.button-mashers.net/tutorial.zip

-Matthew

Hmm, Ok.


Seems to be shutting off by itself some minutes after.


Box> start ubooquityubooquity start/running, process 17225
Box> start ubooquity
start: Job is already running: ubooquity
Box> start ubooquity
start: Job is already running: ubooquity
Box> start ubooquity
ubooquity start/running, process 17636

ok, first, good news it seems starting well !

for shutting by itself after few minutes, i'm speechless to be honest ....


[Edit]cannot reproduce on my machine...

Are there any log files i can check out? Thinking maybe there's something up with my java install

I don't know (was searching for that ..)

best way should be by launching manually as in your conf file from the console.

it will run it in verbose mode.


here in your case:

java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/Comics/Ubooquity"

will be Q to quit


[Edit]

to test your java, type in

>which java

it will revert the java install folder proving it is working

Hello to all "linux masters". Thanks a lot for this work.

When trying to set up on synology NAS of mine, seems not finding conf file at http://vaemendis.net/ubooquity/misc/synology-tutorial/script/ubooquity.conf

Am i wrong ?

Thanks again for sharing.

Yeah, I've had other people ask about that as well.


In the meantime, I uploaded the file here:

https://gist.githubusercontent.com/chrisanthropic/2e0fc77dea449e2841dc/raw/a0741ec0a4144f2c60e140ca3036d720db726cbb/ubooquity.conf


So you can simply wget that url instead, though I think the Java path is different in the original one (I had to change it for my Synology model)

My mistake, I'll put it online again and update the tutorial link.

I've got the same problem as Nima. Did someone find a solution ?

Hey, I didn't find out. Using my main computer instead, and just mapped my NAS drives.

It's a lazy workaround on my part, but I'm not proficient enough to see what's causing it :)

Damned ... however, thanks for your answer !

Do other Synology users have problems starting Ubooquity on DSM 6 and Java8? Or is it just my setup?

This is the new ubooquity.conf for DSM 6 and Java 8. Server runs, but pdf files does not load properly when read online.


start on started httpd-user

stop on runlevel [06]


exec /volume1/@appstore/Java8/j2sdk-image/jre/bin/java -Dfile.encoding=UTF-8 -Xmx512m -jar /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/comics/Ubooquity"


The old PDF rendering library I am using (JPedal free) seems to be broken by recent Java versions.

I am working on replacing it.

k at a total loss. Running a Synology 415+ dsm 6 java 8 have followed all the tutorial changed the .conf to the new lines and i still get connection refused. Furthermore, when i do a ps it does not show as running. When I do start it gives me a pid but a ps with that pid doesnt show anything. it looks like it starts then shuts down shortly after that. I did the which java command


so i have the correct java path in my conf

ubooquity.conf contents:


start on started httpd-user

stop on runlevel [06]
exec /var/packages/Java8/target/j2sdk-image/bin/java -Dfile.encoding=UTF-8 -Xmx512m -jar /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/comics"

Both the ubooquity.jar and ubooquity.conf are 755 and owned by root.


Help! and thanks in advance

After updating to DSM 6 on my DS412+ I found out that you now easily could do it with the Task Scheduler (Start it at boot, manually and stop it). Wasn't working on DSM 5.*

Also check if you installed Java 8 x64 (not x86!)


This is how I start it manually and at boot (This can be simply copied into the Script Textbox):

#!/bin/bash
/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar /var/packages/Ubooquity/Ubooquity.jar -workdir /volume1/Comics/Ubooquity/ -port 2204 -headless -webadmin > nohup.out 2>&1&


Stopping:

#!/bin/bash
pkill -f 'java -jar'

Hope this helps

ok how do i determine java 8 x64 vs x86?

also created a boot task using your script and had it send email info. here is what I got. looks like its starting then stopping still


Start time: Thu, 28 Apr 2016 17:54:38 GMT
Stop time: Thu, 28 Apr 2016 17:54:39 GMT
Current status: 0 (Normal)
Standard output/error:



and when i tried to make the stop task it didnt like something in the script wouldnt even let me save it

Not sure if you can check it but simple replace it in the Java8 app.


Doesn't let you save the stop script? With which error?


And the script being done in 1 sec is normal. Check if Ubooquity runs via opening its website(In my script the port is 2204!). If it doesn't check the log and see if it crashed for some reason.


If the log again is empty I think something is wrong with your DSM Installation.

ok i had both java 7 and 8 installed. uninstalled java 7.

I did find out that its 64bit java 8 installed


I must have done something wrong when I tried to create the stop task because I just tried to create it and it created just fine so must have been some sort of problem between keyboard and chair. It does not seem to error out when I run it. I am doing this by using the run and not rebooting every time. Would that make any difference?


I tried going to port 2204 with no joy so I tried changing it to 2202 and re-running the task and still getting a connection refused. I will put it back to 2204 so we are working on the same code.


Which/where is the log are you referring to?


I have other apps installed like pytivo, plex, and i can access their respective pages/portrs on the synology.


Still kinda wondering about the @appstore path when the which java command reports a different path.

The @appstore path is the direct path where Java is installed. In the var folder one it only gives back "folder not found" because it apparently can't deal with the target link...


The stop task is just there if you need to make changes when ubooquity shouldn't run (like an update).


In order to find Ubooquity's log go to where Ubooquity is installed (var/packages/Ubooquity) OR if you are using the workdir path to there. In it there's a "logs" folder containing a ubooquity.log file. Try running it and see what the log says.


If the log stays empty try running ubooquity inside the console and see what kind of message it gives you back.

can not find a log anywhere. Created a ubooquity.conf in /etc/init and pasted the

#!/bin/bash
/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar /var/packages/Ubooquity/Ubooquity.jar -workdir /volume1/Comics/Ubooquity/ -port 2204 -headless -webadmin > nohup.out 2>&1&


got job unkown


added

start on started httpd-user

stop on runlevel [06]


same result


in the /var/packages/Ubooquity directory I should only have the ubooquity.jar file correct?

Careful! You also copied my workdir switch! Remove it if you don't use it.


Just paste

/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar /var/packages/Ubooquity/Ubooquity.jar -port 2202 -headless -webadmin > nohup.out 2>&1&


into the console (SSH) and see what it gives back to you. It will tell you why it doesn't work.

If there's no "logs" folder ubooquity hasn't run yet.

removing the workdir tag made it work! Thanks so much. where does it create folders for it database and preferences? the var/packages?

You are welcome and yes in "/var/packages/Ubooquity/"

Database: ubooquity-4.h2.db

Preferences: preferences.xml

i have backup from when i uninstalled the old ubooquity package and was wondering if i could copy and paste my old db and preferences and the like to the location where the new files are written. just dont know where that is now.

Before you do you need to stop Ubooquity.

Then you can replace the *.db and *.xml files and should be back to where you left off.


If it doesn't work simply delete the files and it will reset Ubooquity again.

i am not seeing anything being written to the /var/packages/Ubooquity folder. I stopped and then copied the db and pref files to that location and started and it doesnt appear to be reading those files. chmod them from 644 to 755 and stopped and started still no change. Maybe I am not putting them in the right directory

???

If the Ubooquity folder is empty except for the Ubooquity.jar how exactly is it running? (could also be that it creates those files only if you configure it). There at least need to be 3 more folders: fonts, logs & themes.

What does the log say?

Ubooquity doesn't have many settings so instead of importing the db (gets rebuild anyway) and config file I would simply re-configure it the way you want it to work and once its done make a backup of that version.

log output from admin page log link:


20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Running with the following parameters - headless: true, port: 2202, webadmin: true, host: null, debug: false, execdir: /usr/syno/synoman/webapi
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - #############################
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - # Starting Ubooquity #
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - #############################
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Java version: 1.8.0_60
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Java vendor: Oracle Corporation
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Max heap size available: 1772 MB
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - OS name: Linux
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - OS version: 3.10.77
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - OS architecture: amd64
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Loading local version info
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Ubooquity 1.9.1 built on 2016-02-21 at 10:09
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Creating application folders
20160430 06:57:56 [main] INFO com.ubooquity.Ubooquity - Loading preferences
20160430 06:57:57 [main] INFO com.ubooquity.c - Starting internal server...
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning books directories
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
20160430 06:57:57 [main] INFO com.ubooquity.c - Reverse proxy prefix is not activated
20160430 06:57:57 [main] INFO com.ubooquity.c - Internal server started. Listening on port 2202
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books folder content cache populated
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Scanning comics directories
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics folder content cache populated
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Comics statistics: [total: 0, added or updated: 0, removed: 0]
20160430 06:57:57 [Scanner thread] INFO com.ubooquity.data.feeder.a - Books statistics: [total: 2, added or updated: 0, removed: 0]
20160430 06:57:58 [Timer-0] INFO com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
20160430 06:57:58 [Timer-0] INFO com.ubooquity.Ubooquity - Latest version available: 1.9.1 - Current version: 1.9.1

Java version: 1.8.0_60

-> Old version. Update java!

http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html


execdir: /usr/syno/synoman/webapi

-> this looks very wrong

I'm guessing you are still starting it from the Task Scheduler?

If so this probably causes Ubooquity to create the workdirk where the Scheduler's default starting path is.

Add the following switch to the starting script and see if the Ubooquity folder now properly gets populated. It probably will also now recognize your old config and Databse.


-workdir /var/packages/Ubooquity


that did it! you are awesome! Thank you for all your help and patience. I've actually learned quite a bit so my hat is off to you Sir.

I am totally in need of help... I have downloaded the conf and jar files, and folowed several tutorials on the internet, but nothing did work out for me. I have an 214 play, and since the DSM6 Update nothing works anymore. I matched the java path correctly, and i edited the config file, but every time i say: start ubooquity there is something like "no such job known"... Here at pastebin there is my config file:

http://pastebin.com/GRL0BYb7


this is my java classpath, can someone help me pleasE?:/



I can start it using java -jar Ubooquity.jar -webadmin... but if i close the ssh, i loose connection to the server agian...



First:

You're still using Java 7 with 0 Updates -> security risk!!!

Uninstall the App "Java7" and install "Java8"

Then update (jdk-8u91-linux-x64.tar.gz) your java version.


To solve the problem of killing Ubooquity once you close your ssh connection: add the switch -headless and "> nohup.out 2>&1&" at the end of your start parameters.


DSM 6 makes things easier to manage Ubooquity via the DSM GUI so try it this way:


Open the Task Scheduler and create the following custom script entries:

Startscript (you can also create a Bootscript now in DSM 6. No need to ssh and create one manually!):

#!/bin/bash

/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar -Xmx256m /var/packages/Ubooquity/Ubooquity.jar -workdir /var/packages/Ubooquity -port 2202 -headless -webadmin > nohup.out 2>&1&


Stopscript:

#!/bin/bash
pkill -f 'java -jar'


That way you can now start and kill Ubooquity via the DSM GUI. You can probably also update Ubooquity via a Task instead of doing it via ssh!


Hope this helps : )


Edit: forgot the -Xmx switch

Well well well .... Since DSM 6 => Ubooquity dosn't work on my DS414.

I have reset and try to make a new instal but nothing work so I have delete all file.

I have make a rsa key for let me a root acces with winscp (prefered) and putty.

I don't speak/write very well english, I don't know the informatic language (just few things with good tutorial help).

So.... Today is it easy to have good job of ubooquity (all bug is over ?) ? Or is it better to wait a stable situation ? If today all is OK, can I have tutorial link please ?

Thank you very much

There's no tutorial yet for how to install Ubooquity on DSM 6. At least to my knowledge.


To install ubooquity simply run the following line as root in ssh:

cd /var/packages && [ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity && wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php && 7z x ubooquity.zip && rm ubooquity.zip


Then do the steps as described in my comment above yours.

Thank you ! But "Then do the steps as described in my comment above yours"... is it hard to understand what I must do exactly ...

Maybe this is easier to understand ->

(if not have a look at the DSM Help for the Task Scheduler)


How to create a Task to start and stop ubooquity via the DSM Task Scheduler:


1.)Open the Task Scheduler in the Settings App

2.)Create a user-defined script task

3.)General: Name of the Task could be "Ubooquity Start". As user to run set "root" and deactivate the "Activated" Checkbox (leave it checked if you automatically want to start & stop ubooquity at a certain time and/or date).

4.)Timetable: Keept it at daily (or change it to whatever you want)

5.)Tasksettings: As script write the following and change the switches the way you need them:


#!/bin/bash

/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar -Xmx256m /var/packages/Ubooquity/Ubooquity.jar -workdir /var/packages/Ubooquity -port 2202 -headless -webadmin > nohup.out 2>&1&


6.)Save and run the script. 5-10 sec later check if you can reach ubooquity.

7.)Now for the stop script repeat the steps 2-4 but name it "Ubooquity Stop".

8.)For the script copy the following into the textfield:


#!/bin/bash
pkill -f 'java -jar'


9.)Save and run it. Ubooquity should now be stopped and unreachable.

10.)Done.


If you also want that ubooquity automatically starts when the DSM boots simply create a triggered task with the same script that you used for the start task.

Thanks lot of ! I try soon...

Yes all work fine with your Task Scheduler on DSM 6, Thanks lot of !

Now I go to try inslal MYLAR with t411 (french torrent provider)...

Is it possible to set up ubooquity to run as a server on a domain name that could login and books read outside the network? How do I configure the domain name to point to ubooquity server?

If you mean something like:

ubooquity.example.com


Then you can do it with Reverse Proxy. Go to the Settings and open the Application Portal. There simply add your custom entry.


Example:

Protocol: HTTP

Source -> ubooquity.example.com

Port -> 80


Destination ->

Protocol: HTTP

Hostname: example.com

Port -> 2202

Hi Michael,

Thanks for the bootscript Dms6 it works well, but when i add -Dfile.encoding=UTF-8 after java ; ubooquity don't show comics with specials caracters !

Thank you.

You're welcome.
The switch "-Dfile.encoding=UTF-8" isn't a required switch. Activating UTF-8 should actually help with special characters, but if it causes problems for you simply don't add this switch.

I need special characters because i'm french :) so you told to activate UTF-8 but where ?

regards

To activate UTF-8 you add the switch "-Dfile.encoding=UTF-8". But according to your first comment its causing more problems than it solves.


You can try UTF-16 though I highly doubt it would change much.


Not sure if Ubooquity/Java checks the system codepage but if it does:

Go to the Synology Settings -> Regional Options -> Language -> Codepage -> French -> Stop and Start Ubooquity.


Hope this fixes the issue.

Hello please help :)

I really don't know how to setup Dms 6.0.1-7393 Up1 and Ubooquity to recognize french files !

Ubooquity version:1.10.1 built on 2016-05-10 at 20:36
Java version:1.8.0_91

my conf :

exec /volume1/@appstore/Java8/j2sdk-image/jre/bin/java -Dfile.encoding=UTF-8 -Xmx512m -jar /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/Ubooquity"


When Ubooquity Scans, i only have comics files without special characters. ( it works well before with Dms 5 and the same java !)

Thanks a lot.


hello


i try with iso-8859-1 / 8859-15 and no change, special characters doesn't works

i have dsm 6 last update / java last update on ds2415+

change options dsm not change too




+1

Hi,


look at the script I've posted soem time ago: I added exporting lang before the main command. This works fine on my DS212


script # System variables.
JAVA_DIR= XXX WORK_DIR= XXX
PKG_DIR= XXX
PORT= 2202
MEM= Xmx128m
# prepare environment
LANG=fr_FR.UTF-8
export LANG
exec $JAVA_DIR/java -Dfile.encoding=UTF-8 -$MEM -jar $PKG_DIR/Ubooquity.jar --port $PORT --webadmin --headless --workdir $WORK_DIR
end script

thanks. it work fine

Hi Elouan,

I've tried with : export LANG=fr_FR.UTF-8 nothing change :(

could you tell me, your java and Dms release ?

thx

try this


export LC_ALL=fr_FR.utf8
export LANG=fr_FR.utf8
exec /var/packages/Java8/target/j2sdk-image/bin/java -Dfile.encoding=UTF-8 -Xmx1024m -jar /var/packages/Ubooquity/Ubooquity.jar --port 2202 --webadmin --headless --workdir /volume1/comics > nohup.out 2>&1&



Yes thank Kenji , it works fine !

In first I say, with dsm 5 all worked fine.

Since DSM 6, we need make synology task, that work but I have lot of problem for scan all my comics. Over average 50 comics the progress is already running but don't go 51 52 ...


I think possible mistake with memorie ram, I have ds414, I try with 1024 in ubooquity.conf and task script but is it the same, I can't scan all my comics.


possible bug because ubooquity don't like some character ...like this - ' ... I don't know...I seek why...


Where I must change things please ? in the synology task or ubooquity.conf ?


In the synology task I have this for start ubooquity :

#!/bin/bash/volume1/@appstore/Java8/j2sdk-image/jre/bin/java -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -workdir /var/packages/Ubooquity -port 2202 -headless -webadmin > nohup.out 2>&1&

Is it here you make change ?


Thank you for help


my ubooquity.conf :


#/etc/init/ubooquity.conf


start on started xavier
stop on runlevel [06]

exec /var/packages/java7/target/jre/bin/java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir "/volume1/Mes-ebooks"


Hi Yadis,

i don't thing you have to change your .conf but the release of Java. for my syno DS213j i use : jdk-8u77-linux-arm32-vfp-hflt.tar.gz instead jdk-8u91-linux-arm32-vfp-hflt.tar.gz it makes lots of errors . is it possible to see your logs ?

Hi Alex,

I think I use jdk-8u91-linux-arm32-vfp-hflt.tar.gz

If I clic on java application I see java 8 version 1.8.0_91

I think there is problem "out of memory" ...maybe

I would like show my log but how I do that ? Log of ubooquity ? or log java ?

LOG UBOOQUITY

Yep, tu devrais convertir ce fichier en cbr et tout les pdf trop gros en cbr le scan passe mieux :)

XIII Mystery 4 - Colonel Amos.pdf

J'ai 834 comics pdf dans ma collection, la galère si je dois tout retrouver en cbr !

Et puis avant dsm6 java8 etc ubooquity fonctionnait très bien, même avec mes pdf.

Je suis sur que le problem vient de la gestion de la mémoire ram (j'ai 76% d'utilisé sur mon NAS quand ubooquity n'est pas arrêté)


En ce moment je ne peux même pas scanner !

Je retrouve "outofmemoryerror" dans mon log (ci dessous)

A mon avis il y a un problem de "memory leak".

Cela fonctionne bien chez toi ? A tu une grosse bdtheque ?


20160628 12:28:09 [pool-1-thread-4] ERROR com.ubooquity.Ubooquity - Uncaught exception on thread: pool-1-thread-4
java.lang.OutOfMemoryError: Java heap space
   at java.nio.HeapByteBuffer.(HeapByteBuffer.java:57) ~[na:1.8.0_91]
   at java.nio.ByteBuffer.allocate(ByteBuffer.java:335) ~[na:1.8.0_91]
   at sun.nio.cs.StreamDecoder.(StreamDecoder.java:251) ~[na:1.8.0_91]
   at sun.nio.cs.StreamDecoder.(StreamDecoder.java:231) ~[na:1.8.0_91]
   at sun.nio.cs.StreamDecoder.forInputStreamReader(StreamDecoder.java:69) ~[na:1.8.0_91]
   at java.io.InputStreamReader.(InputStreamReader.java:74) ~[na:1.8.0_91]
   at com.ubooquity.e.e$f.a(SourceFile:815) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.e.e$1$1.run(SourceFile:210) ~[Ubooquity.jar:1.10.1]
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_91]
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_91]
   at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91]
20160628 12:28:09 [Scanner thread] ERROR com.ubooquity.Ubooquity - Uncaught exception on thread: Scanner thread
java.lang.OutOfMemoryError: Java heap space
   at org.apache.pdfbox.io.ScratchFileBuffer.addPage(ScratchFileBuffer.java:132) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.io.ScratchFileBuffer.ensureAvailableBytesInPage(ScratchFileBuffer.java:184) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.io.ScratchFileBuffer.write(ScratchFileBuffer.java:203) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.io.RandomAccessOutputStream.write(RandomAccessOutputStream.java:58) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at java.io.FilterOutputStream.write(FilterOutputStream.java:77) ~[na:1.8.0_91]
   at java.io.FilterOutputStream.write(FilterOutputStream.java:125) ~[na:1.8.0_91]
   at org.apache.pdfbox.pdfparser.COSParser.readValidStream(COSParser.java:1128) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.COSParser.parseCOSStream(COSParser.java:952) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.COSParser.parseFileObject(COSParser.java:760) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:721) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.COSParser.parseObjectDynamically(COSParser.java:652) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.COSParser.parseDictObjects(COSParser.java:612) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.PDFParser.initialParse(PDFParser.java:215) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdfparser.PDFParser.parse(PDFParser.java:249) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:847) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:803) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at org.apache.pdfbox.pdmodel.PDDocument.load(PDDocument.java:757) ~[pdfbox-2.0.0.jar.6738931264348580058.tmp:2.0.0]
   at com.ubooquity.fileformat.pdf.b.a(SourceFile:34) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.b.c.a(SourceFile:58) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.data.feeder.a.b(SourceFile:512) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.data.feeder.a.c(SourceFile:470) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.data.feeder.a.b(SourceFile:35) ~[Ubooquity.jar:1.10.1]
   at com.ubooquity.data.feeder.a$1.run(SourceFile:123) ~[Ubooquity.jar:1.10.1]
   at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_91]


As tu mis 1024 ou 512 dans ubooquity.conf et dans le script "planificateur de démarrage" ?

Combien de mémoire ram java utilise sur ton Nas ?


https://plumbr.eu/outofmemoryerror/java-heap-space


"Dans certains cas, la quantité de tas que vous avez alloué à votre JVM est tout simplement pas assez pour répondre aux besoins de vos applications en cours d'exécution sur cette JVM. Dans ce cas, vous devriez juste allouer plus de tas - voir à la fin de ce chapitre pour savoir comment y parvenir.

Cependant , dans de nombreux cas, en fournissant plus Java espace de tas ne résoudra pas le problème. Par exemple, si votre application contient une fuite de mémoire, enajoutant plus tas sera simplement reporter le java.lang.OutOfMemoryError: Java heap space erreur. En outre, l' augmentation de la quantité de Java espace de tas tend également à augmenter la longueur des pauses GC affectant de votre application de débit ou de latence .

Si vous souhaitez résoudre le problème sous-jacent à l'espace de tas Java au lieu de masquer les symptômes, vous devez déterminer quelle partie de votre code est responsable de l'allocation le plus de mémoire. En d'autres termes, vous devez répondre à ces questions: ..."


In some cases, the amount of heap you have allocated to your JVM is just not enough to accommodate the needs of your applications running on that JVM. In that case, you should just allocate more heap – see at the end of this chapter for how to achieve that.

In many cases however, providing more Java heap space will not solve the problem. For example, if your application contains a memory leak, adding more heap will just postpone the java.lang.OutOfMemoryError: Java heap space error. Additionally, increasing the amount of Java heap space also tends to increase the length of GC pauses affecting your application’s throughput or latency.

If you wish to solve the underlying problem with the Java heap space instead of masking the symptoms, you need to figure out which part of your code is responsible for allocating the most memory. In other words, you need to answer these questions:

  1. Which objects occupy large portions of heap
  2. where these objects are being allocated in source code

Salut, J'ai une base de 30.000 bd avec du pdf il a passé 2 jours pour me scanner ! J'ai que 512 m sur le syno DS213j : j'ai mis -Xmx512m . J'ai remarqué que c'est bcp + long avec un pdf qu'un cbr . Quand ubooquity est entrain de scanner un pdf tu peux avoir une mémoire occupée jusqu'à 98 % . J'ai eu un pdf à 588 mo il a planté! avec out of memory .En convertissant avec comicrack en cbr ça passe bien. Tu gères ta collection avec Comicrack ?

sinon tu peux essayer de couper certains programmes comme l'antivirus du syno pour grappiller un peu de mémoire juste le temps qu'il fasse le scan

à oui pour les fichiers avec des accents c'est bien :

export LC_ALL=fr_FR.utf8

export LANG=fr_FR.utf8

qui manque :)

30 000 bds rho génial je veux bien un user et pass sur ton ubooquity ;) .Je vais installer comicrack et faire les transformations de mes 800 pdf. Ok je crois que j'ai compris où est le Pb ! Mon ubooquity.conf avait un chemin avec java7 et non java 8 ! D’ailleurs vu qu'on utilise le planificateur de tache est il nécessaire ce ubooquity.conf qui est dans etc/init ? Je veux bien la gestion des caractère FR et ALL. Je souhaite que les fichiers du logiciel ubooquity s'installent dans le dossier ubooquity (/var/packages/Ubooquity). J'ai tout supprimé et redémarré le NAS car avec la commande > nohup.out 2>&1& je suis obligé de redémarrer pour arrêter ubooquity.


Maintenant je vais taper en ssh :

cd /var/packages && [ -d Ubooquity ] || mkdir Ubooquity && cd Ubooquity && wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php && 7z x ubooquity.zip && rm ubooquity.zip


Puis je vais créer dans le planificateur de tache ceci :

export LC_ALL=fr_FR.utf8

export LANG=fr_FR.utf8
exec /var/packages/Java8/target/j2sdk-image/bin/java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -headless -workdir /var/packages/Ubooquity

Je ne mets pas : (?)

#!/bin/bash (au debut)

> nohup.out 2>&1& (à la fin)


J'execute la tache, j'ai le message pas acces aux fichiers de ce server, je vais sur la page admin j'ajoute un chemin pour quelques livre et c'est bon j'accède à la page web d'ubooquity.


Je remarque en me balladant en ssh qu'il n'y a pas de fichier ubooquity.conf dans etc/ini et je remarque aussi ce dossier "etc.defaults" à coté de etc et il me semble qu'il n'existait pas avant l'installation d'ubooquity, non ?


Je tente maintenant d'arrêter ubooquity avec la tache dans le planificateur de tache :

#!/bin/bashpkill -f 'java -jar'

Autant dire que ça ne fait rien du tout. Ca c'est chiant car si ubooquity à un bug je n'aurai pas d'autre choix que de redémarrer le nas pour redémarrer ubooquity ! une solution pour ça ?


Bien, je vais convertir mes pdf, et voir si tous ça marche bien ... mais j'ai deja 380Mb 64% de memoire utilisé alors que ubooquity ne scan rien et que j'ai juste scanné 135 ebooks...


La suite bientot après les conversion des pdf....



Guys, could you stick to english please ?

This forum is used as a knowledge base by a lot of users, and changing language in the middle of a thread is not very nice for people who don't understand french.


If you want to write in another language, please open a new thread with a clear indication in the title (something like "[FRENCH]").

Yes Tom, you right !

Kenji and Alex HPC I go back, for say thinks !

I convert all my pdf and delete the pdf i can't convert.

I add > nohup.out 2>&1& at the end finaly

I use pkill -f Ubooquity

All work perfectly, like before dsm 6. Very thinks to you !

Just sharing my ubooquity.conf.


#/etc/init/ubooquity.conf

# automatically starts ubooquity after apache has been started
start on started httpd-user

# stop ubooquity on
stop on runlevel [06]

script
    JAVA_DIR=/var/packages/java8/target/ejdk1.8.0_101/linux_arm_sflt/jre/bin
    WORK_DIR=/volume1/ebooks/.ubooquity
    PKG_DIR=/var/packages/Ubooquity
    PKG=Ubooquity.jar
    PORT=2202
    MEM=512m
    ENCODING=UTF-8
    LANG=en_US.$ENCODING

    export LANG
    exec $JAVA_DIR/java -Dfile.encoding=$ENCODING -jar -Xmx$MEM $PKG_DIR/$PKG -port $PORT -webadmin -headless -workdir $WORK_DIR
end script


Update: Since DSM 6.0 http-user is replaced by nginx.

The 'start on' line in the conf is:

start on started nginx

Hi,


The zip file in the 1st post is not online anymore ?

Do you know where can i find a complete tuto to install ubooquity on synology (DSM 5.2 xpnology) ?


Thanks


found on wiki ... sry to asked :)


i got the 1.7.0_75 of java, i hope it's ok

i followed the tutorial there : http://vaemendis.net/ubooquity/wiki/doku.php?id=tutorial:synology:synology_nas_installation_tutorial


i launch ubooquity with "start ubooquity" , it answer : " ubooquity start/running, process 30588"


but i dont have anything on the 2202 port .. can you help me plz ?



thanks, but i cant use java 8 on my DSM 5.2 (if i follow what it's write in java manager)

i've tried but he doesn't want the file i've downloaded (jdk-8u101-linux-i586.tar.gz)


i try now to update to the 7u79 i got the 7u51 (and not the 75 as i said before ... )

Well if you don't want to update to DSM 6 then you can simply change the filename that you upload to the Java Manager as it only checks the name but not the version of the content.


Doesn't work: jdk-8u101-linux-i586.tar.gz

Works: jdk-7u101-linux-i586.tar.gz

i can't update to DSM 6 , it's not a real synology but a synology hack :(


the 7u79 don't help


I've tryed with the rename , do'esn't work , but with the name jdk-7u80-linux-i586.tar.gz he is ok to install :)


Still doesn't work


my ubooquity.conf is

"start on started httpd-user

stop on runlevel [06]


exec /var/packages/JavaManager/target/Java/bin/java -Dfile.encoding=UTF-8 -jar -Xmx512m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadm"


I verified the firewall of the synology, i accept all ports on my personnal network .. .i don't know Java at all :(


thanks again

Right...

Manually start ubooquity via ssh and see what the log says. If its fully initialized then there should be nothing preventing you from opening the webpage (except a client or synology firewall)

sorry to ask .. where can i find the log files ?


to manualy start, i just type "start ubooquity", right ? it make a process when i use that



it works !!! i'm a noob sry ...


I used start ubooquity instead of /etc/init/ubooquity.conf ...

I can see for the next steps now...


Thank you 1000 times for your help !!


You're welcome.

Hi


I've been looking to the forum and this thread, and the feedback looks great. Despite all this, I am still struggling to get Ubooquity work:

- I followed the tutorial to install ubooquity on my Synology NAS DS211

- when I manually start ubooquity via telnet after installation, it says ubooquity start/running, process 8978

- but when I try to connect via the browser (using Chrome), it says that the connection is not authorized

- I have opened firewall ports for 2202 port on both the Synology and my router.


any thoughts ? Is there any log files or others that could help?


Many thanks in advance for any help you can provide!

Have a look at the "ubooquity.log" file that's in the folder where you start ubooquity or the workdir.

A normal startup should look like this (the font extraction error can be ignored if the fonts exist in the "fonts" folder; also the "HTTS activated" if you have no keystore installed):



20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - #############################
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - #     Starting Ubooquity    #
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - #############################
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Java version: 1.8.0_101
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Java vendor: Oracle Corporation
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Max heap size available: 228 MB
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - OS name: Linux
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - OS version: 3.10.77
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - OS architecture: amd64
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Loading local version info
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Ubooquity 1.10.1 built on 2016-05-10 at 20:36
20160822 10:56:35 [main] INFO  com.ubooquity.Ubooquity - Creating application folders
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/Charis SIL.css to /fonts/Charis SIL.css
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/CharisSIL-B.woff to /fonts/CharisSIL-B.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/CharisSIL-BI.woff to /fonts/CharisSIL-BI.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/CharisSIL-I.woff to /fonts/CharisSIL-I.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/CharisSIL-R.woff to /fonts/CharisSIL-R.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/Fira Sans.css to /fonts/Fira Sans.css
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/FiraSans-Bold.woff to /fonts/FiraSans-Bold.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/FiraSans-BoldItalic.woff to /fonts/FiraSans-BoldItalic.woff
20160822 10:56:35 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/FiraSans-Italic.woff to /fonts/FiraSans-Italic.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/FiraSans-Regular.woff to /fonts/FiraSans-Regular.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/texgyrepagella-bold.woff to /fonts/texgyrepagella-bold.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/texgyrepagella-bolditalic.woff to /fonts/texgyrepagella-bolditalic.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/texgyrepagella-italic.woff to /fonts/texgyrepagella-italic.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/texgyrepagella-regular.woff to /fonts/texgyrepagella-regular.woff
20160822 10:56:36 [main] ERROR com.ubooquity.f.a - Could not extract file: fonts/Tex Gyre Pagella.css to /fonts/Tex Gyre Pagella.css
20160822 10:56:36 [main] INFO  com.ubooquity.Ubooquity - Loading preferences
20160822 10:56:40 [main] INFO  com.ubooquity.c - Starting internal server...
20160822 10:56:40 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning books directories
20160822 10:56:40 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning books directories, populating folders content cache
20160822 10:56:40 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books folder content cache populated
20160822 10:56:40 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Scanning comics directories
20160822 10:56:41 [main] INFO  com.ubooquity.c - Reverse proxy prefix is not activated
20160822 10:56:42 [main] INFO  com.ubooquity.c - HTTPS activated
20160822 10:56:44 [main] INFO  com.ubooquity.c - Internal server started. Listening on port 2204
20160822 10:56:45 [Timer-1] INFO  com.ubooquity.Ubooquity - Checking latest available Ubooquity version from website
20160822 10:56:45 [Timer-1] INFO  com.ubooquity.Ubooquity - Latest version available: 1.10.1 - Current version: 1.10.1
20160822 10:56:45 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Finished scanning comics directories, populating folders content cache
20160822 10:56:48 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics folder content cache populated
20160822 10:56:48 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Comics statistics: [total: 1729, added or updated: 0, removed: 0]
20160822 10:56:48 [Scanner thread] INFO  com.ubooquity.data.feeder.a - Books statistics: [total: 0, added or updated: 0, removed: 0]