SOLVED: volumio & Logitech Media Server on RasPi parallel

Hello,

I had reported in the Squeezebox forum that I gave up to operate Logitech Media Server (LMS) on a MyBook Live Duo and instead moved with it to a Raspberry Pi with a already installed volumio.

Unfortunately my enthusiasm was rash.

System:
A) Raspberry Pi 1 Model B + with 8 GB SD
B) volumio 2.141 runs stable
C) NAS WD MyBook Live Duo with 4 GB Raid1 neatly mounted
D) 66K plus x music files on NAS

Findings:

  1. The installation of the LMS 7.9.0 was easy and the volumio instance showed no interdependencies
  2. LMS was running likewise stable
  3. The media scan in LMS, which drove me crazy on the MBDL, ran successfully and initially took about 8h
  4. some additional scans - manual started - done a good job

Everything looked fine - so far so good…

Then a reboot was required (reducing the amount of plugins in LMS).
volumio came back as exspected and without any faults. But…
… I could no longer reach LMS via port 9000. So no Web-UI - no connection of my Squeezebox Radio to this dedicated server!

I have since completely reinstalled LMS several times and tried out various hints from the www - but always it ends with the described behavior:
After a restart of the RasbPi, the port 9000 is no longer active.

The LM server is definitely running (ps aux | grep squeeze), but the port 9000 is “dead” (netstat)
All attempts with tips on similar constellation do not lead to success.

Yes fourtunatly - I could install LMS on a RasbPi of it´s own - but I like the idea to use sytems (like the MBLD or RasbPi) which are already in service.
Any help is appreciated!

Regards

Black Senator

Since no one has answered here, I have helped myself.

To solve the problem, I thought it would be useful to have an installation on RasbPi without Volumio - for comparison.

I still had a RasbPi in stock and therefore simply installed the current version Rasbian. After the necessary basic configuration (language, time, memory usage, keyboard and fixed IP) I installed LMS 7.9.0 and …
it runs stable and clean.
After some attempts I have also integrated my music library on the NAS via mount e.g. fstab entry and an additional cache directory on the NAS with. The LMS music database moves to this cache next, so that read / write operations on the SD card remain as low as possible.

Thus, I have created a reference system and can now compare this to the corrupt LMS installation on Volumio-Distro.

I would be very helpfull if someone of the experts here give me some hints what volumio is doing via (re)start/reboot that killed a befor stable installed LMS instance.

Regards

Black Senator

I am not LMS expert at all.
My guess is this:
LMS start BEFORE network is initialized by Volumio, therefore it will not be reachable from the outside.

To confirm this, after Volumio has started, just restart LMS and see if that works.

From there, we will see how to fix it

Dear Michelangelo,

thanks very much for reply and suggestions. But …

… I tried to restart/reboot des LMS Server “a hundred times” but it´s not starting again.

As I wrote before:

  1. The installation of the LMS 7.9.0 shows no interdependencies to the volumio instance (and initially vice versa)
  2. LMS was running stable after installation and was scaning my media initially (after that even some additional scans - manual started - done a good job)
  3. Then a reboot was required
  4. volumio came back stable and shows no interdependecies, but …
  5. I could no longer reach the LMS (via port 9000). So no Web-UI and no connection of my Squeezebox Radio to this dedicated server as befor!
  6. The LM server is definitely running (check via: ps aux | grep squeeze), but the port 9000 is “dead” (check via: netstat -> shows no activ port 900* any more)

I have since completely reinstalled LMS several times and tried out various hints from the www - but always it ends with the described behavior:
After a restart/reboot of the RasbPi, the LMS e.g. port 9000 is no longer active.

So my only conclusion is: after a reboot/restart of the device, the volumio instance is changing something during starting procedure, what kills/corrupt the LMS.

I´m at my wits end :frowning:

Regards

Black Senator

Dear all!

isn´t there anybody how has the same configuration and/or problem? Or someone how can give a hint.

The described problem still exists. I have now made the update on 2.185 and installed the Logitech Media Server (LMS) again several times. After a reboot/restart of the system (Raspi), LMS does not start anymore.

As long as I do not reboot/restart volumio I can switch off LMS and on again

sudo service logitechmediaservice stop sudo service logitechmediaservice start
and everything is still fine…

After one of the installations I have saved all directories of the LMS installation*. After a reboot and usual fail of LMS I copied them one by one back to the original places, to find out where the reboot has made a change. But with no success! LMS did not start.
If I instead install LMS (over the corrupt version) it came back to life - until the next reboot…

I would be very happy if someone “with enough light on the bike” could help me!

Regards

Black Senator

/etc/squeezeboxserver
/usr/share/squeezeboxserver
/usr/share/perl5/Slim
/var/lib/squeezeboxserver

I’m sorry that you are having problems, but people (on the forum) are not familiar with the operation of LMS. This is always a potential problem when using unsupported software alongside Volumio. Perhaps you could ask on their forums? Please do report back if you manage to solve it.

Hi,

I just successfully installed Logitech Media Server on my Volumio Raspberry Pi, so thought I’d update this thread.

The basic problem I believe you’re having is nothing to do with ports, but rather that LMS will fail to start if it cannot open its log files at startup. It uses the location /var/log/squeezeboxserver which is a directory created at installation time. Unfortunately on Raspbian this directory is in a temporary in-memory space (to save wear and tear on your sd card) so is wiped out after each reboot. To fix this we need to tell raspbian to re-create the directory after each reboot.

Here’s the whole process to install Logitech Media Server (since this page is the first link that popped up when I googled for “Install Logitech Media Server on Volumio”

Log into the command prompt on your volumio box. Then type the following (pressing enter at the end of each line):

(this first bit is taken form Logitechs own info page: http://wiki.slimdevices.com/index.php/Debian_Package#installing_7.9.0)

url="http://www.mysqueezebox.com/update/?version=7.9.0&revision=1&geturl=1&os=deb"
latest_lms=$(wget -q -O - "$url")
mkdir -p /sources
cd /sources
wget $latest_lms
lms_deb=${latest_lms##*/}
sudo dpkg -i $lms_deb

That’s the server installed, and it should be running fine if you point your browser at http://volumio:9000 (this may not be the correct address for your own server)

Next we need to re-create the temp directory each time:

sudo nano /etc/rc.local

Now insert the next three lines just before the ‘exit 0’ line

mkdir /var/log/squeezeboxserver/
chown squeezeboxserver /var/log/squeezeboxserver/
chmod 775 /var/log/squeezeboxserver/

exit 0

Then press Ctrl+X, and Y to save.

sudo reboot

Once the system is back up Logitech Media Server should start normally. There may be a more correct way to re-create this directory, but this works for me.

Hope that helps!
Karl.

Karl,

thanks a lot! That is the solution!
I am very happy that after so many months someone has found this old thread and then unexpectedly knows the right solution.
You are the brightest candle in the chandelier!

Best regards

Black Senator

A more elegant way would be to add the log folder creation to a pre-script in the LMS systemd unit file.
Is there anyone willing to develop an LMS plugin for Volumio? I can assist with this

Having a LMS plugin for Volumio would be a MASSIVE plus, and resolving one of Volumio biggest “missing” feature.

Sadly its beyond my scope of expertise…

I can try setting up an initial version, see where it gets us. I’m not a developer though, meaning I have no experience determining and following design patterns :wink:

But I think I can get it to work, it doesn’t look like too much hassle at first sight.

I presume a squeezelite player would be required too at some point?

Well done for stepping up to the mark Saiyato, it doesn’t sound a difficult job, and one of these days I really will try to produce a plugin. For me, it is just the initial hassle of sorting out in my mind, the logic behind it. Qudos to you … the more plugins, the more versatile this project becomes.

No readme available for now, but the package works. I think it’s a full working BETA.

I do need to investigate some CPAN stuff… but that’s improvement work.

Here’s the Github repo and the package

Official release is ready for testing, zip-file has been updated in the repo

Hey there,

just registered for this topic because I tangle with the idea of letting a LMS server run parallel to volumio instance for soundcloud integration.
On my way with volumio I found several plugins put together by chsims1 in march this year.
In there is a LMS plugin created by another user - maybe you want to check that.
Here’s the link: volumio-plugins-collection-t6251.html

Have not give it a try yet, because of other projects. But I would like a reply if it actual works and you are faster the me with setting it up.

cheers

edit: overlooked the page:2 … nice to be here anyway. hello to you :wink:

I tried it out - with no success! Installation run quit well - but after that, there was no way to enter the LMS-site for settings…
I tried it in with two ways:

  1. with an already LMS installation in parallel running (plugin killed that!)
  2. fresh from the scratch with a new volumio installation

Both ways showed the same behavior: a klick on “settings” ended in an eternal loop on screen…

Some more information about requirements and dependencies would be helpfull.

Regards

Black Senator

I’m going to need some more info, what dependencies are you talking about?

Node JS dependencies can be found in the package.json:

"dependencies": { "balanced-match": "^0.4.2", "brace-expansion": "^1.1.6", "concat-map": "^0.0.1", "fs-extra": "^0.28.0", "fs.realpath": "^1.0.0", "glob": "^7.1.0", "graceful-fs": "^4.1.9", "inflight": "^1.0.5", "inherits": "^2.0.3", "ip": "^1.1.5", "jsonfile": "^2.3.1", "kew": "^0.7.0", "klaw": "^1.3.0", "minimatch": "^3.0.3", "multimap": "^1.0.1", "once": "^1.4.0", "path-is-absolute": "^1.0.1", "rimraf": "^2.5.4", "v-conf": "^0.10.0", "wireless-tools": "^0.19.0", "wrappy": "^1.0.2" }

Package dependencies in the install.sh:

[code]# Install package and dependencies
echo “Installing downloaded package”
for f in /home/volumio/logitechmediaserver/logitechmediaserver*.deb; do dpkg -i “$f”; done
apt-get -f install

Needed for SSL connections; e.g. github

apt-get install libio-socket-ssl-perl lame unzip -y[/code]

I’m not sure what you are expecting from me, it’s all documented really.

Can you share some more info so I can help?

  1. What platform are you using?
  2. What version of Volumio are you using?
  3. What does the log say? The below should follow the journal and show you the error
sudo journalctl -f
  1. What does the squeezeboxserver log say?

Does it still fail to start after reboot? Not sure why yet, but sometimes this is needed.

UPDATE 2017-09-18@20:23: the reboot is no longer required, I added a reload of the systemd unit in the install script, this should solve the first start without a reboot.

hello, I would like to update LMS 7.9.0 to 7.9.1. I try to download the latest version and install it via SSH but I can not connect to it after that.
do you know how I can do it?
thank you

Can you write up, step by step, what you did and what you expect to happen?
The plugin install script does some automated stuff, so I need to know exactly what you changed in order to help you.

Hello,
I wrote via Putty in SHH:
wget downloads.slimdevices.com/nightl … 85_arm.deb
and:
sudo dpkg -i logitechmediaserver_7.9.1~1489743085_arm.deb

I unfortunately no more the hystorque of what was done nor the log, but the installation went well.
On the other hand, more access to LMS via the IPlocal: 9000.