Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 10 of 10
  1. #1

    Player doesn't reconnect after restarting LMS

    Hello,
    I have a player that fails to connect after an LMS restart.

    I recently built a Linux Mint 19.2 PC and installed LMS 7.9.2 - 1565967976 using the Debian package. There's also this infomation that may be relevant, though it doesn't seem so to me.
    - I'm running Mullvad VPN client with local browse enabled.
    - I've been wrestling with sound since the git-go, and still am. This works for me for now, reliably: After a reboot, force-reload alsa and then start sound-dependent apps.

    I have a minimal setup at the moment; a squeezelite player running as a daemon, and a Boom. Here's the problem.

    I get LMS running and the two players playing. A situation occurs where I need to stop and restart LMS. When I do this, the Boom disappears from the player list. On the Boom there is a message "can't connect", and repeated attempts fail to connect it to LMS. There are no relevant messages in the server log. The Squeezctl app on my phone won't connect either. Disabling VPN on the host has no effect.

    Now the really weird part, to me, is this problem persists through a reboot. Problem occurs, reboot and login, force-reload alsa and start the squeezelite player, and Boom still fails to connect.

    The only thing that has worked is to restore from the last snapshot when this was all working. When I do that the Boom connects and all is well. (I've learned to take frequent snapshots.)

    Edit:
    To be clear, this problem only happens when I run 'sudo service logitechmediaserver stop' and then 'start'. If I add/remove a plugin and let LMS run the restart this probem doesn't happen.

    Any ideas and suggestions would be most welcome.
    Thanks,
    ~dean~
    Last edited by dbinfl; 2019-09-05 at 19:13. Reason: Clarification

  2. #2
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Hi Dean,

    I'm also running Mint 19.2 and the same LMS (with a Squeezebox Touch) and have been having to force-reload alsa, stop/start LMS.

    The force-reload alsa, stop/start LMS issue for me seems to happen if I leave the "start player with server" option ticked in LMS/Advanced/Local Player options. I'm still working on that, I'm wondering if LMS and therefore squeezelite are starting before alsa on boot up and locking something, preventing alsa from loading properly....In fact I just joined this forum for advice on exactly that!!

    re the connectivity problem, in LMS/advanced/Local Player options. entering -s IPaddress:3483 has helped squeezelite find LMS for me (even though squeezelite and LMS on same machine, btw I used actual local IP not 127.0.0.1).

    On the SQ Touch, entering the IP address of the PC running LMS (under settings/advanced/networking....) seems to have also helped re-connection, but I don't know about the Boom settings.

    Hope this is of some help, any advice on the apparent conflict between alsa and squeezelite gratefully received!

    Cheers,
    Charlie

  3. #3
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Hi Dean,

    Iíve recently updated Mint to 19.2, am running LMS 7.9.2 Ė 1565967976, squeezelite (via Local Player plugin in LMS) and had the same sort of issues (Iím using a SB Touch, rather than a Boom).

    The connectivity I seem to have fixed with:-

    1. Entering -s IPaddress:3483 in the Local Player plugin additional options (LMS web interface>Settings>Advanced>Local Player drop down>Additional Options (Advanced) where IPaddress is the local IP of the machine running both LMS and Squeezelite (yes, itís pointing at itself). This CLI option should work if you are running squeezelite some other way.

    2. Entering the same IPAddress in my SB Touch, rather than using the autodiscovery (Settings>Advanced>Network> etc on Touch, donít know about the Boom though).

    (Iím guessing your ufw rules are all good from your description)


    I also have to reload alsa after rebooting and stop/start LMS , but only if I leave squeezelite set to start on LMS start.

    If I uncheck this then alsa is fine on reboot (and I can then start squeezelite afterwards without taking out alsa and my analog output). Iíve been trying to work out how to delay LMS start on bootup to see if this fixes the problem but no luck so far in working out where to set this in MintÖ..

    Hope this helps somewhat,
    Charlie

    P.S. Apologies if this is a duplicate post, my first one doesnít seem to have worked.

  4. #4
    2. Entering the same IPAddress in my SB Touch, rather than using the autodiscovery (Settings>Advanced>Network> etc on Touch, donít know about the Boom though).
    This sounds like a great idea. Not sure if that is configurable on the Boom but will test as soon as I can.

    I also have to reload alsa after rebooting and stop/start LMS , but only if I leave squeezelite set to start on LMS start.
    I'm pretty sure I tried this, (( tried lots of things ) but I will try that specific scenario. In my case the Local Player plugin just wouldn't behave, so that is why I'm running Squeezelite external to LMS as a deamon. I'd rather use the plugin though.

    We have some home projects going on that demand the bulk of our attention. I will try to get to this in a day or so, but if not it may be a week. Please know that I appreciate the suggestions and will try them and respond as soon as I can.

    Thanks
    ~dean~

  5. #5
    Senior Member
    Join Date
    Oct 2005
    Location
    Ireland
    Posts
    17,746
    Think about how LMS works and player discover the LMS servers.

    LMS servers are passive - they wait to be contacted by players.

    When a player is powered on it broadcasts a message asking for LMS to make themselves known and all LMS servers respond with their IP address & LMS port no. If LMS is not on the same LAN segment as the player will not "hear" a broadcast.

    So when a player loses contact with a LMS server, it will try to contact the server on the same IP address as it initially contacted the LMS server. I am not certain of the detail what happens if LMS server is not contactable for a while. It is possible player will not retry the IP address of the LMS server until a user tries to play something.

    First thing to check is player loses contact with LMS server - has the LMS IP address changed ? Check the Boom by long press "<" back to firmware menu and look at the "contact to " menu

    Restarting LMS server etc. anything to do with LMS server will not make a player contact LMS if the server IP address has changed. Player make contact with LMS servers - so in this situation easiest would be to reboot the player but better to understand what is going wrong.

  6. #6
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Hey Dean,

    You could try:
    more /var/log/ufw.log | grep DPT=3483

    Should tell you if those UDP broadcasts are actually reaching your LMS machine but being blocked by ufw.

    Cheers,
    Charlie

  7. #7
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Hi Dean,

    I've seem to have cracked it here, and I think/hope this is going to work for you on the Boom too (because I don't need to put the local_IP of the LMS machine into my SB Touch anymore).

    The underlying problem with the networking, the need to reload alsa, the flaky behaviour of the LocalPlayer plugin....all of it seems to be down to the order/timing of the boot sequence. Changing this has fixed other problems for me too, like failing to connect to and synch with mysqueezebox.com, MyApps not appearing in the web interface, etc.

    A short delay in starting LMS at boot up has fixed the lot.

    Here's the fix, as I implemented it (apologies for any unnecessary steps, I'm just finding my way with Linux)...........

    Powered off SB Touch.

    A complete uninstall of the existing LMS installation.....

    sudo apt-get remove --purge logitechmediaserver

    It reported it couldn't remove the prefs directory and files in /var/lib/squeezeboxserver, so I removed all that manually, using the necessary privilege (I navigated to /var/lib/squeezeboxserver and did a sudo rm * -r but anyone reading this who knows even less linux than me should make VERY SURE they are in the right directory before typing that in!)

    In your case, I think you'll want to remove your squeezelite daemon installation as well, but I don't know how/where (I've been using the LocalPlayer plugin, so squeezelite went with the removal of LMS).

    Rebooted

    Reinstalled LMS (I updated to 7.9.2~1567938514 at this point).

    Rebooted

    Did my usual usermod commands at this point (for me it's adding the squeezeboxserver user to audio and lms groups).

    Rebooted

    sudo systemctl edit logitechmediaserver.service

    This opened an empty file.

    There's apparently a number of ways to introduce the delay but I added the lines:-

    # logitechmediaserver.service delay until necessary services running (Sound, Network)
    [Unit]
    After=NetworkManager.service
    [Service]
    ExecStartPre=/bin/sleep 5

    Saved ("Wrote out", ^o) that file (the odd file name automatically cleaned up to override.conf at that point, so there was no need to tidy up the name when saving) and exited the editor.

    Checked all is well with the config at this point with..
    systemctl cat logitechmediaserver.service
    ...the new "drop-in file" appeared at the end of the output.

    Rebooted

    Went the LMS web interface and did the rest (password, path to music folder, scanning, adding plugins, etc)

    I started with the LocalPlayer plugin (I did point it directly at the LMS with the "-s" as I mentioned in an earlier post, but this might not be necessary any more) and added my other plugins after that (mixcloud, RadioParadise, bpa's BBC plugins from http://downloads.sourceforge.net/pro...lease-repo.xml) they all seem to work fine now.

    I then powered on SB Touch with a factory reset, just to clear the IP address I entered manually in a previous fix, and whatever other settings, in order to be sure that it was the delay that had fixed things and SB Touch would find LMS in the future using auto-discover. It did discover my LMS (I left the SB touch on and restarted LMS,and it was straight to it, NO need to temporarily disable ufw).

    That was it, everything is working fine. Mixcloud doesn't seem to work if I synchronize the SB touch and Squeezelite players, but that's a separate issue. It works again if switch back to no sync, but there's no LMS stop/start or plugin removal/reloading.

    The delay of 5 seconds is a probably overkill, but it's working. It also affects manual stop/starts, but I don;t care about that because it should be a rare thing now.

    Hope this works for you, think it should if ufw rules are all as recommended for 9000 tcp and 3483 tcp/udp.
    Cheers!
    Charlie

    P.S. If I've missed any steps, apologies, just let me know if you run into issues and I'll check back/try to recreate the process here, doesn't take long.

  8. #8
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Ha! it wasn't a 100% cure-all after all, had some wobbles with a SBT software update after the factory reset and lost connection, but a temp disable of ufw,, connect SBT>LMS, re-enable ufw and it's all good again (for now).
    Still, it fixed loads of issues, so can recommend putting in the delay.
    Cheers,
    c

  9. #9
    Quote Originally Posted by AudioCharlie View Post
    c
    Hello Charlie,
    Thank you for all the comments and great suggestions. However, to make a long story short, I gave up on Linux Mint (I had problems other than sound, some of which cause me to restore from snapshots, more than once), and I am on Manaro 18.1 KDE now. Sound works, connectivity works, including after reboots, and even a problematic Squezebox Receiver is connecting again. I hope your fine suggestions benefits others.

    Apologies for the tardy reply; projects that i originally alluded to, as well as the post-project Manjaro effort have take some time.

    Regards,
    ~dean~

  10. #10
    Junior Member AudioCharlie's Avatar
    Join Date
    Sep 2019
    Location
    Cheshire, UK
    Posts
    7
    Hey Dean,
    Glad you got it sorted!
    Iím sure thereís a neater solution to the delay and still a slight issue with ufw in Mint on initial connection but, yeah, hope this exchange will be beneficial to someone. Many thanks for your gracious message and no apology required!
    All the best,
    Charlie


    Sent from my iPhone using Tapatalk

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •