0

Difficulties with the Synology instructions

amcfarla 2 years ago updated by Grantos Maximus 5 days ago 37

Trying to configure this on my Synology NAS and having issues.  Following the steps from this site https://vaemendis.github.io/ubooquity-doc/pages/tutorials/install-on-synology.html I am getting to the point of this step:


The Ubooquity service is now installed. It will start on boot and you can start or stop it at anytime using start ubooquity or stop ubooquity. You can also see the status of the ubooquity processs unsing <em>status ubooquity</em>


I am not able to start up the service but I am using the Java8 that comes from Synology, so on the following steps, I am not having any success with these:


NOTE if Java8 is used

If you used Synology Java8 package instead of Java Manager then the service script will have the wrong path to the java binary. Edit the /etc/init/ubooquity.conf and change path to java binary from:

<em>exec /var/packages/JavaManager/target/Java/bin/java -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Comics/Ubooquity"</em>

to

<em>exec /var/packages/Java8/target/j2sdk-image/bin/java -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Comics/Ubooquity"</em>


I am not sure how to edit this file, I will admit linux is not my forte at all so I am just kind of winging this at the moment, I used the command (per a friend's help) 


sudo vi ubooquity.conf


which looking at this document I don't have any of this information:


exec /var/packages/JavaManager/target/Java/bin/java -jar -Xmx1024m /var/packages/Ubooquity/Ubooquity.jar -port 2202 -webadmin -workdir "/volume1/Comics/Ubooquity"


to correct the document.


Everything below script on this conf file is the following:


setuid Ubooquity

script
 # installation settings
 JAVA_DIR=/var/packages/Java8/target/j2sdk-image/bin
 WORK_DIR=/volume1/homes/Ubooquity/.Ubooquity2
 PCKG_DIR=/var/packages/Ubooquity
 PCKG_BIN=Ubooquity.jar


 # app settings
 PORT=2202
 ADMINPORT=2203
 MEM=512m


 # This ensures that ubooquity reads special characters properly
 ENCO=UTF-8
 LANG=fr_FR.$ENCO
 export LANG


 # Main command for ubooquity
 exec "$JAVA_DIR/java" -Dfile.encoding=$ENCO -Xmx$MEM -jar $PCKG_DIR/$PCKG_BIN --libraryport $PORT --workdir "$WORK_DIR"  --adminport $ADMINPORT --remoteadmin --headless
end script


So at this point I am not sure what I need to change to get this to work.  Using WinSCP I have all the directories listed in the installation settings, except the WORK_DIR  I don't have that directory, but I did create a /volume1/Comics directory for my items.  if someone is able to assist me since I am lost on what I need to do to fix this issue.  Thank you.

Have you considered using docker? I am having a great time on my synology with the image from https://hub.docker.com/r/linuxserver/ubooquity/
It works like charm and is very easy to manage...


Cheers,

RiC

Looking at this site using docker, it doesn't have any instructions setting this up and doing a google search I am not finding any instructions doing this.  Is there any instructions to set this up?

Just install Docker via the package manager and go from there. The graphical interface is quite easy and the help topics comprehensive. Feel free to ask if you have specific questions.

I have it running, but from here I am not sure how to access the admin panel to configure anything: 



The Admin-Interface is at Port :2203/admin , in your case it would be <Diskstation-IP>:32768/admin since the Container Port 2203 is mapped to Port 32768 on your DS.


You can change the local Ports to something more usable. Also remember to add the Variables (PGID for GroupID and PUID for UserID) at the Environment Tab and Folders at the Volume Tab.


At https://hub.docker.com/r/linuxserver/ubooquity/ -p are the Ports (you got these), -e are the Variables, -v are the Folders.


For the PUID and PGID refer to "User / Group Identifiers" in the instructions. You can get them via SSH. For my DS its PUID 1031 and PGID 100

With the latest version of DSM, it's much easier to install and start Ubooquity. I did these a couple of days ago:


ssh myuser@mysynology


$ sudo su -

# cd /var/packages/

# mkdir Ubooquity
# wget -O ubooquity.zip http://vaemendis.net/ubooquity/service/download.php
# unzip -o ubooquity.zip && rm ubooquity.zip

# vim run.sh

----------[ content of run.sh ]------------

#!/bin/sh

JV="/var/packages/Java8/target/j2sdk-image/bin/java"

cd /var/packages/Ubooquity
$JV -jar Ubooquity.jar --remoteadmin --headless

----------[ end content of run.sh ]------------

# chmod +x run.sh


Then in the DSM UI, go to Control Panel > Task Scheduler and create a new Triggered Task / User Defined Script as you can see in the screenshots. Enable it, click Run and you should be fine. Admin will be on port 2203, and user interface on 2202, for example:


admin: http://your-nas-ip:2203/admin/

main interface: http://your-nas-ip:2202/




















Hello,


I'm hoping someone can help, as I have installed Docker and am trying to get Ubooquity running, but not having much luck.  I should point out my Linux knowledge is next to nothing, so command-line stuff is almost an alien language to me.


I have posted screens of my settings, however I still can't connect to the admin page from my browser.  I'm just getting a page cannot be reached message.


My Comics are in a folder called 'Comics' on the root of the folder structure.  I have no idea what a 'Mount path' is so I just copied it from an Ubooquity script I had been playing with.  The PUID and PGID I got from running 'id admin' from a command prompt via putty connected to the NAS.


I had Ubooquity running about a year ago, through trial and error, and have just started to try again.  


Hope someone can help!


Many thanks,


Mark

You got the Server and Container sides of the volume settings mixed up. Left side is the folder location on your NAS, and right side the path inside the container where the folder is mounted (the idea is, that the data locations can be outside the container, but the sytem running inside the container can access it like it were inside its own file structure). So just switch it (provided your comics are on your NAS within /volume1/Comics).


Similar with the Ports. Right side are the ports of the Containers system, left where they are mapped to on your NAS so you can access them. You can either look on the running containers details window where they are mapped to automatically if you leave your settings on Auto (but know that these assignments are dynamic an can change after restaring the container) or you can assign the ports yourself (recommended, usually you can just use the same ones like within the container).


On a sidenote, for safety reasons I would not recommend acessing the data-directories as admin, the Dockeruser ("docker" on my DS) is a much safer way. Naturally you have to make sure the Dockeruser has access rights to your Comic folder.

Hello RiC,


Thanks for the reply.


I have changed the Server and Container as you suggested.  When I browse for my Comics folder in the GUI, it actually comes up as /Comics.  The only one I can edit is the Mount Point, so I changed that to /Comics instead of volume1/Comics.


I left everything else as is.


I launched the container again, however I still can't connect to 'http://192.168.x.x:32774/admin' or 'http://192.168.x.x:2203/admin' via my browser.  Just get the page not found error in Edge.


Interestingly, when I try to connect to the admin page in Ubooquity, the page that I'm logged into my Synology on quits out back to the login screen, so I suspect there's a setting somewhere on the Synology preventing the connection.


I did switch the firewall off completely to try it, but that didn't work either.


Any ideas would be most welcome!


Mark

Mount point should be "/comics" (lowercase). You also need to provide a folder for the configuration filses (settings and database) and set it to mount point "/config". Make sure this directory is writable for Docker.


Then check if the container and Ubooquity is actually starting by looking at the output in the Terminal tab of the running containers details window. Any errors should also be in the Logging tab.

Hello RiC,


I feel like we're getting somewhere!  I now have a docker folder, with a bunch of files in it, on the root of my NAS.  The admin account has read/write access to it.


I'm doing everything as admin at the moment, then when I get it working, will create a Docker account and switch it over.


Here's the Details and log file, looks to be running the scanner, and there's a ubooquity-5.mv.db file in the docker folder, along with a preferences.json, and cache, fonts, logs and themes folders.


Still no access from the browser though, just getting the usual 'can't reach page' error.


Any ideas what could be stopping the access on the NAS?


Cheers,


Mark

Possibly worth updating DSM on my Synology?  Currently on DSM 6.1.


Also, is there any chance you can post screenshots of your setup?  Or alternatively email them to me in a zip file, so I can compare.


Cheers,


Mark

Hello again,


Thanks for all the help so far.  I have updated the DSM, and the Docker version, and now have settings similar to the ones posted above (though still no access yet!)


Everything seems to be running, as the log file is running after the container launched on reboot.


Can't reach it on port 32770 or 2203 though.  I have enabled all ports on the firewall on the NAS, and my router, but not having much joy.


Mark

Just to add, I created a new Comics folder called 'Comics1' and placed a 'Docker' folder in it.  I copied one folder of comics to the new location too, and gave write access to everything.


Now when I run the container for Ubooquity, the Docker folder called 'cache' updates with all the cover art from the comics.  This never happened before, so we're getting there slowly.


With the Firewall on, I can't access anything.


With the Firewall off, I get a different error message, though still no access to the /admin page.  I have also configured static ports, but no joy.


Any more ideas?


Mark

Hello,


I have one more question... in the Network settings for Docker, should the Bridge subnet be left at 172.17.0.0/16.  This is the connection the Ubooquity container is using.


My internal network is on the 192.168.x.x range.  Could this be one of the issues?


Cheers,

I never changed any network settings for docker in my setup, so I dont really think that has anything to do with your problems. Docker itself should take care of mapping the container ports from its bridge subnet to the ports specified for your host (=NAS).

Solved.


Microsoft Edge is a crap browser.


Tried Firefox, and I was straight into the admin page.


Need to copy all my comics over now!


Thanks for all the help!

I have given this a go as well. Not sure if Synology have given up on Docker or now but I managed to gt it running. Screen shots below. I did the following.


  1. Downloaded the latest Docker manually by searching the Synology site
  2. Did a manual install.
  3. Did a search in the registry for the most popular ubooquity downloaded and installed it.
  4. Set it up to restart if it stops, and let it start.
  5. Navigated to the admin screen and ran into the most bizarre message, and that's where I am totally stuck. Message is:
    HTTP ERROR 500
    Problem accessing /admin. Reason:
    Could not find matching provider (wrong URL)
    Powered by Jetty:// 9.4.0.v20161208

Advise welcome. Screen shots below:


    Hello,

    When i installed Ubooquity, make sure the user ubooquity is creating with group http and user, and read/write permissions to

    WORK_DIR=/volume1/homes/Ubooquity/.Ubooquity2


    on NAS and this directory :

    WORK_DIR=/volume1/homes/Ubooquity/.Ubooquity2

    is created and chown to this user :


    # mkdir /volume1/homes/Ubooquity

    # mkdir /volume1/homes/Ubooquity/.Ubooquity2

    # chown -R Ubooquity:users /volume1/homes/Ubooquity/*


    And you run :

    # start ubooquity

    Hi, May I ask if that was a stand alone install or the Docker version? I just checked and the Docker install created no users or groups on the Synology. 

    Try:  192.168.1.2:32768/comics/admin

    Thanks for your comments. I have been tied up with work but coming back to this now. I discovered that some of the docker variants just weren't working properly. I have just installed the PRODUCERISM one and have had quite a different result. Screen shots below. They show the different variants I have downloaded and tried to run. PRODUCERISM managed to kind of open the interface. Hmmmm.... my comics are in /volume1/comics but in the Synology control panel there are no ubooquity users or groups being created when it is set up or run. Do the comics need to be inside the container? Much thanks

    I'm using the linuxserver distro of Ubooquity and it works fine.  You need to link the directory for the comics when setting up the container.  In the Volume tab you should have /volume1/comics (might just read /comics after you select the folder) under File/Folder and /comics under mount path.  Also, you need to open the admin console first, so you can setup a user.  I believe that's why you are getting the error "Sorry, you are not authorized.."  You can also change the local ports to 2202 and 2203 so they match the container ports.  Make sure both of these ports are open on your router.  Then to open the Ubooquity admin console:   192.168.1.2:2203/comics/admin 

    To view your comics: 192.168.1.2:2202/comics/

    Thank you for your input. I had a play with it several times, uninstalling a reinstalling several of distros and reproducing that same black screen you see above. I also tried following some command line installers but they were out of date.

    I think the issue is this part which you highlighted:

    "Also, you need to open the admin console first, so you can setup a user. I believe that's why you are getting the error "Sorry, you are not authorized..""


    This is definitely something I have not done as i didn't see any instructions for this. What am I supposed to do here (yes I am a Noob!). I believe we are talking about this terminal window?

    I  wish there was a youtube video to follow this through step by step.

    Thank you


    No, not in the terminal window.  In a web browser, open http://IP ADDRESS:port/comics/admin

    Thank you very much for your help. Extremely appreciated. I have been working on this overnight and all morning, so having people in the community helping me is simply awesome. Earlier today I tried another completely different Docker to see if it was my Docker install. I installed TauTulli and it worked first time and is now giving me excellent info on my Plex install. So that's one potential issue crossed off my list.

    I entered in the url you suggested The first image shows an error and is probably going to make sense to someone and contains what I hope is the clue to what is happening.

    Internal server error: String index out of range: -1


    I then removed the /admin to see what I could see and the configuration pages are visible. I have already copied one CBR into the /comics directory and another 20 old comics into a sub directory in it as well so I could try the search function but no joy. No comics visible.


    The config panel does work. See below.


    So it's "half working". I then removed the /comics and we came back to the original
    issue.




    Could the issue be Java related or permissions? 

    I am deeply grateful for the help you are giving me. With all this Covid seclusion and business so affected projects and communities like this are a real breath of fresh air.


    My Config which I forgot to include. You may notice I am now trying a completely different package now. Running through the whole gamut of them in my testing. :-)

    This shows my java

    You need to add the port 2203.  You can do this under the Port Settings menu of the Ubooquity container.  You must first stop the container before you can edit it.  Once, you add the 2203 port you should be able to get to the admin console.  http://192.168.1.2:2203/comics/admin

    Much thanks Nathan. I did this. I stopped the server and added the port and restarted. Unfortunately no connection at all on that port. Screen shot to follow.



    I then uninstalled and reinstalled from scratch. I received the same message. I played with the url and then got this message.



    I will include a couple of the configuration screen shots of the install below. Maybe they can shed some light.



    Looks like you mount path and File/Folder are backwards.  The mount path should be /comics and the file/folder should be the location folder on your NAS where your comics are stored.  You should also have a /config mount path and the file folder should be where the docker container is located.  Usually docker/Ubooquity.

    I was going to post up a series of screen shots of my install on my 1819+, however I decided to test installing the docker onto another Synology (416Play). Going through the same installation procedure on both systems gave different results. The 416Play is definitely further along. Screen shots of the 416PLAY are below.

    Firstly we finally SEE the admin panel


    And attempting to add a comic directory



    Gives the error below. 





    Which gives me the usual black screen





    Perhaps you cold try the most current version of Ubooquity? I am running the linuxserver docker without any problems on my 1517+.

    Indeed! :-)

    I may be grabbing from the wrong sources altogether. The location I am getting it from is here: https://usdl.synology.com/download/Package/spk/Docker/

    On the 1819+ I am using the latest one at this location. On the 416play I tried the earlier version to see if it made a difference.


    Try pulling the linuxserver/ubooquity directly from within synology's docker app.

    (https://hub.docker.com/r/linuxserver/ubooquity/)

    The directory you listed contains synology's docker versions. You should not need these normally. You can manage everything from within the DSM.

    Thank you. I tested and no changes. Regarding the Synology Docker repository I mentioned ( https://usdl.synology.com/download/Package/spk/Docker/) is this the correct place to obtain the Docker app? I am wondering if this is the source of the issue. Thank you.

    Usually you would not need to use this repository at all, since the docker app is part of the official synology app suite and can be installed and managed quite easily from within the DSM package manager.


    Aside from that, I think the source of your issues is your containers configuration. Make sure you have mapped the required folders correctly, applied the necessary access rights to these folders so that docker can actually access them and provide the recommended environment variables and port allocations. The linuxserver/ubooquity docker actually makes a very good job in providing the relevant instructions on the page I linked.

    I have some semi good news :-)

    The link referred to above (https://hub.docker.com/r/linuxserver/ubooquity/) is mostly "geek greek" to me. I have no experience with linux other than using the GUI with Ubuntu on an old lap top.

    But I digress.

    I perused the page and a long way down came to this:

    "Access the admin page at http://your-ip:2203/ubooquity/admin and set a password."


    This is different from earlier advice in the thread ("http://192.168.1.2:2203/comics/admin") which led me into some other issues. Please don't get me wrong, I DEEPLY appreciate the advice, as the best way to turn a ship is to get it moving so it was all part of the process, but I finally got to the proper login and set up page.

    I am still getting around the quirks of how and where to add directories to to it but as the screen shot below shows, it is working now :-)

    I need to refine exactly where it is looking currently to find comics as it is scanning places it shouldn't (system directories!?!) but this will hopefully be resolved by trial and error.