Home of the Squeezebox™ & Transporter® network music players.
Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 38
  1. #21
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Anything is possible! I've cleared out the local files for the container a number of times though.

    Just tried making sure I have the same plugins enabled on the Docker instance as the VM one. One thought, is there a 'Virtual Libraries' plugin that needs to be enabled for Library Views to work?

    Andy

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

    When developing a plugin,where should I put it in the Docker container?

    > Just tried making sure I have the same plugins enabled on the Docker
    > instance as the VM one. One thought, is there a 'Virtual Libraries'
    > plugin that needs to be enabled for Library Views to work?


    Start LMS with logging for server.plugins logging. Add some "warn"
    statements to your plugin initialization, as that'll be logged, no
    matter what the logging level. Just to see whether the scanner even
    picks up your plugin.

  3. #23
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Ok, I've done that. On my 'real' LMS server, I see entries for the initPlugin in both server.log and scanner.log.

    However, on the Docker instance, I only see the entry in server.log. There is no mention of my plugin in scanner.log.

    Can you think of any reason why this might be?

    Andy

  4. #24
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,776

    When developing a plugin,where should I put it in the Docker container?

    > Ok, I've done that. On my 'real' LMS server, I see entries for the
    > initPlugin in both server.log and scanner.log.


    What "that"? "warn" statements or regular debugging level changed?

    Are you sure you're running exactly the same code in both environments?
    Would the same plugin code run when executed in your normal environment?
    I guess you checked your scanner.log for information about failure to
    load the plugin?

  5. #25
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    God, this is so confusing.

    I've just cleaned out the container and any mounts to it. Copied in the plugin from my working server to /config/cache/Plugins/SimpleLibraryViews. The Plugin directories shown in the Info page of the server are:

    Plugin Folders: /config/cache/InstalledPlugins/Plugins, /lms/Plugins, /config/cache/Plugins

    When I start the server up, I don't see any sign of the 'warn' logging that's in InitPlugin. However, the plugin is listed in the web interface, and if I make changes to its settings I get logging in the server log file showing that the settings have been updated.

    Does this mean that the plugin isn't being loaded when the server starts?

    I guess it comes back to the original question. If I want to work on the development of a plugin in the Docker container, where should I put the plugin files while working on them?

    Andy

  6. #26
    Babelfish's Best Boy mherger's Avatar
    Join Date
    Apr 2005
    Location
    Switzerland
    Posts
    20,776

    When developing a plugin,where should I put it in the Docker container?

    > When I start the server up, I don't see any sign of the 'warn' logging
    > that's in InitPlugin. However, the plugin is listed in the web
    > interface, and if I make changes to its settings I get logging in the
    > server log file showing that the settings have been updated.
    >
    > Does this mean that the plugin isn't being loaded when the server
    > starts?


    No. If it wasn't loaded, then you wouldn't have any settings to change.

    > I guess it comes back to the original question. If I want to work on the
    > development of a plugin in the Docker container, where should I put the
    > plugin files while working on them?


    /config/cache/Plugins IMHO is the right place.

    But why would you need to run Docker in development? Any system able to
    run Docker should be able to run LMS from the source, IMHO.

  7. #27
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Ok, so I'm putting them in the right place it seems. Just odd that I'm not seeing the initialisation messages then.

    I chose to fire up a Docker container as it seemed the easiest way to keep everything self-contained. I'll spin up a VM and give things a try that way.

    Andy

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

    When developing a plugin,where should I put it in the Docker container?

    > Ok, so I'm putting them in the right place it seems. Just odd that I'm
    > not seeing the initialisation messages then.


    Maybe you can describe your Docker workflow? It should work, after
    all... what image are you using? How are you building the container? How
    are you running it?

  9. #29
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    I'm using the community container. Here's the full docker-compose file:

    version: "3.5"
    networks:
    default:
    name: lms

    volumes:
    music:
    driver: local
    driver_opts:
    type: nfs
    o: addr=nas.gently.org.uk
    device: ":/mnt/data/music"

    services:
    lms:
    container_name: lms
    hostname: lms-docker
    image: lmscommunity/logitechmediaserver:8.2.0
    restart: unless-stopped
    networks:
    - default
    ports:
    - "9000:9000"
    - "9090:9090"
    - "3483:3483"
    - "3483:3483/udp"
    volumes:
    # folder where lms stores its data (cache, logs, prefs)
    - ./lms_storage:/config
    # folder where lms should look for music
    - music:/var/spool/music
    # use time of host
    - /etc/localtime:/etc/localtime:ro
    - /etc/timezone:/etc/timezone:ro
    # - ./Plugins/SimpleLibraryViews/SimpleLibraryViews:/config/cache/Plugins/SimpleLibraryViews
    environment:
    - PUID=1000
    - PGID=1003
    (the commented out volume is me trying to inject the local source directory for the plugin into the container. I've stopped doing that for now while I work out what's going on).

    I run the container using 'docker-compose up -d'

    That's basically all I'm doing.

    Andy

  10. #30
    Senior Member
    Join Date
    May 2005
    Location
    UK
    Posts
    845
    Ok, just set up a VM, installed LMS from a .deb, unpacked the ZIP of my plugin to /var/lib/squeezeboxserver/Plugins and it's working fine.

    I've realised I wasn't clicking the checkbox on the logging settings to save the log entries. I've now done this, and think I'm making some progress.

    On the VM, I see the 'init' log entry for my plugin in both the server.log and scanner.log

    On Docker, I only see the 'init' log entry for my plugin in the server.log.

    I've attached all the log files so you can see what's going on.

    To be clear, the plugin code files in both cases are the same, and are for the released version of my Plugin (SimpleLibraryViews).

    Hope this can help get some movement on this! Is there any chance the scanner is being started with a different set of 'include' directories or something?

    Thanks

    Andy
    Attached Files Attached Files

Posting Permissions

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