Ubooquity

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Hello,
I am a beginner on FreeNas, and I would like to use Ubooquity, but I can not make it work ... I'm not sure how to get it right for installation, and after some research on web there is no definite solution, but you seem to have done it! Could you please, detail me every step of installation with Java, for a installation in a jail (I am in version 11 of FreeNas)? Thanks a lot for your help !

Best regards.
 
D

dlavigne

Guest
Were you able to find a how-to? If not, you could try on the FreeBSD forums and recreate the steps within a FreeNAS jail.
 
D

dlavigne

Guest
Which part of the tutorial failed? Both products are based on FreeBSD and the listed commands are valid FreeBSD commands...
 

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Hi !
Thanks for reply !
I try to install it in a jail.

First, with the command

# pkg search ^openjdk

It find :
openjdk-7.151.01,1 Java Development Kit 7
openjdk-jre-7.151.01,1 Java Runtime Environment 7
openjdk6-b44,1 Oracle's Java 6 virtual machine release under the
GPL v2
openjdk6-jre-b44,1 Oracle's Java 6 Runtime Environment under the GPL
v2
openjdk8-8.152.16 Java Development Kit 8
openjdk8-jre-8.152.16 Java Runtime Environment 8


After, i install openjdk8-jre-8.152.16 with :

pkg install openjdk8-jre-8.152.16

And i have the message :

Note: your X Windows configuration file is typically /etc/X11/XF86Config
if you are using XFree86, and /etc/X11/xorg.conf if you are using X.Org.
Message from openjdk8-jre-8.152.16:

======================================================================

This OpenJDK implementation requires fdescfs(5) mounted on /dev/fd and
procfs(5) mounted on /proc.

If you have not done it yet, please do the following:

mount -t fdescfs fdesc /dev/fd
mount -t procfs proc /proc

To make it permanent, you need the following lines in /etc/fstab:

fdesc /dev/fd fdescfs rw 0 0
proc /proc procfs rw 0 0

======================================================================

And if i search to execute :
mount -t fdescfs fdesc /dev/fd

I have
mount: fdesc: Operation not permitted
 

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Hi !
I'm sorry, but i don't understand Nothing...

Now, i have :
Code:
[root@freenas ~]# jls														   
   JID  IP Address	  Hostname					  Path					 
	1				  Ubooquity					 /mnt/Nas/jails/Ubooquity 
[root@freenas ~]# jexec 1 tsch												 
jexec: execvp: tsch: No such file or directory								 
[root@freenas ~]# jexec 1 tcsh												 
root@Ubooquity:/ # mount -t fdescfs fdesc /dev/fd							   
mount: fdesc: Operation not permitted										   
root@Ubooquity:/ # exit														 
exit																			
[root@freenas ~]# mount -t fdescfs fdesc /dev/fd								
[root@freenas ~]# mount -t procfs proc /proc									
[root@freenas ~]# rehash														
bash: rehash: command not found												 
[root@freenas ~]# fdesc   /dev/fd	 fdescfs	 rw  0   0					 
bash: fdesc: command not found 


Please, can someone give me a tutorial step by step?

Best regards.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Ok this will get you up and running using the trick that @dlavigne linked you to. I'm no java expert and have no idea how to make this a permanent addition to fstab so it won't likely survive a reboot or system upgrade.

On the base FreeNAS system run the following commands with your pool name and jail name in the path:
mount -t fdescfs null /mnt/YOUR_POOL_NAME/jails/YOUR_JAIL_NAME/dev/fd
mount -t procfs null /mnt/YOUR_POOL_NAME/jails/YOUR_JAIL_NAME/proc

From your Ubooquity jail shell run the following commands:
pkg install openjdk8
mkdir /usr/local/ubooquity
cd /usr/local/ubooquity
fetch http://vaemendis.net/ubooquity/downloads/Ubooquity-2.1.1.zip
unzip Ubooquity-2.1.1.zip

To start the application run the following:
nohup java -jar Ubooquity.jar --remoteadmin

To stop the application run the following:
pkill -f Ubooquity.jar < /dev/null

Once it's running you can navigate to the web admin page via your jails IP + port 2202 for the web page or 2203 for the admin page.
 
Last edited:

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Hi !
Thanks for reply !

The real page admin is jails IP + port 2203/admin

It works ! For cons, I do not have access to my folder where are located ebook ... Normally, they are in /mnt /MY_POOL_NAME/MY_FOLDER, but mnt is empty when i browse and i search location...

Best regards.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
You'll have to mount that storage point to your jail.
 

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Oh yes ! Sorry...

I mount the storage point to the jail, but the scan doesn't find any books ...

The server asks to restart after the changes, but when I click on "save and restart" I'm not sure it will restart ...
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Run the start command listed above if it doesn't.

I do not have access to my folder where are located ebook ... Normally, they are in /mnt /MY_POOL_NAME/MY_FOLDER, but mnt is empty when i browse and i search location...

That file path is your source. Make sure your book folder you choose in Ubooquity is your destination mount point you chose for your jail.
 

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
yes it is that since I see the files created on my volume ... should the tree be the same?
 
Last edited:

Ponch

Dabbler
Joined
Nov 18, 2017
Messages
10
Is it the same problem as with Plex? Because the Plex server can not find any files also during scans ...
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Found out this setup procedure I wrote above doesn't survive a restart of the application. Apparently you have to have a "working" folder to store the database and preferences in. If you start the app in the same folder as you installed it in you preferences and settings all get overwritten each time it starts. To fix that is pretty easy, just add a work folder and add one switch to the startup command. You can use an existing folder as long as it is empty but I just chose to create one to keep is simple.

To add the work folder in the root of the jail
mkdir /work

And then you have to specify the work folder at startup
nohup java -jar Ubooquity.jar --remoteadmin --workdir /work
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
Got this switched over to iocage and added a startup script with a cron entry to make it start with the jail. Also the command to add storage to the jail changed slightly with iocage so I've included that below too.

To add storage to your iocage jail.
iocage fstab -a ubooquity1 /mnt/YOUR_POOL/path/to/media /media nullfs rw 0 0

Create a startup script in the root of the jail named start.sh
ee start.sh

Add the following code to your script file:
Code:
#!/bin/sh
nohup java -jar /usr/local/ubooquity/Ubooquity.jar --remoteadmin --workdir /work

Add crontab entry:
crontab -e

And add this to run script at jail start:
Code:
@reboot /bin/sh /start.sh
 
Top