Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 8 of 8
  1. #1
    Junior Member
    Join Date
    Dec 2018
    Posts
    12

    Logitech Media Server and nginx?

    Hey all.
    I've currently got my LMS running in a docker container. To get it working with a VPN server, I'm proxying everything through nginx.
    Unfortunately, it doesn't work.

    I'm seeing these errors in my squeezelite logs:

    Code:
    [20:31:52.731491] slimproto:922 connected
    [20:31:52.731545] sendHELO:130 mac: xx:xx:xx:xx:xx:xx
    [20:31:52.731558] sendHELO:132 cap: Model=squeezelite,AccuratePlayPoints=1,HasDigitalOut=1,HasPolarityInversion=1,Firmware=v1.9.0-1121-pCP,ModelName=SqueezeLite,MaxSampleRate=384000,dsf,dff,aac,ogg,flc,aif,pcm,mp3
    [20:31:52.732058] slimproto_run:573 FATAL: slimproto packet too big: 18516 > 4096
    And the following in my nginx logs:
    Code:
    192.168.1.xxx - - [28/Mar/2019:08:47:06 +0000] "HELO\x00\x00\x00\xD5\x0C\x00\xB8'\xEB\x9D\x03\x17\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00@\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00" 400 157 "-" "-"
    Is there an nginx guru who can help me out? The 400 error in the nginx log implies a https error, but none of the comms are https, are they?

    Lemme know if you need more deets.

  2. #2
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,216

    Logitech Media Server and nginx?

    > I've currently got my LMS running in a docker container. To get it
    > working with a VPN server, I'm proxying everything through nginx.


    This sounds like too many components, each one asking for its own share
    of problems...

    Why would you need to pipe traffic through nginx in order to use VPN?
    LMS uses more protocols than just http. Therefore you can't proxy
    everything through nginx.

    > [20:31:52.731491] slimproto:922 connected


    slimproto is not http.

    > Is there an nginx guru who can help me out? The 400 error in the nginx
    > log implies a https error, but none of the comms are https, are they?


    None is https. The web UI (port 9000) is http.

    --

    Michael

  3. #3
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Thanks for the responses. So which port is slim proto (since 9000 is the http port) ? Maybe there's some non http proxying I can try.

    In terms of moving parts - I currently need to route lms Internet traffic through a vpn so I can use Pandora (they don't operate in Australia). I want lms running on my nuc (for performance), but don't want all traffic from that nuc going through a vpn, hence using containers.
    I have a sort of solution, where I have lms in a container, and using a raspberrypi as a gateway, but the pi isn't very reliable in regards to network connections.

    So I'm here now

    Sent from my Redmi Note 4X using Tapatalk

  4. #4
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Oh, and the proxying is because docker and vpns don't "just work"

    Sent from my Redmi Note 4X using Tapatalk

  5. #5
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,216

    Logitech Media Server and nginx?

    > Thanks for the responses. So which port is slim proto (since 9000 is the
    > http port) ? Maybe there's some non http proxying I can try.


    3483. But if I got your use case correctly, then you won't need this.

    > In terms of moving parts - I currently need to route lms Internet
    > traffic through a vpn so I can use Pandora (they don't operate in
    > Australia). I want lms running on my nuc (for performance), but don't
    > want all traffic from that nuc going through a vpn, hence using
    > containers.


    All you need is to make sure that _outgoing_ traffic from LMS _to_
    mysqueezebox.com is routed through the VPN. No need for nginx, or to
    route slimproto or access to LMS.

    --

    Michael

  6. #6
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    Thanks for all that! Very useful!
    I'll have a go at that over the weekend

    Sent from my Redmi Note 4X using Tapatalk

  7. #7
    Junior Member
    Join Date
    Dec 2018
    Posts
    12
    So I've fixed up nginx to properly proxy tcp and http traffic sperately. Works better, and I can control the devices via the lms interface, but the players themselves seem to have knowledge of the lms server. I get the minimal UI, where there are no music folders, or content. Wondering what might be missing on the player end to accurately display content?

    And to clarify, nginx is required, as when you use a docker container as a network for another container, the normal port rules don't seem to work.

    Here's the conf file.
    Code:
    http {
      server {
        listen 9000;
        location /{
          proxy_pass http://lms:9000/;
        }
      }
    }
    stream {
      server {
        listen 9090;
        proxy_pass lms:9090;
      }
      server {
        listen 3483;
        proxy_pass lms:3483;
      }
      server {
        listen 3483 udp;
        proxy_pass lms:3483;
      }
    }

  8. #8
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,216

    Logitech Media Server and nginx?

    > So I've fixed up nginx to properly proxy tcp and http traffic sperately.

    Wow... I didn't even know nginx could proxy UDP traffic and the like...

    --

    Michael

Posting Permissions

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