Discussion:
[SlimDevices: Unix] LMS problem on debian jessie
phanter
2017-11-02 17:08:47 UTC
Permalink
Hey there

I having a problem with the logitech media server on my debian
jessie/openmediavault 3.0.90 installation.

I set up a few systems and never had a problem with LMS. But this time
it doesen't want to run.

I installed LMS like described on this page
wiki.slimdevices.com/index.php/DebianPackage
I tried all versions. Everytime, the installation succeds, the server
starts correctly.


Code:
--------------------
~# sudo service logitechmediaserver status
● logitechmediaserver.service - LSB: Startup script for the Logitech Media Server
Loaded: loaded (/etc/init.d/logitechmediaserver)
Active: active (exited) since Do 2017-11-02 17:43:03 CET; 3s ago
Process: 15052 ExecStop=/etc/init.d/logitechmediaserver stop (code=exited, status=0/SUCCESS)
Process: 15088 ExecStart=/etc/init.d/logitechmediaserver start (code=exited, status=0/SUCCESS)

Nov 02 17:43:03 DMW-NAS logitechmediaserver[15088]: Making sure that Logitech Media Server is not running first: Starting Logitech Media Server.
Nov 02 17:43:03 DMW-NAS systemd[1]: Started LSB: Startup script for the Logitech Media Server.
Hint: Some lines were ellipsized, use -l to show in full.
--------------------


But i can't find the server. There is nothing on the port 9000.

Code:
--------------------
netstat -a
--------------------

Netstat also gives me no entry. There is no logitech media server uses
any port.

Do you have any ideas, what the problem could be?
Is there a permission failure?

Any help would be nice :)

Thanks in advance


------------------------------------------------------------------------
phanter's Profile: http://forums.slimdevices.com/member.php?userid=67518
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
Krisbee
2017-11-02 18:58:44 UTC
Permalink
Any one of netstat, ps, top, htop at the CLI should confirm if LMS is
running and on what ports on your system. Jessie/OMV uses systemd so
it's better to use systemctl commands, e.g. systemctl status
logitechmediaserver, systemctl restart logitechmediaserver, etc.
Assuming you have enabled ssh access to Jessie/OMV command line.

In OMV you could also use the webui to look at the running process.
Using "netstat -plant" as root should show a perl program is listening
on 127.0.0.1:9000 in a default LMS setup. Use something like "ps aux |
grep squeeze" to show slimserver.pl is running.


------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
Krisbee
2017-11-04 20:10:55 UTC
Permalink
I have OMV running in Vbox as a test, but cannot reproduce your error.

I downloaded LMS directly


Code:
--------------------

***@omv-vm:/# wget -c http://downloads.slimdevices.com/nightly/7.9/sc/c558cb2/logitechmediaserver_7.9.1~1509357021_amd64.deb

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


last step of script you used is just a "dpkg -i":


Code:
--------------------

***@omv-vm:~# dpkg -i logitechmediaserver_7.9.1~1509357021_amd64.deb

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


LMS seems to install and start normally


Code:
--------------------
***@omv-vm:~# systemctl status logitechmediaserver
● logitechmediaserver.service - LSB: Startup script for the Logitech Media Server
Loaded: loaded (/etc/init.d/logitechmediaserver; generated; vendor preset: enabled)
Active: active (running) since Sat 2017-11-04 19:51:09 GMT; 48s ago
Docs: man:systemd-sysv-generator(8)
CPU: 3ms
CGroup: /system.slice/logitechmediaserver.service
├─4205 /bin/bash /usr/sbin/squeezeboxserver_safe /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezebo
└─4207 /usr/bin/perl /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib

Nov 04 19:51:09 omv-vm systemd[1]: Starting LSB: Startup script for the Logitech Media Server...
Nov 04 19:51:09 omv-vm logitechmediaserver[4199]: Making sure that Logitech Media Server is not running first: No process in pidfile '/var/run/logitechmedias
Nov 04 19:51:09 omv-vm logitechmediaserver[4199]: Starting Logitech Media Server.
Nov 04 19:51:09 omv-vm systemd[1]: Started LSB: Startup script for the Logitech Media Server

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



Code:
--------------------

***@omv-vm:~# netstat -plant | grep perl
tcp 0 0 0.0.0.0:3483 0.0.0.0:* LISTEN 4207/perl
tcp 0 0 0.0.0.0:9090 0.0.0.0:* LISTEN 4207/perl
tcp 0 0 0.0.0.0:9000 0.0.0.0:* LISTEN 4207/perl
tcp 0 0 0.0.0.0:36521 0.0.0.0:* LISTEN 4207/perl

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


I see you have plex running, but I'm not aware that should stop LMS from
working. I'm afraid I don't have any ideas right now. It shouldn't be
necessary, but you can run LMS using docker on OMV with
https://github.com/snoopy86/logitechmediaserver for example.


------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
epoch1970
2017-11-04 20:15:46 UTC
Permalink
Maybe have a look at "journalctl -xl"?
Or see what that logitechmediaserver service unit launches and try it on
the command-line.



3 SB 3 • Libratone Loop, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9
(linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa
• IRBlaster by Gwendesign (Felix) • Server Power Control by Gordon
Harris • Smart Mix, Music Walk With Me, What Was That Tune? by Michael
Herger • PowerSave by Jason Holtzapple • Song Info, Song Lyrics by
Erland Isaksson • AirPlay Bridge by philippe_44 • WeatherTime by Martin
Rehfeld • Auto Dim Display, SaverSwitcher, ContextMenu by Peter Watkins.
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-05 07:49:36 UTC
Permalink
Post by phanter
Hey there
I having a problem with the logitech media server on my debian
jessie/openmediavault 3.0.90 installation.
What exact ISO did you install ?
Debian Jessie or openmediavault 3.0.90 ?

What are the contents of the server.log

Which Perl is installed?

What Architekture ?


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-05 16:26:02 UTC
Permalink
Sqeeueboxserver has no log in his folder (/var/log/squeezeboxserver).
Aaaahh - now we knew what to do....



Code:
--------------------

sudo mkdir /var/log/squeezeboxserver
sudo chown squeezeboxserver:nogroup /var/log/squeezeboxserver

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


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-05 16:40:07 UTC
Permalink
just a Moment...
Sqeeueboxserver has no log in his folder (/var/log/squeezeboxserver).
Has no log - means folder is there but empty or folder not there?

If there is no folder - see my other comment.

If there is a folder - i would ask you to check the permissions

Code:
--------------------
ls -l /var/log/squeezeboxserver
--------------------


If that doesnt match squeezeboxserver nogroup /var/log/squeezeboxserver
then you need only the 2.nd command...


Code:
--------------------

sudo chown squeezeboxserver:nogroup /var/log/squeezeboxserver
--------------------


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
phanter
2017-11-05 18:12:14 UTC
Permalink
@ DJanGo

I set the permisson manually like you described.


Code:
--------------------
sudo chown squeezeboxserver:nogroup /var/log/squeezeboxserver
--------------------


But the process does not write anything in the log.

For now it is very annoying to deal with this strange error. I'm
thinking about to do a clean install. I do not where this failure come
from. In a row of six diffrent installs, two times i got this strange
errors. Four times everything runs without problems. Same system and
same settings.


------------------------------------------------------------------------
phanter's Profile: http://forums.slimdevices.com/member.php?userid=67518
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-05 18:43:04 UTC
Permalink
Post by phanter
@ DJanGo
I set the permisson manually like you described.
Code:
--------------------
Post by phanter
Post by DJanGo
sudo chown squeezeboxserver:nogroup /var/log/squeezeboxserver
--------------------
Post by phanter
-rw-r--r-- 1 squeezeboxserver nogroup
?
Please do a

Code:
--------------------
touch /var/log/squeezeboxserver/server.log
chown -R squeezeboxserver:nogroup /var/log/squeezeboxserver/
--------------------


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
Krisbee
2017-11-06 12:07:13 UTC
Permalink
phanter wrote:
Code:
--------------------
insgesamt 0
-rw-r--r-- 1 squeezeboxserver nogroup 0 Nov 5 20:16 server.log
--------------------
Still no input in the log file, but process "should" be running.
Code:
--------------------
● logitechmediaserver.service - LSB: Startup script for the Logitech Media Server
Loaded: loaded (/etc/init.d/logitechmediaserver)
Active: active (exited) since So 2017-11-05 20:10:55 CET; 6min ago
Process: 14750 ExecStop=/etc/init.d/logitechmediaserver stop (code=exited, status=0/SUCCESS)
Process: 14760 ExecStart=/etc/init.d/logitechmediaserver start (code=exited, status=0/SUCCESS)
Nov 05 20:10:55 DMW-NAS logitechmediaserver[14760]: Making sure that Logitech Media Server is not...r.
Nov 05 20:10:55 DMW-NAS systemd[1]: Started LSB: Startup script for the Logitech Media Server.
Hint: Some lines were ellipsized, use -l to show in full.
--------------------
I suggested starting LMS in debug mode earlier in this thread to see if
it gives any clues as to what is happening on your system. If there was
nothing abnormal in the /etc/apt/ logs ( user squeezeboxserver created,
all requires files installed etc.) then it's not obviously a bad
install.

As root, what happens when you execute this command?


Code:
--------------------

***@omv-vm:~# /usr/sbin/squeezeboxserver --user squeezeboxsever --group nogproup --debug

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


------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
phanter
2017-11-06 16:23:11 UTC
Permalink
Krisbee

Output of the command. Seems to have some problems with the socket and
user:


Code:
--------------------
/usr/sbin/squeezeboxserver --user squeezeboxsever --group nogproup --debug
Async::HTTP: Unable to load IO::Socket::SSL, will try connecting to SSL servers in non-SSL mode
[17-11-06 17:21:05.8619] main::init (387) Starting Logitech Media Server (v7.9.1, 1509357021, Mon Oct 30 10:54:02 UTC 2017) perl 5.020002 - x86_64-linux-gnu-thread-multi
[17-11-06 17:21:05.8669] main::changeEffectiveUserAndGroup (1012) Warning: User squeezeboxsever not found.

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


------------------------------------------------------------------------
phanter's Profile: http://forums.slimdevices.com/member.php?userid=67518
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-06 18:57:12 UTC
Permalink
Post by phanter
Warning: User squeezeboxsever not found.
Really??
User should be squeezeboxse*R*ver.



Code:
--------------------
awk -F: '{ print $1 }' /etc/passwd |grep "squ"

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

Is there a matching user squeezeboxserver ???
Post by phanter
/var/lib/dpkg/info/logitechmediaserver.postinst
If yes - run it as root
Code:
--------------------
sudo /var/lib/dpkg/info/logitechmediaserver.postinst

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


Is there a match in the userlist after you run the postinstaller?


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
DJanGo
2017-11-06 21:44:19 UTC
Permalink
Please take another look at your logfile folder.

Remember i told you to touch a server.log file and chown it to the right
user.

Is this file (compare the output) changed eg timestamp or deleted?

Thing is - if lms want to log something and cannot - it stops.

Whats about installing from scratch with a real debian and add your NAS
solution via apt-get?


------------------------------------------------------------------------
DJanGo's Profile: http://forums.slimdevices.com/member.php?userid=1516
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
Krisbee
2017-11-06 22:36:50 UTC
Permalink
Oh man .... Copy and paste without thinking..
Never thought of that. Yes the user is set correctly.
this is the final output..
Code:
--------------------
/var/lib/dpkg/info# /usr/sbin/squeezeboxserver --user squeezeboxserver --group nogroup --debug
Async::HTTP: Unable to load IO::Socket::SSL, will try connecting to SSL servers in non-SSL mode
[17-11-06 20:07:04.7325] main::init (387) Starting Logitech Media Server (v7.9.1, 1509357021, Mon Oct 30 10:54:02 UTC 2017) perl 5.020002 - x86_64-linux-gnu-thread-multi
[17-11-06 20:07:05.1518] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[17-11-06 20:07:05.2775] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
[17-11-06 20:07:05.6283] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[17-11-06 20:07:05.7695] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
[17-11-06 20:07:06.4962] Slim::Utils::SQLiteHelper::postConnect (374) Optimizing DB because of missing or empty sqlite_stat1 table
[17-11-06 20:07:06.6065] Slim::Schema::forceCommit (2149) Warning: Trying to commit transactions before DB is initialized!
Can't call method "log" on an undefined value at /usr/share/squeezeboxserver/CPAN/Log/Log4perl/Appender.pm line 189.
Can't call method "log" on an undefined value at /usr/share/squeezeboxserver/CPAN/Log/Log4perl/Appender.pm line 189.
--------------------
Apologies for the typo, but now you're getting closer. AFAIK the LMS
package doesn't contain any log files, it just creates a directory for
LMS to use for its logs once it is running.


Code:
--------------------

***@omv-vm:~# dpkg -c logitechmediaserver_7.9.1~1509357021_amd64.deb | grep var
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/log/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/log/squeezeboxserver/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/lib/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/lib/squeezeboxserver/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/lib/squeezeboxserver/prefs/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/lib/squeezeboxserver/cache/
drwxr-xr-x root/root 0 2017-10-30 10:54 ./var/lib/squeezeboxserver/Plugins/
-rw-r--r-- root/root 464 2017-10-30 10:53 ./usr/share/squeezeboxserver/HTML/EN/html/vars.js
lrwxrwxrwx root/root 0 2017-10-30 10:57 ./usr/share/squeezeboxserver/Plugins -> /var/lib/squeezeboxserver/Plugins

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


The install should have created it (/var/log/squeezeboxserver/) with the
correct squeezboxserver:nogroup permissions. Perhaps you've looked
already, but as DJanGo says, LMS needs to write its log files in that
directory as soon as it starts. This should all happen without user
intervention, I would have thought /var/log/squeezeboxserver was the
key directory to check for owner & perms.


------------------------------------------------------------------------
Krisbee's Profile: http://forums.slimdevices.com/member.php?userid=59080
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
phanter
2017-11-12 18:14:52 UTC
Permalink
Big thanks to you guys! @ Krisbee and DJanGo

I did a fresh install. Longest install of my life..
Over ten hours. Fresh install of debian and then OMV. Now it works. But
i hope it was the last time i have to install it.


------------------------------------------------------------------------
phanter's Profile: http://forums.slimdevices.com/member.php?userid=67518
View this thread: http://forums.slimdevices.com/showthread.php?t=108217
Loading...