Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 12 FirstFirst 12345 ... LastLast
Results 21 to 30 of 117
  1. #21
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    747
    That's what I'm planning to do, have LMS itself inside the container image. The config / music / logs / database etc. would be outside, passed into the container as volumes.

    Ideally Michael's nightly build process would rebuild the container after it has rebuilt the debs, and push the new container image with an appropriate tag up to Docker's registry.

    Managed to get a container to spin up and run LMS so far, so making some progress.

    Andy

  2. #22
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,242
    Right.
    So the auto-updater could show on the interface a message that a new version is available, but should not try to DL it.

    I guess the start-up script could be rigged to make a check/pull before start --or not... my own LMS wasn't built yesterday

    Also, we're talking Docker but systemd has (as usual) its nose into containers now, so I guess the scripts/containers should be actionnable via systemd-nspawnd or whatever the name is. No idea what this thing is, personally.
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • 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.

  3. #23
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    747
    Ok, I thought LMS was running, but turns out it's not:

    Code:
    2020-03-25 11:01:44 squeezeboxserver_safe started.
    2020-03-25 11:01:49 Logitech Media Server died. Restarting.
    2020-03-25 11:01:54 Logitech Media Server died. Restarting.
    I'm starting the server with:

    Code:
    ENTRYPOINT ["su", "squeezeboxserver", "-s", "/bin/bash", "-c", "/usr/sbin/squeezeboxserver_safe --background --make-pidfile -- /usr/sbin/squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --debug server=DEBUG"]
    However, I'm not getting any extra debugging info in /var/log/squeezeboxserver/server.log. Can someone advise what command line I need to use to get more logging regarding why it's failing to start?

    Cheers

    Andy

  4. #24
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,242
    Don't run squeezeboxserver_safe, that shell script only spawns the squeezebox server binary and checks for its health:
    - it requires an environment that might not be available (shell env or init.d, I don't remember)
    - trying to restart inside the container is the wrong idea; it supposes there is an init process in the container, which is not always -should never be, for the purist- there. Docker (or compose) can be used to specify health checking and remedy procedures.

    Run directly "/usr/sbin/squeezeboxserver" like justifiably does.

    EDIT. FWIW, this is roughly what I do to launch a container instance. "ubu-lms:local" is a poorly crafted ubuntu-based LMS image:
    Code:
    do_lms_start(){ # server start
    	docker rm $(docker ps -a -q --filter name=lms) >/dev/null 2>&1
    	docker run -d -p 9000:9000 \
    	--network ${bridge} --name lms --hostname lms \
    	--entrypoint "/usr/sbin/squeezeboxserver" \
    	ubu-lms:local \
    	--prefsdir /var/lib/squeezeboxserver/prefs \
    	--logdir /var/log/squeezeboxserver/ \
    	--cachedir /var/lib/squeezeboxserver/cache \
    	--charset=utf8 2>/dev/null || exit 1
    }
    Last edited by epoch1970; 2020-03-25 at 04:41.
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • 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.

  5. #25
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    747
    Thanks for that.

    Now running this startup script:

    Code:
    #!/bin/sh
    
    /usr/sbin/squeezeboxserver --user squeezeboxserver --prefsdir /var/lib/squeezeboxserver/prefs --logdir /var/log/squeezeboxserver/ --cachedir /var/lib/squeezeboxserver/cache --charset=utf8 --debug server=DEBUG
    and getting this:

    Code:
    root@9d03fca9f0b5:/# /lms-startup.sh
    Your locale was detected as C, you may have problems with non-Latin filenames.  Consider changing your LANG variable to the correct locale, i.e. en_US.utf8
    dirsFor: Didn't find a match request: [scprefs]
    [20-03-25 11:46:45.2969] main::init (387) Starting Logitech Media Server (v7.9.3, 1584993250, Tue Mar 24 04:13:22 CET 2020) perl 5.028001 - x86_64-linux-gnu-thread-multi
    dirsFor: Didn't find a match request: [videos]
    dirsFor: Didn't find a match request: [pictures]
    [20-03-25 11:46:45.3038] main::init (417) OS Specific init...
    [20-03-25 11:46:45.3041] main::init (464) Server settings effective user and group if requested...
    [20-03-25 11:46:45.3045] main::changeEffectiveUserAndGroup (1075) Running as uid: 101 / gid: 65534 65534
    [20-03-25 11:46:45.3074] main::init (481) Server binary search path init...
    [20-03-25 11:46:45.3078] main::init (485) Server PluginManager init...
    [20-03-25 11:46:45.3665] main::init (488) Server strings init...
    [20-03-25 11:46:45.3683] Slim::Utils::Strings::loadStrings (125) Retrieving string data from string cache: /var/lib/squeezeboxserver/cache/stringcache.x86_64-linux.bin
    [20-03-25 11:46:45.3710] main::init (500) Server SQL init (Slim::Utils::SQLiteHelper)...
    [20-03-25 11:46:45.3714] main::init (504) Async DNS init...
    [20-03-25 11:46:45.3718] main::init (507) Async HTTP init...
    [20-03-25 11:46:45.3722] main::init (512) SqueezeNetwork Init...
    [20-03-25 11:46:45.3779] main::init (517) Download repositories init...
    [20-03-25 11:46:45.3783] main::init (520) Firmware init...
    [20-03-25 11:46:45.3789] main::init (523) Server Info init...
    [20-03-25 11:46:45.4416] main::init (526) Server IR init...
    [20-03-25 11:46:45.4467] main::init (529) Server Request init...
    [20-03-25 11:46:45.4505] main::init (532) Server Queries init...
    [20-03-25 11:46:45.4509] main::init (535) Server Buttons init...
    [20-03-25 11:46:45.4525] main::init (543) UDP init...
    [20-03-25 11:46:45.4533] main::init (546) Slimproto Init...
    [20-03-25 11:46:45.4537] main::init (549) Cache init...
    [20-03-25 11:46:45.4761] Slim::Utils::SQLiteHelper::postConnect (377) Optimizing DB because of missing or empty sqlite_stat1 table
    [20-03-25 11:46:45.4800] Slim::Schema::forceCommit (2143) Warning: Trying to commit transactions before DB is initialized!
    [20-03-25 11:46:45.5397] Slim::Utils::SQLiteHelper::postConnect (377) Optimizing DB because of missing or empty sqlite_stat1 table
    [20-03-25 11:46:45.5427] Slim::Schema::forceCommit (2143) Warning: Trying to commit transactions before DB is initialized!
    [20-03-25 11:46:45.5605] main::init (566) Server HTTP init...
    [20-03-25 11:46:45.6005] main::init (570) Source conversion init..
    [20-03-25 11:46:45.6060] main::init (576) Server Web Settings init...
    [20-03-25 11:46:45.6271] main::init (581) Menu init...
    [20-03-25 11:46:45.6281] main::init (592) Server Alarms init...
    [20-03-25 11:46:45.6283] main::init (596) Server Load Plugins...
    [20-03-25 11:46:45.7879] Slim::Utils::SQLiteHelper::postConnect (377) Optimizing DB because of missing or empty sqlite_stat1 table
    [20-03-25 11:46:45.7908] Slim::Schema::forceCommit (2143) Warning: Trying to commit transactions before DB is initialized!
    [20-03-25 11:46:45.8411] main::init (599) Server Jive init...
    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.
    server.log contains the same if not similar, other than the last two lines.

    I assume it's exiting because of the last two lines in the output of running the startup script. Any thoughts why?

    Thanks

    Andy

  6. #26
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,242
    I think I've seen this kind of thing but I can't recall anything clearly.
    Would you try running your image w/ something like "docker run -ti --rm --entrypoint /bin/bash image-name" to get a shell and keyboard, and then manually run the command? Perhaps you could see what's wrong more easily as the [s]process.[/s] [container will stay running.]
    (I assume you want to override the entrypoint your image has set. Otherwise "docker run -ti --rm image-name bash" should work.)
    Last edited by epoch1970; 2020-03-25 at 05:08. Reason: Finishing my sentences...
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • 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.

  7. #27
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    747
    That's exactly what I've done. I've overridden the entrypoint in my docker-compose file to just be 'bash', and then used docker-exec to connect to the container and run the script manually.

    That's the output I posted.

    Andy

  8. #28
    Senior Member
    Join Date
    Apr 2008
    Location
    Paris, France
    Posts
    2,242
    Ah yes, I missed the 1st line, sorry.
    Mhh. https://forums.slimdevices.com/showt...r-reboot/page3
    Rights ok on directories, log file exists?
    2 SB 3 • 1 PCP 6 • Libratone Loop, Zipp, Zipp Mini • iPeng (iPhone + iPad) • LMS 7.9 (linux) with plugins: CD Player, WaveInput, Triode's BBC iPlayer by bpa • IRBlaster by Gwendesign (Felix) • 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.

  9. #29
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    747
    Looks like the log files are owned by root:root, and permissions are 644. Could this be because they're being created by the server process before it then 'becomes' the squeezeboxserver user, and then is unable to write? I've tried clearing out the directory, and it's definitely the squeezebox process that's creating the files with these permissions.

    Code:
    root@9d03fca9f0b5:/var/log/squeezeboxserver# ls -al /var/log/squeezeboxserver/
    total 28
    drwxr-xr-x 1 squeezeboxserver nogroup  4096 Mar 25 11:39 .
    drwxr-xr-x 1 root             root     4096 Mar 25 11:35 ..
    -rw-r--r-- 1 root             root        0 Mar 25 11:39 perfmon.log
    -rw-r--r-- 1 root             root    18728 Mar 25 11:46 server.log
    Any 'squeezebox' way to fix this?

    Andy
    Last edited by adhawkins; 2020-03-25 at 05:12.

  10. #30
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    3,194
    did you try to drop the '/' from the end of --logdir
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

Posting Permissions

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