Lidarr

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
When will Lidarr be a plug-in?

I’m not good enough to figure out how to do it manually, and the search function shows me results from 12 months ago, where the guides only work if your pools are named the same as the person who wrote the guide.

Currently have it running on my windows machine but would like to get it moved over to FreeNAS.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
These instructions should be current (last update was less than a couple of weeks ago). If you have issues with following them, I'd expect asking on the discussion thread for that resource would give some help.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
The guide here is pretty self contained, with the exception of the fstab commands, as you mentioned. I'll break it down for you. These are the three lines that you'll need to adapt for your configuration:
Code:
iocage fstab -a lidarr /mnt/tank1/apps/lidarr /config nullfs rw 0 0
iocage fstab -a lidarr /mnt/tank1/torrents /mnt/torrents nullfs rw 0 0
iocage fstab -a lidarr /mnt/tank1/music /mnt/music nullfs rw 0 0

What these do is make the data contained on your freenas host outside of the iocage jail, available inside the iocage jail. The format that these statements take is:
iocage fstab -a <jailname> path/to/source/data path/to/destination/inside/jail nullfs (rw/ro) 0 0

so in the case of the first statement, the directory /mnt/tank1/apps/lidarr is a dataset that you've set up outside of your jail, which will be mounted as the directory /config inside the jail. This means that the configuration data for lidarr can be stored outside of the jail, allowing you to restore everything to its previous configuration if you have to destroy the jail for whatever reason.

The /mnt/tank1/torrents dataset is the download location of all of your torrents, which will be shared with your download client (ie transmission, qbittorrent, utorrent), and Radarr/sonarr if you have it.

The /mnt/tank1/music is the dataset that contains your music library.

The location of each of these datasets is pretty arbitrary, so you can put them wherever you like, and name them whatever you like. The mount points within the jail will have to stay the same for the rest of the guide though. Essentially:

Code:
iocage fstab -a lidarr /path/to/lidarr/config/dataset /config nullfs rw 0 0
iocage fstab -a lidarr /path/to/shared/torrent/download/dataset /mnt/torrents nullfs rw 0 0
iocage fstab -a lidarr /path/to/music/library /mnt/music nullfs rw 0 0


Aside from this, it should just be a matter of entering the commands in the order presented and that should get you up and running.
 

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
Thank you so much for taking the time to break it down for me. I’m not very confident with all of this, and I’m just happy I’ve made it this far, but learning every day because of everyone here. I’ll give it a go tomorrow, and report back. I really appreciate the help.

One question, the fstab commands, do they have anything to do with the “mount points” that I normally configure inside the jails tab? Would there be a way to just configure it there? Basically, I have two pools, “Server” which is my windows share and holds all my backup data and media, and a “Jails” pool that holds all my jails, plex, Sabnzbd, radar, etc. Just not feeling confident specifying paths manually as I like the somewhat organized feel I have going on right now.
 
Last edited:

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Thank you so much for taking the time to break it down for me. I’m not very confident with all of this, and I’m just happy I’ve made it this far, but learning every day because of everyone here. I’ll give it a go tomorrow, and report back. I really appreciate the help.

One question, the fstab commands, do they have anything to do with the “mount points” that I normally configure inside the jails tab? Would there be a way to just configure it there? Basically, I have two pools, “Server” which is my windows share and holds all my backup data and media, and a “Jails” pool that holds all my jails, plex, Sabnzbd, radar, etc. Just not feeling confident specifying paths manually as I like the somewhat organized feel I have going on right now.
Sure. I'm pretty sure the jails tab in the web gui just makes entries in the fstab file, so these are the same thing.
 

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
Well, I was able to get the jail created, and started. When I get to the line:

Code:
https://github.com/lidarr/Lidarr/releases/download/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz -o /usr/local/share"


I get the following output:

Code:
Certificate verification failed for /C=US/O=DigiCert Inc/OU=www.digicert.com/CN=DigiCert SHA2 Extended Validation Server CA
34374371912:error:14090086:SSL routines:ssl3_get_server_certificate:certificate verify failed:/usr/src/crypto/openssl/ssl/s3_clnt.c:1269:
fetch: https://github.com/lidarr/Lidarr/releases/download/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz: Authentication error
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
That isn't a line. The line is (and this is all one command line, even if the system will wrap it):
Code:
iocage exec lidarr "fetch https://github.com/lidarr/Lidarr/releases/download/v0.2.0.371/Lidarr.develop.0.2.0.371.linux.tar.gz -o /usr/local/share"

You appear to have left off the first four words of that command line.

You are right, sorry i copy/pasted incorrectly to this forum post, but did include the full line when trying to install.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
You are right, sorry i copy/pasted incorrectly to this forum post, but did include the full line when trying to install.
Interesting. I get the same issue. I found as a solution as discussed here. Run the following commands:
Code:
pkg install ca_root_nss
mv /etc/ssl/cert.pem /etc/ssl/cert.pem.bak
ln -s /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem


What this does:
  1. Installs the Mozilla Project root certificate bundle
  2. Renames the existing certificate so that it won't be used (.bak for backup incase you want to revert changes)
  3. Creates a symbolic link between the certificate in the ca_root_nss package and /etc/ssl/cert.pem so that fetch can find the certificate
I'm not sure how "good" this solution actually is, but it appears to be better than bypassing security altogether, and it works. Now you should be able to fetch Lidarr. Note that there is a more recent version than the one you're trying to download, execute this command instead:

iocage exec lidarr "fetch https://github.com/lidarr/Lidarr/releases/download/v0.5.0.583/Lidarr.develop.0.5.0.583.linux.tar.gz -o /usr/local/share"

Edit: These types of questions should probably go in the thread for this guide though, that way people who might also run into these issues can find a solution more easily.
 
Last edited:

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
Thank you for taking the time to help me, but it seems I've hit yet another wall. Running the command in the shell "pkg install ca_root_nss" results in:

Code:
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!


Maybe I should add I am doing this from ssh on another computer, and yes I did temporarily enable root login for it, only because copy/paste works in Putty.

I then tried running it from the shell inside the lidarr jail tab and got it to install. Following along with the rest of the guide I got to the step where I enter:
Code:
iocage exec lidarr chown -R lidarr:lidarr /usr/local/share/Lidarr /config


And I am presented with:

Code:
chown: /config: No such file or directory


Clearly I am not suited for this type of work! I appreciate your help, I can just stick with the Windows version until I can hopefully get a plugin. I hate to be a bother.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Thank you for taking the time to help me, but it seems I've hit yet another wall. Running the command in the shell "pkg install ca_root_nss" results in:

Code:
Updating local repository catalogue...
pkg: Repository local load error: access repo file(/var/db/pkg/repo-local.sqlite) failed: No such file or directory
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!


Maybe I should add I am doing this from ssh on another computer, and yes I did temporarily enable root login for it, only because copy/paste works in Putty.

I then tried running it from the shell inside the lidarr jail tab and got it to install. Following along with the rest of the guide I got to the step where I enter:
Code:
iocage exec lidarr chown -R lidarr:lidarr /usr/local/share/Lidarr /config


And I am presented with:

Code:
chown: /config: No such file or directory


Clearly I am not suited for this type of work! I appreciate your help, I can just stick with the Windows version until I can hopefully get a plugin. I hate to be a bother.

No stress, keep going you're almost done. I'm not sure if a Lidarr plugin is even under development, so it's worth your time to sort this out. The first issue is because the jail you're using for whatever reason doesn't have pkg installed. I sometimes get this error when there's a temporary connection issue as well. Run pkg update && pkg upgrade until this error is resolved.

If you absolutely can't get this working (there should be no reason why it wouldn't), you can modify the fetch command as follows:
iocage exec lidarr "fetch https://github.com/lidarr/Lidarr/releases/download/v0.5.0.583/Lidarr.develop.0.5.0.583.linux.tar.gz --no-verify-peer -o /usr/local/share". This bypasses the certificate authentication, and is not recommended.

The second issue is that it can't find the mount point /config. This comes back to setting up your mounts. Did you set the destination mount point to be /config? if not, you might want to do this, OR change the /config portion of the chown command to be the mount point for your config files. This might have other issues though, I'm not sure if Lidarr expects it's config files to be in /config so probably best to go with the former option
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Running the command in the shell "pkg install ca_root_nss" results in:
Those commands (all three of them) need to be run in the jail's shell.
 

samuel-emrys

Contributor
Joined
Dec 14, 2018
Messages
136
Those commands (all three of them) need to be run in the jail's shell.
Good catch, I glossed over that. The commands to run from the FreeNAS shell are:

Code:
iocage exec lidarr "pkg install ca_root_nss"
iocage exec lidarr "mv /etc/ssl/cert.pem /etc/ssl/cert.pem.bak"
iocage exec lidarr "ln -s /usr/local/share/certs/ca-root-nss.crt /etc/ssl/cert.pem"
 

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
I had some more time today to mess around with this. I was able to get all the way through the guide but then I get to "Create an rc file for radarr using your favorite editor at /mnt/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr " and I am confused. I created an empty file in the rc.d directory named lidarr. If I click the show rcfile button on the guide, the first few lines look like comments so I omitted them, but a few lines down in says "# Add the following lines to /etc/rc.conf to enable lidarr: " so where do I paste the text in that show rcfile? I put them in /etc/rc.conf down at the bottom of the file, and I get to the last line in the guide "iocage exec lidarr service lidarr start " and it seems like its working, but I am unable to load the GUI for Lidarr, it just says connection refused, even though the IP of the jail is pingable.

Thanks!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
the first few lines look like comments so I omitted them
Put them back in. Especially the first one that looks like #!/bin/sh.
 

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
even though its already in the file at the very top?

I must be missing something else, still no joy...:(
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
? You just said you left out the first few lines.

/mnt/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr should contain everything from #!/bin/sh to run_rc_command "$1". Then run the next three commands (that all start with iocage exec lidarr).
 

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
I added those lines back. Still confused though, I'm not actually modifying the rc.conf file at all, correct? All that text is in /mnt/iocage/jails/lidarr/root/usr/local/etc/rc.d/lidarr - when I get to the last line "iocage exec lidarr service lidarr start" I get

Code:
Starting lidarr.
Unmatched '"'.
Unmatched '"'.
/usr/local/etc/rc.d/lidarr: WARNING: failed to start lidarr
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504

rknaub

Explorer
Joined
Jan 31, 2017
Messages
75
Yep good catch, when I copy/pasted, the line:

command_args="-f ${procname} /usr/local/share/Lidarr/Lidarr.exe -- data=${lidarr_data_dir} --nobrowser"

There was an extra line break after the -- that somehow got added. Error is gone now. Thanks!

So, I am still unable to load the GUI.. maybe it has something to do with my IP settings.. when I first started with the line:

iocage create -n "lidarr" -p /tmp/pkg.json -r 11.2-RELEASE ip4_addr="vnet0|<IP>/<MASK>" defaultrouter="<GATEWAY>" vnet="on" allow_raw_sockets="1" boot="on"

I got an error, I believe it was a mask error or something, so I just changed it manually to DHCP inside freenas, I used <192.168.1.29/24> for ip/mask and <192.168.1.1> for gateway, possibly I should have entered 255.255.255.0 instead of the /24?
 
Top