Logitech Media Server for FreeNAS 9.2.1.1

Status
Not open for further replies.

UDO

Dabbler
Joined
Jul 9, 2014
Messages
18
hi all, i'm normally a lurker, however i registered purposely to be able to say thanks (a grande merci) to "Djoole".
Your info and script worked flawlessly.

After 4+years of running freenas-7.2 it was time to upgrade... i had been holding off until i could transfer a number of always-on services from my pc to my nas. until now, this was not possible in an out of the box freenas configuration.
I have installed FreeNAS-9.2.1.5-RELEASE-x64 (80c1d35) on a new hp microserver n54l with 4x 4tb wd-red and 8gb ram.
now i have xfer'd all services to the new nas, eg sabnzb, sickbeard, but most importantly LMS. all in a manageable and repeatable config. my old freenas 7 has no been decommissioned.

LMS is working very well, however i have noted that it is unable to play some files... i need to perform further analysis.
it has been running for 2 months.

merci
 
Last edited:

ACCH

Cadet
Joined
Jul 12, 2014
Messages
1
Hi all, thanks much for this nice install script. Worked like a charm.

Unfortunately I'm encountering a problem when trying to scan pictures and videos to my library. The scanner seems to recognize the pictures/videos but somehow they are not being added to the library. When I ssh into the jail and run a rescan for the video files from the WebUI, I can see a "stat on file , errno=2" message (doesn't say which file) in the ssh console for every file it tries to scan (I have 3 video files and the error appears 3 times). The scanner log unfortunately doesn't help either since there is none (scanner.log is empty in WebUI and looking into the jail there is no scanner.log file either). Something seems to be wrong there too. The server.log doesn't show anything. File permissions would seem ok/accessible (at least not different compared to the music files which are added to the library without any problems).

Any idea what the problem could be?

my files are organized as "/media/Music", "/media/Videos", "/media/Pictures" and for each folder only the corresponding checkbox is checked.

Thanks.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Anyone "in" with the LMS community? I'm a bit confused..

If you go to http://downloads.slimdevices.com/ and browse for the latest LMS it appears to be 7.8.0 dated March 27, 2014. But if you go to the nightly folder you can choose between 7.7, 7.8, 7.9 and 10.0.

So which one "should" I be running? I'm currently on the 7.8.0 dated March 27, 2014. Is there a "stable" version of 7.8, 7.9 and 10.0?
 

Trouloulou

Cadet
Joined
Jan 3, 2014
Messages
5
And what about mysql integration ?
My DB is so huge that i'd rather to use mysql. Is it possible ?

++
 

zephyr

Dabbler
Joined
Aug 29, 2013
Messages
14
How to install LMS on FreeNAS 9.2.1.6 step by step? I ask for instructions for dummies ;-) When I try the method described at the beginning of the script I get the message "set: Variable name must begin with a letter." I had previously installed the LMS, but when I try to add another jail FreeNAS faultyly removed all the jails. PLEASE HELP!!!
 

Roger Wilco

Explorer
Joined
Jul 17, 2014
Messages
65
Yes, seems like it. This message turns up after service start whatever I do.
Even when all env variables are all set properly. Maybe one should ask djoole.
Anyhow, I decided to ignore this message since all special chars are displayed correctly now (in box and webfrontend) and even lms' webfrontend shows the right locale. (Also when you change the language)

Whats silly is though, that if you browse via album, all special chars were correct anyway, when names've been taken from the ID-Tags and not from filenames.


This makes perfectly sense :)
Short answer:
On startup through slimserver.pl there is (somewhere) a call to localeDetails(), which is located in Slim/Utils/OS.pm
There the value of the LC_CTYPE envvar is checked, an a variable called lc_ctype is set to the envvar's value (or 'C').
And, in case the value is 'C' or 'POSIX', one gets the "Your locale was detected as..." warning on stdout.

LMS is started through slimserver.pl and the above warning appears before the "
Starting Logitech Media Server..." message.
A few lines later the CLI-argument "charset" is checked, and in case it has been set (through slimserver.pl --charset=whatever) the variable lc_ctype is set to the charset's value.

This is why you see the correct value in LMS's configuration/Information webpage, and why probably things seem to work.

So, if you want to get rid of the warning, export LC_CTYPE in your rc.d script, or, read the docs on how the rc mechanism works (see code in run_rc_script() and run_rc_command in /etc/rc.subr)

I've tested it under FreeNas 9.2.1.6 with a self-built 7.8.1 and 7.9 in a jail, but only under lab conditions, as I do not have any real data on the box yet, and all my files have ascii chars only....
 

Roger Wilco

Explorer
Joined
Jul 17, 2014
Messages
65
Anyone "in" with the LMS community? I'm a bit confused..

If you go to http://downloads.slimdevices.com/ and browse for the latest LMS it appears to be 7.8.0 dated March 27, 2014. But if you go to the nightly folder you can choose between 7.7, 7.8, 7.9 and 10.0.

So which one "should" I be running? I'm currently on the 7.8.0 dated March 27, 2014. Is there a "stable" version of 7.8, 7.9 and 10.0?

I've seen somewhere "on the net" a discussion about the versioning of LMS.
In terms of FreeBSD it was like
7.8 - RELEASE,
7.8.X STABLE
7.9 CURRENT
10.X Don't know, this is for the new hardware?

See http://downloads.slimdevices.com/nightly/index.php
So you should be running the version which fits your needs :)
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
I've seen somewhere "on the net" a discussion about the versioning of LMS.
In terms of FreeBSD it was like
7.8 - RELEASE,
7.8.X STABLE
7.9 CURRENT
10.X Don't know, this is for the new hardware?

Ah, so I'll stay with 7.8 release then. ;)
 

mikkellm

Cadet
Joined
Aug 11, 2014
Messages
2
When I run the otherwise very nice script, it stops at line 62: adding dependencies.

I get the following error:
root@LMS:/ # pkg install -y p5-DBI p5-EV p5-XML-Parser p5-HTML-Parser p5-JSON-XS
p5-Digest-SHA1 p5-YAML-LibYAML p5-Sub-Name p5-Audio-Scan p5-Image-Scale p5-DBD-
SQLite p5-Class-XSAccessor p5-Template-Toolkit p5-IO-Interface sox
Updating repository catalogue
FreeBSD repository is up-to-date
All repositories are up-to-date
pkg: Repo FreeBSD needs schema upgrade from 2006 to 2010 but it is opened readon
ly
pkg: need to re-create repo FreeBSD to upgrade schema version
pkg: No packages available to install matching 'p5-DBI' have been found in the r
epositories

And it's not only p5-DBI that fails, its all of them, apperently it only shows info for the first item.

I have no idea how to retrieve them otherwise as I'm fairly new to FreeBSD, do anyone have suggestions.

Thanks.
 

Whattteva

Wizard
Joined
Mar 5, 2013
Messages
1,824
Just run this command and it should fix it
Code:
pkg update -f && pkg upgrade
 

anika200

Contributor
Joined
Mar 18, 2013
Messages
113
How to install LMS on FreeNAS 9.2.1.6 step by step? I ask for instructions for dummies ;-) When I try the method described at the beginning of the script I get the message "set: Variable name must begin with a letter." I had previously installed the LMS, but when I try to add another jail FreeNAS faultyly removed all the jails. PLEASE HELP!!!

I posted a thread on here once (now missing) with a simple step by step and I will repost the text here for you maybe it will help.
Please be aware I have not tested this again since it was posted back in Sept 2013 for 9.1.X.
Coming Soon -- sorry the paste format was messed up somehow.
I set up the new Logitech Media server in a couple of minutes without a plugin and it works very well.
I just put this here because it is easier to find.
All the credit goes to this brilliant french man djoole see his post here.
Get the file from his site here or my Dropbox share.
I am going to install the lms in the same jail as I created for subsonic and it will share the same media folder too. See this thread or just roll your own jail and shared folder.
The following assumes you have a jail with, Name: Subsonic with, User: Sonic, with IP: 10.0.100.32, with Share Storage Folder inside jail: /media.
Move the file to inside your jail:
Move the file lms-freenas-amd64-7.8.0-1342011222.tgz into the share folder /media via nfs or whatever means.
Working from a client machine terminal enter commands that follow "#>" but not the quotes of course.
Open shell to home directory on server.
#>"ssh sonic@10.0.100.32"
Make a temporary dir in /home/sonic
#>"mkdir temp"
Copy the lms file to the temp dir
#>"cp /media/lms-freenas-amd64-7.8.0-1342011222.tgz /home/sonic/temp"
Change into temp dir and unpack the file.
#>"cd temp"
#>"tar xzf lms-freenas-amd64-7.8.0-1342011222.tgz"
Make a link to a library file:
We need to make a link here because lms will look for an outdated library and refuse to compile. Still working from the client terminal via ssh.
Become root.
#>"su"
Create link
#>"ln /lib/libz.so.6 /usr/lib/libz.so.5"
Also, make sure there is a link from /usr/lib/libz.so to /lib/libz.so.6.
#>"ln /lib/libz.so.6 /usr/lib/libz.so" (you should get an error here >> File exists, this is good thing)
Done, exit root.
#>"exit"
Install the Logitech Media Server:
Change into lms dir
#>"cd lms-freenas-amd64-7.8.0-1342011222"
Run the installer
#>". / Installme.sh"
Once installed log into the server via web browser and set it up.
http://10.0.100.32:9000
 
Last edited:

NeverSimple

Dabbler
Joined
Jul 27, 2011
Messages
16
Thanks to the OP for his work on this. It really was as easy as downloading the script and executing it in the correct (plugin) jail.

I'm just a bit unsure about the directions given in the comment section in the sript. Apart from step one (log into the jail), it seems that none of this is actually needed.
You can just download the script somewhere and execute it.

It's probably from before the shell script was available separate and you had to download the tarball to get it?

Anyway, big thanks! I still have some teethmarks on my desk from a previous install when trying to get those Perl versions/dependencies to work... It wasn't funny! :confused:
 

Stuarty

Cadet
Joined
Aug 31, 2014
Messages
3
Hi,

This doesn't work for me. LMS installs and I can access the webgui but I can't scan anything. As soon as I ask it to scan it fails. There's nothing about the scanner in the server.log and there is no scanner.log.

Could we learn more about how the 'scan.so' is compiled so that we can make a version for ourselves?

Any help appreciated.

/S
 

dagcenter

Cadet
Joined
Jun 13, 2014
Messages
2
Hey dagcenter,
try the following step by step instructions.
  1. Create a fresh pluginjail (BROWSER)
  2. Download the "installme.sh" (BROWSER)
  3. Paste the "installme.sh" into the root of the jail (FTP/SHELL)
  4. Set the Permissions of the "installme.sh" to 777, type in "chmod 777 installme.sh" (SHELL)
  5. Find out the jail id with "jls" (SHELL)
  6. Login to the jail "jexec jailid shell" for example "jexec 1 /bin/tcsh" (SHELL)
  7. Run the "installme.sh", type in "./installme.sh" (SHELL)
  8. Open the terminal in the browser JAILIP:9000 (BROWSER)
I hope the will help.

Best
Nikkiez
Thanks a million. My rig broke down and I just picked this up again.

It works as it should up until when I'm going to open the terminal, in my case at 192.168.1.220:9000
I get a blank page with conncetion refused, and my Freenas machine says cron[5275]: login_getclass: unknown class 'daemon'
_secure_path: /etc/login.conf is world writable
 

mrMuppet

Contributor
Joined
Mar 14, 2014
Messages
192
Any tutorial to upgrade to lms 7.9 ?
 

jkousholt

Cadet
Joined
Oct 28, 2014
Messages
4
I'm having some trouble running the install script.
I've done all the steps until running installme.sh

Code:
root@LMS:/usr/local/tmp # ./installme.sh
set: Variable name must begin with a letter.
root@LMS:/usr/local/tmp #


Can anyone give a hint what I'm doing wrong?

Edit: removed jail and followed Nikkiez guide, and it worked :)
 
Last edited:

Schodoodles

Cadet
Joined
Dec 16, 2014
Messages
4
Any tutorial to upgrade to lms 7.9 ?
Also struggling with this; bit of a Linux noob as well so any help would be appreciated.

I'm on FreeNas 9.2.1.9 and managed eventually to get LMS installed (took a lot of trial and error) but then it wouldn't scan the media directory I had mapped into the Jail. I'm assuming this is because the install script uses the older version?
I've tried building a new file with the 7.9 version as per the script but I'm lost in terms of Linux command for it to use that file now instead of downloading the new one. Is it simply a case of re-pointing the wget to the 7.9 location and ammending the references of the internal directory to the new one?

And just to be clear this is the basic steps I'm trying to do;
1) Create a jail (Calling it LMS). Setting the IP to 192.168.1.95.
2) Create a Jail user.
3) Open the shell via FreeNas and run "pkg update -f && pkg upgrade".
4) use the mkdir commands to create media folders under /mnt/Media/ for my Music & playlists. e.g. "mkdir /mnt/media/music"
5) Use the mkdir and map folder to add the location where I;ve copied the installme.sh script to on my NAS share.
6) Change the permissions on the install file - "chmod 777 /mnt/media/install/installme.sh"
7) Run the installme.sh. "./installme.sh"
8) Connect to the LMS using the 192.168.1.95:9000 address. (If successful of course!)
 

Schodoodles

Cadet
Joined
Dec 16, 2014
Messages
4
Hi,

Quick update; looks like I may have managed to get things working (still scanning I think as the logs show nothing but some tracks have appeared) but I had to upgrade the package to 7.9 and then edit the script to use it rather than download it.
I also had to comment out line 69 after an error. I ended up just deleting the /usr/local/lms directory a few times as well but worked in the end.

The new instructions for any other noobs like me using FreeNas 9.2.1.9 and LMS 7.9; you need 7ZIP to sort the repack out as well.

1) Create a jail. I called mine LMS and set the IP to 192.168.1.95.
2) Open the shell via FreeNas and run "pkg update -f && pkg upgrade". This is needed or the end install will fail.
3) Use the mkdir commands to create media folders under /mnt/ for my Music & playlists. e.g. "mkdir /mnt/music", "mkdir /mnt/playlists". Any location can be used but this makes sense to me.
4) Map the folders under FreeNAS to your local NAS share where these are located.
5) Download the LMS 7.9 package from the nightlys folder; http://downloads.slimdevices.com/nightly/index.php?ver=7.9 - you want to download the file called "logitechmediaserver-7.9.0-1418370781.tgz"
6) Download DJoole's original package from this thread. (Thanks BTW!). And download a copy of the installme.sh script too. I put these in my playlist folder but feel free to map these to a different one.
7) Rename the LMS 7.9 tgz to "lms.tgz".
8) Open the "lms-freenas-amd64.tgz" you downloaded from DJoole's server using 7ZIP and then open the "lms-freenas-amd64.tar" inside this. Then once this is open, open the folder in here called "lms-freenas-amd64".
9) Copy your newly named LMS 7.9 file into this zZIP archive folder and over write the existing. Confirm any prompts.
10) Open the LMS 7.9 file outside of 7ZIP and copy the name of the folder you see here; this should be "logitechmediaserver-7.9.0-1418370781" or was for the nightly I downloaded.
11) Back in the 7ZIP archive; RH-Click the file called "VERSION" and select edit. Paste this new folder name over the top of the one here. Save this.
12) Now start exiting the 7ZIP by pressing the button under the plus to go up a folder. This then allows you to save any changes. I made sure I was back at the root folder where this was created to be sure.
13) Open the installme.sh file in a good text editor; I used Notepad++.
14) Edit the '# we need the latest package to install it' section and replace the wget with a copy command instead using your mapped folders. I changed it to this; "cp /mnt/playlists/lms-freenas-amd64.tgz /usr/local"
15) Now edit line 69 and comment this out; I got an error on install but maybe due to my retries. It should look like this; "#mv /usr/local/lms/CPAN/Compress/Raw/Zlib.pm /usr/local/lms/CPAN/Compress/Raw/Zlib.pm.old"
16) Save the file.
17) Copy the installme.sh file to the root using the command "cp /mnt/playlists/installme.sh /" - change depending where you have the files.
18) Change the permissions on the install file - "chmod 777 /installme.sh"
19) Run the installme.sh. "./installme.sh"
20) Connect to the LMS using the 192.168.1.95:9000 address.

Happy to provide an upload or pass on the files as well if it helps.
Thanks,
John
 
Last edited:
Status
Not open for further replies.
Top