sonyhome
Dabbler
- Joined
- Mar 23, 2023
- Messages
- 14
[EDIT] See post #8 for full recipe, posts #1~#7 might have more details on questions you may have if you hit issues.
I am a noob to TrueNAS.
I tried to install LMS as a plugin and it failed with the following error messages flashing in popup windows, telling me either the tar file couldn't be fetched anymore or it's not a tar file being fetched, but the scripts are broken:
So plan B: A more manual install using a recipe that works. I had to dig around and follow a few dead ends so my contribution is to say this works in 2023:
Follow these old instructions from a FreeNAS 2018 post response from alwu:
Details:
1- I created it via the web UI jail menu, add button.
2- Mount your dataset to /media for example
3- I just used the web UI jail's shell to run the commands, instead of step 3,4,5 and it works
13- I used vi to do this but just make sure there's no spaces around = and double quotes for YES.
11- Note that this method is pretty long. Portmaster fetches all dependencies and compiles LMS. It did however build the latest LMS for me! The install is interactive with menus at the beginning, and at the end before exiting. I think most menus you can press enter and go. I disabled a bunch of unecessary builds like documentation.
14- I had to reboot the jail to see the LMS web UI appear (on port 9000). This step triggered an error about a missing input parameter deep in a CPAN/YAML method. When it works this step only prints a 3-4 line message.
LMS ports are:
TCP 9000 web UI (can be 9001 on QNAS, may conflict with Twonky)
TCP 9090 command line interface (used by some apps, I think you can telnet to it)
TCP 3484 on squeezebox clients
TCP 31337 squeezebox firmware updates from logitech (obsolete)
The LMS service is installed in
15- Go onto the LMS web page on port 9000, for example if your TrueNAS server IP is *123, in your web browser just go to: 16- Go to the Settings/Basic Setting menu and set the media folder (/media for example) and apply.
Where I got stuck:
For me LMS refused to see my mp3's and directories, because of file access rights, so you need to do some admin work.
Solution A:
The media in my storage pool is owner by me (uid 1000) and in the wheel group, and no read rights for others. My account being in wheel is likely a bad idea but it's too late, and not the point here. Notice the "---": I gave no read rights to other users hence my troubles.
Solution B:
Change the service script file uid:gid:
Solution C:
(I didn't try that)
Go to Jails, your LMS jail, mount points, your music dataset, edit ACL.
Change the ACL for the dataset containing all your music so that the everyone@ rights to allow read, and in Advanced click "Apply permissions recursively" which will I believe modify all the directory rights in the dataset. That means a lot of writes to disk, not just a TrueNAS config change, and not just the access rights of the mount point of the dataset.
So... I kinda had to help myself solve my own issues, and that's why this post is here. :) Hopefully it's mostly correct. I have been using TrueNAS for 3 days mostly banging my head to figure out how things work. It's far from plug and play.
Next one will be an Apache server, and the FAMP plugin doesn't work because it tries to install a package that's obsolete in 2023. :) Like/Watch/Comment if you liked this post... Oh wait it's not Youtube!
I am a noob to TrueNAS.
I tried to install LMS as a plugin and it failed with the following error messages flashing in popup windows, telling me either the tar file couldn't be fetched anymore or it's not a tar file being fetched, but the scripts are broken:
Then saw some posts saying I should avoid plugins.downloading the latest stable version of LMS
tar: error opening archive: unrecognized archive type
Error: slimserver had a failure Exception: RuntimeError Message: Last 10 lines: tar: Error opening archive: Unrecognized archive format Partial plugin destroyed
CLOSE
So plan B: A more manual install using a recipe that works. I had to dig around and follow a few dead ends so my contribution is to say this works in 2023:
Follow these old instructions from a FreeNAS 2018 post response from alwu:
- create a lms jail via the gui.
- add your music dataset as storage
ssh into the freenas server.use jls to find the jail number for logitechmediaserver_1.jexec <lms jail number> tcsh- pkg update
- pkg upgrade
- pkg install portmaster
- portsnap fetch extract
- setenv ALLOW_UNSUPPORTED_SYSTEM 1
- portmaster audio/logitechmediaserver
- selected flac and lame support on the first screen and disabled tests. kept the defaults for the remaining screens.
- echo 'logitechmediaserver_enable="YES"' >> /etc/rc.conf
- service logitechmediaserver start
Details:
1- I created it via the web UI jail menu, add button.
2- Mount your dataset to /media for example
3- I just used the web UI jail's shell to run the commands, instead of step 3,4,5 and it works
13- I used vi to do this but just make sure there's no spaces around = and double quotes for YES.
11- Note that this method is pretty long. Portmaster fetches all dependencies and compiles LMS. It did however build the latest LMS for me! The install is interactive with menus at the beginning, and at the end before exiting. I think most menus you can press enter and go. I disabled a bunch of unecessary builds like documentation.
14- I had to reboot the jail to see the LMS web UI appear (on port 9000). This step triggered an error about a missing input parameter deep in a CPAN/YAML method. When it works this step only prints a 3-4 line message.
LMS ports are:
TCP 9000 web UI (can be 9001 on QNAS, may conflict with Twonky)
TCP 9090 command line interface (used by some apps, I think you can telnet to it)
TCP 3484 on squeezebox clients
TCP 31337 squeezebox firmware updates from logitech (obsolete)
The LMS service is installed in
/usr/local/etc/rc.d/logitechmediaserver
15- Go onto the LMS web page on port 9000, for example if your TrueNAS server IP is *123, in your web browser just go to: 16- Go to the Settings/Basic Setting menu and set the media folder (/media for example) and apply.
Where I got stuck:
For me LMS refused to see my mp3's and directories, because of file access rights, so you need to do some admin work.
Solution A:
The media in my storage pool is owner by me (uid 1000) and in the wheel group, and no read rights for others. My account being in wheel is likely a bad idea but it's too late, and not the point here. Notice the "---": I gave no read rights to other users hence my troubles.
I found out LMS runs as user slimserv (uid 104):ls -l /media
drwxrwx---+ 12 me wheel 12 Mar 22 11:09 Classical
drwxrwx---+ 11 me wheel 11 Mar 22 11:43 EDM
It is in its own group and that's not wheel so it accesses my files with"other" privileges.ps aux
USER PID %CPU %MEM VSZ RSS TT STAT STARTED TIME COMMAND
root 31315 2.8 0.0 14044 3996 9 SJ 23:29 0:00.01 -csh (csh)
slimserv 29594 0.0 0.8 170268 141004 - SsJ 21:41 0:02.90 /usr/local/bin/
So I add slimserv to the wheel group:pw user show slimserv
slimserv:*:104:104::0:0:Slim Devices SlimServer pseudo-user:/nonexistent:/usr/sbin/nologin
Then I trigger a scan of my mp3's in LMSpw groupmod wheel -m slimserv
pw group show wheel
wheel:*:0:root,slimserv
Solution B:
Change the service script file uid:gid:
Edit the u and a g entries set to slimserv. I changed that to be u=me and g=wheel. Don't use vi if you don't know that editor!service logitechmediaserver stop
vi /usr/local/etc/rc.d/logitechmediaserver
service logitechmediaserver start
Solution C:
(I didn't try that)
Go to Jails, your LMS jail, mount points, your music dataset, edit ACL.
Change the ACL for the dataset containing all your music so that the everyone@ rights to allow read, and in Advanced click "Apply permissions recursively" which will I believe modify all the directory rights in the dataset. That means a lot of writes to disk, not just a TrueNAS config change, and not just the access rights of the mount point of the dataset.
So... I kinda had to help myself solve my own issues, and that's why this post is here. :) Hopefully it's mostly correct. I have been using TrueNAS for 3 days mostly banging my head to figure out how things work. It's far from plug and play.
Next one will be an Apache server, and the FAMP plugin doesn't work because it tries to install a package that's obsolete in 2023. :) Like/Watch/Comment if you liked this post... Oh wait it's not Youtube!
Last edited: