LogitechMediaServer (LMS) on FreeNAS

make-nz

Dabbler
Joined
Apr 5, 2016
Messages
20
@Simone

Thanks for all the work!

Now, how are we supposed update LMS versions?
Do we need to uninstall the current version first and run the installer again to install the new version?

Pleas enlighten us ;-)

Also, in a fresh jail(clone) it does not work for me getting LMS 8 running…
Code:
Logitech Media Server Version: 7.9.4 - 1598243812 @ audiodigitale.eu 31-08-2020
FreeBSD LMS 11.3-RELEASE-p11
This is perl 5, version 30, subversion 3 (v5.30.3)


There is this on error:
Code:
===> Downloading the latest version of Logitechmediaserver...
usr/local/share/logitechmediaserver/Firmware/boom_30.bin: truncated bzip2 input
tar: Error exit delayed from previous errors.


Installing version: 8.0.0

===> Installing dependencies...

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking integrity... done (0 conflicting)
The most recent versions of packages are already installed

===> Adding slimserv user and group...
pw: group name `slimserv' already exists
pw: login name `slimserv' already exists

===> Creating Logitech Media Server folders...
mkdir: /var/log/logitechmediaserver: File exists

===> Fixing permissions...

===> Downloading the latest version of Logitechmediaserver...
usr/local/share/logitechmediaserver/Firmware/boom_30.bin: truncated bzip2 input
tar: Error exit delayed from previous errors.

===> Setting up folder permissions...

Do you want to start Logitech Media Server at boot? (0 = no; 1 = yes)?
1


########################################################
Logitech Media Server is installed, if you find any bug or something is not working as it should please contact me at https://audiodigitale.eu
########################################################

Tried 3-4 times, but LMS 8 will not come up

Now it's stuck at Downloading -- again a fresh Jail(Clone)
root@LMS8:~ # pkg update
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:11:amd64/quarterly, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[LMS8] Installing pkg-1.14.6...
[LMS8] Extracting pkg-1.14.6: 100%
Updating FreeBSD repository catalogue...
[LMS8] Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
[LMS8] Fetching packagesite.txz: 100% 6 MiB 3.3MB/s 00:02
Processing entries: 100%
FreeBSD repository update completed. 32054 packages processed.
All repositories are up to date.
root@LMS8:~ # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Updating database digests format: 100%
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
root@LMS8:~ # pkg install curl
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 3 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
ca_root_nss: 3.56
curl: 7.72.0
libnghttp2: 1.41.0

Number of packages to be installed: 3

The process will require 5 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
[LMS8] [1/3] Fetching curl-7.72.0.txz: 100% 1 MiB 1.4MB/s 00:01
[LMS8] [2/3] Fetching libnghttp2-1.41.0.txz: 100% 116 KiB 118.4kB/s 00:01
[LMS8] [3/3] Fetching ca_root_nss-3.56.txz: 100% 285 KiB 291.6kB/s 00:01
Checking integrity... done (0 conflicting)
[LMS8] [1/3] Installing libnghttp2-1.41.0...
[LMS8] [1/3] Extracting libnghttp2-1.41.0: 100%
[LMS8] [2/3] Installing ca_root_nss-3.56...
[LMS8] [2/3] Extracting ca_root_nss-3.56: 100%
[LMS8] [3/3] Installing curl-7.72.0...
[LMS8] [3/3] Extracting curl-7.72.0: 100%
=====
Message from ca_root_nss-3.56:

--
FreeBSD does not, and can not warrant that the certification authorities
whose certificates are included in this package have in any way been
audited for trustworthiness or RFC 3647 compliance.

Assessment and verification of trust is the complete responsibility of the
system administrator.


This package installs symlinks to support root certificates discovery by
default for software that uses OpenSSL.

This enables SSL Certificate Verification by client software without manual
intervention.

If you prefer to do this manually, replace the following symlinks with
either an empty file or your site-local certificate bundle.

* /etc/ssl/cert.pem
* /usr/local/etc/ssl/cert.pem
* /usr/local/openssl/cert.pem
root@LMS8:~ # curl -A "audiodigitale" -o /usr/local/bin/lms_installer https://audiodigitale.eu/repo/freebsd/lms_installe r
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 7559k 100 7559k 0 0 2668k 0 0:00:02 0:00:02 --:--:-- 2668k
root@LMS8:~ # chmod +x /usr/local/bin/lms_installer
root@LMS8:~ # lms_installer
Logitech Media Server installation manager

What do you want to do?
1. Install Logitech Media Server
2. Uninstall Logitech Media Server
3. Check for updates
4. Exit
3

===> Checking installer updates ...

It seems that the version file is missing or corrupted; downloading the latest version...
override rwxr-xr-x root/wheel uarch for /usr/local/bin/lms_installer?
rm: /usr/local/etc/lms_installer/installer_version: No such file or directory

===>Updated successfully!<===
Restart lms_installer please!


root@LMS8:~ # lms_installer
Logitech Media Server installation manager

What do you want to do?
1. Install Logitech Media Server
2. Uninstall Logitech Media Server
3. Check for updates
4. Exit
1

Available versions:
1- Logitech Media Server 7.9.3
2- Logitech Media Server 8.0.0
2

Installing version: 8.0.0

===> Installing dependencies...

Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 8 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
libiconv: 1.16
libogg: 1.3.4,4
p5-IO-Socket-INET6: 2.72_1
p5-IO-Socket-SSL: 2.068
p5-Mozilla-CA: 20180117
p5-Net-SSLeay: 1.88
p5-Socket6: 0.29
perl5: 5.30.3

Number of packages to be installed: 8

The process will require 63 MiB more space.
16 MiB to be downloaded.

Proceed with this action? [y/N]: y
[LMS8] [1/8] Fetching p5-IO-Socket-SSL-2.068.txz: 100% 170 KiB 174.5kB/s 00:01
[LMS8] [2/8] Fetching perl5-5.30.3.txz: 100% 14 MiB 2.5MB/s 00:06
[LMS8] [3/8] Fetching libogg-1.3.4,4.txz: 100% 192 KiB 196.9kB/s 00:01
[LMS8] [4/8] Fetching libiconv-1.16.txz: 100% 610 KiB 624.6kB/s 00:01
[LMS8] [5/8] Fetching p5-Mozilla-CA-20180117.txz: 100% 132 KiB 135.3kB/s 00:01
[LMS8] [6/8] Fetching p5-Net-SSLeay-1.88.txz: 100% 265 KiB 271.7kB/s 00:01
[LMS8] [7/8] Fetching p5-IO-Socket-INET6-2.72_1.txz: 100% 13 KiB 13.1kB/s 00:01
[LMS8] [8/8] Fetching p5-Socket6-0.29.txz: 100% 17 KiB 16.9kB/s 00:01
Checking integrity... done (0 conflicting)
[LMS8] [1/8] Installing perl5-5.30.3...
[LMS8] [1/8] Extracting perl5-5.30.3: 100%
[LMS8] [2/8] Installing p5-Socket6-0.29...
[LMS8] [2/8] Extracting p5-Socket6-0.29: 100%
[LMS8] [3/8] Installing p5-Mozilla-CA-20180117...
[LMS8] [3/8] Extracting p5-Mozilla-CA-20180117: 100%
[LMS8] [4/8] Installing p5-Net-SSLeay-1.88...
[LMS8] [4/8] Extracting p5-Net-SSLeay-1.88: 100%
[LMS8] [5/8] Installing p5-IO-Socket-INET6-2.72_1...
[LMS8] [5/8] Extracting p5-IO-Socket-INET6-2.72_1: 100%
[LMS8] [6/8] Installing p5-IO-Socket-SSL-2.068...
[LMS8] [6/8] Extracting p5-IO-Socket-SSL-2.068: 100%
[LMS8] [7/8] Installing libogg-1.3.4,4...
[LMS8] [7/8] Extracting libogg-1.3.4,4: 100%
[LMS8] [8/8] Installing libiconv-1.16...
[LMS8] [8/8] Extracting libiconv-1.16: 100%
=====
Message from perl5-5.30.3:

--
The /usr/bin/perl symlink has been removed starting with Perl 5.20.
For shebangs, you should either use:

#!/usr/local/bin/perl

or

#!/usr/bin/env perl

The first one will only work if you have a /usr/local/bin/perl,
the second will work as long as perl is in PATH.

===> Adding slimserv user and group...

===> Creating Logitech Media Server folders...

===> Fixing permissions...

===> Downloading the latest version of Logitechmediaserver...

Cheers
Matt
 
Last edited:

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
@Simone

Thanks for all the work!

Now, how are we supposed update LMS versions?
Do we need to uninstall the current version first and run the installer again to install the new version?

Pleas enlighten us ;-)

Also, in a fresh jail(clone) it does not work for me getting LMS 8 running…
Code:
Logitech Media Server Version: 7.9.4 - 1598243812 @ audiodigitale.eu 31-08-2020
FreeBSD LMS 11.3-RELEASE-p11
This is perl 5, version 30, subversion 3 (v5.30.3)


There is this on error:
Code:
===> Downloading the latest version of Logitechmediaserver...
usr/local/share/logitechmediaserver/Firmware/boom_30.bin: truncated bzip2 input
tar: Error exit delayed from previous errors.




Tried 3-4 times, but LMS 8 will not come up

Now it's stuck at Downloading -- again a fresh Jail(Clone)


Cheers
Matt

It depends what you mean by updating. If you mean switching from 7.9.3 to 8.0.0 then yes, uninstall and install 8.0.0. If you want to update the version you've install then start lms_installer and select "Check for updates". The first time you check it's possible you'll have to check again since the installer itself will be updated.

About the error: there's a slightly possibility that you have installed while I was pushing the update today, in this case it's possible that the downloaded file could be corrupted. I've just test the installation for both 8.0.0 and 7.9 and the extraction has no problem. There's also a possibility that your internet connection has packet loss or very slow speed since you say that it's stuck at Downloading. (I've just tried a speedtest on the server where I host the files and it's over 300mbit/s, so I think it's not a server connection problem). Could you please try again?
 

make-nz

Dabbler
Joined
Apr 5, 2016
Messages
20
Thanks, it must have been bad timing with your update push… I got LMS 8 up and running now.

As for 7.x vs. 8.x, it seemed to me, version LMS-8 is continuation of LMS-7 — and as such simply the current LMS and not a entirely new branch.
So a Check for updates on a 7.9x should give me 8.0.0 right now, I thougt and just update, so I don't have to reindex…

On github it has been switched to the new default of Logitech /slimserver
Code:
Default branch

    public/8.0
    Updated yesterday by mherger
    Default 
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
Thanks, it must have been bad timing with your update push… I got LMS 8 up and running now.

As for 7.x vs. 8.x, it seemed to me, version LMS-8 is continuation of LMS-7 — and as such simply the current LMS and not a entirely new branch.
So a Check for updates on a 7.9x should give me 8.0.0 right now, I thougt and just update, so I don't have to reindex…

On github it has been switched to the new default of Logitech /slimserver
Code:
Default branch

    public/8.0
    Updated yesterday by mherger
    Default 

As I thought It was Just bad timing
7.9(.4) Is the stable branch
8.0 Is the development branch where all new features are added.
That's why I kept them separate, 7.9 has still commits and updates (only bugfix, no new features)
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@SimoneF Your work makes installing LMS in a jail so simple. Many thanks.
 

KrisBee

Wizard
Joined
Mar 20, 2017
Messages
1,288
@SimoneF I noticed your installer appears to create the "silmserv" user with a home and login rather than treat it as a system type user with no home and no login.
Code:
slimserv:*:104:104:Slim:/home/slimserv:/bin/sh

I expected:
Code:
slimserv:*:104:104:Slim Devices SlimServer pseudo-user:/nonexistent:/usr/sbin/nologin
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
@SimoneF I noticed your installer appears to create the "silmserv" user with a home and login rather than treat it as a system type user with no home and no login.
Code:
slimserv:*:104:104:Slim:/home/slimserv:/bin/sh

I expected:
Code:
slimserv:*:104:104:Slim Devices SlimServer pseudo-user:/nonexistent:/usr/sbin/nologin
Oops, while in practice there would be no differences the correct approach is the one you suggested. I Will edit and update the installer. Thanks a lot
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
The new perl update to 5.32 broke everything again.
Since this is not the first time that a Perl update break LMS I decided to:
- Not follow official CPAN per modules on slimserver-vendor github. Most of the modules are SEVERELY outdated (some of them by more than 10 years). I updated them all, with a lot of troubleshooting but I managed to succeed.
- Ship with the LMS installation a portable Perl installation which will be used exclusively my LMS itself, it won't interfere with the system perl whatsoever. In this way the perl version installed on the system cannot break anymore LMS.

And:
- Dropped support for FreeBSD 11 and older. Finally it has been a while since FreeNAS (finally!) has decided to switch to 12. I have no reason to support an old verson.
- Dropped support for lms 7.9.3. Now 8.0.0 is more than stable. No need to maintain two versions.

The update is online. Both the installer and lms will be updated.
 

make-nz

Dabbler
Joined
Apr 5, 2016
Messages
20
Hi Simone
Is there any chance you could include the actual Logitech Media Server version numbers in the update check output?

===> Checking Logitech Media Server updates ...

Current logitechmediaserver version: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">. No updates available!
 

make-nz

Dabbler
Joined
Apr 5, 2016
Messages
20
How are we restarting the server now, please?

root@LMS8:~ # service logitechmediaserver restart
/usr/local/etc/rc.d/logitechmediaserver: WARNING: $command_interpreter /usr/local/lms-perl/bin/perl != perl
/usr/local/etc/rc.d/logitechmediaserver: WARNING: $command_interpreter /usr/local/lms-perl/bin/perl != perl
Stopping logitechmediaserver.
Waiting for PIDS: 2541.
Starting logitechmediaserver.
env: perl: No such file or directory
/usr/local/etc/rc.d/logitechmediaserver: WARNING: failed to start logitechmediaserver
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
How are we restarting the server now, please?
This seems to be a dirty installation.
Could you please check that /usr/local/etc/rc.d/logitechmediaserver contains "command_interpreter=/usr/local/lms-perl/bin/perl"
and that /usr/local/share/logitechmediaserver/slimserver.pl starts with "#!/usr/local/lms-perl/bin/perl"

I assume you've already uninstalled and reinstalled
 

make-nz

Dabbler
Joined
Apr 5, 2016
Messages
20
I assume you've already uninstalled and reinstalled
Yes, the above was the result of it.

And sorry, I went back to a snapshot, as LMS just woud not come back to life.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
Yes, the above was the result of it.

And sorry, I went back to a snapshot, as LMS just woud not come back to life.

Ok I find out why you got that error. It is a bug of the previous version of the installer.
To solve it (this is for everyone who wants to update):
1- Uninstall LMS from lms_installer
2- remove "/usr/local/etc/lms_installer/version"
3- Open lms_installer and select "check for updates" to let him update itself
4- Install LMS

---------------------------------------------------------------------------------------------------

BTW if anyone might be interested I'm working on an extension for LMS (not really a plugin) that let you upsample (to DSD too) and apply convolution filters for EQ or Room correction (for each channel). A sort of C-3PO plugin but on steroids :)
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
Update to 8.2.0 available (it still will be listed as 8.0.0 in the installer)
chrome_yDzlUV58xj.png
 
Last edited:
Joined
Apr 16, 2016
Messages
18
And:
- Dropped support for FreeBSD 11 and older. Finally it has been a while since FreeNAS (finally!) has decided to switch to 12. I have no reason to support an old verson.
- Dropped support for lms 7.9.3. Now 8.0.0 is more than stable. No need to maintain two versions.
oh. you are forcing me to upgrade to FreeBSD 12. I just upgraded from from 9 to 11.3 and had to redo all my jails. Besides that, I appreciate all the work you have put into this.
 

SimoneF

Explorer
Joined
Feb 9, 2019
Messages
59
There's a memory leak if lms is transcoding a stream.
The consequence is that after some hours/days LMS will saturate the ram and the process will be killed.
I'm trying to solve this bug with the main maintainer of LMS, I though to have found a solution but I was wrong, so there's no ETA.
If you are experiencing this bug the only "solution" for the moment is to create a crontab that restarts LMS.
As an example (as root):

Code:
crontab -e


and then write

Code:
0 3 * * * service logitechmediaserver restart

to restart it at 3AM every day.

or
Code:
@daily service logitechmediaserver restart

to restart it every day

or

Code:
 @hourly service logitechmediaserver restart

to restart it every hour.
 

rmccullough

Patron
Joined
May 17, 2018
Messages
269
oh. you are forcing me to upgrade to FreeBSD 12. I just upgraded from from 9 to 11.3 and had to redo all my jails. Besides that, I appreciate all the work you have put into this.

I have the same problem. Perl update broke LMS, went to try and use lms_installer to update, and found out my OS is no longer supported. Wasn't planning to update, but maybe this is a good "push" to do so...
 
Top