FoxxMD / multi-scrobbler

Scrobble plays from multiple sources to multiple clients
https://foxxmd.github.io/multi-scrobbler
MIT License
299 stars 14 forks source link

Simply doesnt work for Navidrome (Subsonic) #129

Closed kobayashi90 closed 5 months ago

kobayashi90 commented 5 months ago

Please check the FAQ before submitting a bug report.

Describe the bug A clear and concise description of what the bug is.

What is the URL for Navidrome Sources, its not the documented one because it fails??? raw

To Reproduce Steps to reproduce the behavior:

docker-stack:

version: '3.7'
services:
  multi-scrobbler:
    image: foxxmd/multi-scrobbler:latest
    container_name: multi-scrobbler
    environment:
      - TZ=Etc/GMT # Specify timezone from TZ Database name found here https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
      #- SPOTIFY_CLIENT_ID=
      #- SPOTIFY_CLIENT_SECRET=
      #- SPOTIFY_REDIRECT_URI=http://multi-scrobbler-host-IP:9078/callback ## Need to be whitelisted in Spotify dashboard and is used for creating the connection first time
      - MALOJA_URL=http://172.20.0.2:42010
      - MALOJA_API_KEY=lrxydQhqFz9VKgkDBT5CDK9iqNpiL4yZv8XARU5K0tsiaT1WyLSrnrE1wGZOc6Ao
      - PUID=0 # required if running docker on linux host, see main README Docker setup instructions
      - PGID=0 # required if running docker on linux host, see main README Docker setup instructions
      - SUBSONIC_USER=Guest
      - SUBSONIC_PASSWORD=Guest
      - SUBSONIC_URL=http://192.168.16.3:4533
      # set if using a source/client with redirect URI that you have not explicitly set and MS is NOT running on the same machine that you will view the dashboard from
      # EX: You will view MS dashboard at 'http://192.168.0.101:9078' -> set BASE_URL=http://192.168.0.101:9078
      #- BASE_URL=http://MyHostIP:9078

    volumes:
    - "/opt/multi-scrobbler:/config"
    #networks:
    #  - (optional to add container to the same bridge network that maloja is inside to be able to use docker internal networking & dns to resolve and connect to maloja URL via http://maloja:port)
    ports:
    - 9078:9078 # first port is the HOST port multi-scrobbler will serve UI and API on
    restart: unless-stopped

Expected behavior A clear and concise description of what you expected to happen.

To work and maybe have an more up to documentation?

Logs If possible reproduce the issue with debug logging ON

Copy and paste as much log data as possible related to this issue here.

Versions (please complete the following information): Provide version information for any related sources/clients.

Additional context Add any other context about the problem here.

FoxxMD commented 5 months ago

Please try the docker image foxxmd/multi-scrobbler:develop and see if that gives you more information on the communication failure to subsonic.

kobayashi90 commented 5 months ago

Please try the docker image foxxmd/multi-scrobbler:develop and see if that gives you more information on the communication failure to subsonic.

2024-01-22T19:48:20+00:00 error   : [Sources] [Subsonic - unnamed] Initialization failed

ErrorWithCause: 
at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:111:31)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: ErrorWithCause: Communicating with upstream service failed
at SubsonicSource.checkConnection (CWD/src/backend/sources/AbstractSource.ts:160:23)
at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:106:13)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: ErrorWithCause: Could not communicate with Subsonic Server
at SubsonicSource.callApi (CWD/src/backend/sources/SubsonicSource.ts:142:23)
at SubsonicSource.callApi (CWD/src/backend/sources/SubsonicSource.ts:138:24)
at SubsonicSource.doCheckConnection (CWD/src/backend/sources/SubsonicSource.ts:168:26)
at SubsonicSource.checkConnection (CWD/src/backend/sources/AbstractSource.ts:149:29)
at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:106:13)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: Error: connect ECONNREFUSED 192.168.16.3:4533
at __node_internal_captureLargerStackTrace (node:internal/errors:496:5)
at __node_internal_exceptionWithHostPort (node:internal/errors:671:12)
at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1555:16)

Update 1 Ive used the wrong IP but still throws out an Error.

ErrorWithCause: 

at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:111:31)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: ErrorWithCause: Communicating with upstream service failed
at SubsonicSource.checkConnection (CWD/src/backend/sources/AbstractSource.ts:160:23)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:106:13)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: ErrorWithCause: Subsonic server response was unexpected
at SubsonicSource.callApi (CWD/src/backend/sources/SubsonicSource.ts:145:19)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at SubsonicSource.doCheckConnection (CWD/src/backend/sources/SubsonicSource.ts:168:26)
at SubsonicSource.checkConnection (CWD/src/backend/sources/AbstractSource.ts:149:29)
at SubsonicSource.initialize (CWD/src/backend/sources/AbstractSource.ts:106:13)
at ScrobbleSources.addSource (CWD/src/backend/sources/ScrobbleSources.ts:544:18)
at ScrobbleSources.buildSourcesFromConfig (CWD/src/backend/sources/ScrobbleSources.ts:451:25)
at <anonymous> (CWD/src/backend/index.ts:105:9)
caused by: Error: Not Found
at callback (CWD/node_modules/superagent/src/node/index.js:901:17)
at IncomingMessage.<anonymous> (CWD/node_modules/superagent/src/node/index.js:1166:18)
at Stream.emit (node:events:517:28)
at Stream.emit (node:domain:489:12)
at Unzip.<anonymous> (CWD/node_modules/superagent/src/node/unzip.js:54:12)
at Unzip.emit (node:events:517:28)
at Unzip.emit (node:domain:489:12)
at endReadableNT (node:internal/streams/readable:1368:12)
at process.processTicksAndRejections (node:internal/process/task_queues:82:21)
FoxxMD commented 5 months ago

Not Found means the your endpoint is returning a 404. You can verify that your navidrome instance rest endpoints are reachable by visiting http://192.168.16.3:4533/rest/ping from your browser.

If it's reachable from your browser then you should verify the MS container has proper network access to reach that IP. Exec (shell) into the MS container and run

curl -v http://192.168.16.3:4533/rest/ping

If you see see HTTP/1.1 200 OK in the output then there likely an issue with the URL in your configuration. Double check it for spaces, mispelling, extra quotes, etc..

kobayashi90 commented 5 months ago

If you see see HTTP/1.1 200 OK in the output then there likely an issue with the URL in your configuration. Double check it for spaces, mispelling, extra quotes, etc..

Solved, but i have two related questions: 1.) How do i start bridge connections to other subnets on docker at the start of each build or server restart. 2.) How do i make the scrobbler sleeping time shorter?

FoxxMD commented 5 months ago

I'm not sure what you are asking for 1). Bridge networking is the default networking mode for docker. Your containers should have access to IPs on the host network by default.

If you're asking about how to let two separate docker networks communicate you need to use named neworks which is outside the scope of this issue. Google "linking separate docker-compose projects" for some guides or look for something like this.

How do i make the scrobbler sleeping time shorter?

You will need to use a file-based configuration to set polling interval. All of these properties found under the file-based section for subsonic, including interval, are available in the data property of the config.