CDrummond / bliss-analyser

GNU General Public License v3.0
7 stars 4 forks source link

bliss-analyser upload fails with error "Invalid port" #14

Closed chrober closed 4 months ago

chrober commented 4 months ago

After moving from piCorePlayer 8.2.0 to piCorePlayer 9.0.1 (fresh setup) I am having troubles with uploading bliss.db to LMS.

When invoking sudo ./bliss-analyser upload on the command line I get the following console output:

[2024-06-02 16:02:07 I] Requesting LMS plugin to allow uploads
[2024-06-02 16:02:12 E] Invalid port

Using the -l debug option results in the following:

[2024-06-02 16:04:41 I] Requesting LMS plugin to allow uploads
[2024-06-02 16:04:41 D] connecting to 127.0.0.1:9000 at 127.0.0.1:9000
[2024-06-02 16:04:41 D] created stream: TcpStream { addr: 127.0.0.1:46650, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:04:41 D] sending request POST http://127.0.0.1:9000/jsonrpc.js
[2024-06-02 16:04:41 D] writing prelude: POST /jsonrpc.js HTTP/1.1
Host: 127.0.0.1:9000
User-Agent: ureq/2.4.0
Accept: */*
accept-encoding: gzip
Content-Length: 77
[2024-06-02 16:04:46 D] response 200 to POST http://127.0.0.1:9000/jsonrpc.js
[2024-06-02 16:04:46 D] adding stream to pool: http|127.0.0.1|9000 -> TcpStream { addr: 127.0.0.1:46650, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:04:46 D] dropping stream: TcpStream { addr: 127.0.0.1:46650, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:04:46 E] Invalid port

Does that make any sense?

It seems I have misconfigured something in my new LMS setup but I don't remember having done anything special to enable this bliss.db upload in my previous LMS system. Do you have any hints how to tackle this or at least where to look?

chrober commented 4 months ago

Maybe the server log does reveal anything helpful? (log-level=debug for network.jsonrpc)

[24-06-02 16:23:08.1967] Slim::Web::JSONRPC::handleURI (74) handleURI(Slim::Web::HTTP::ClientConn=GLOB(0x55cb68a490))
[24-06-02 16:23:08.1976] Slim::Web::JSONRPC::handleURI (140) POST data: [{"id":1, "method":"slim.request","params":["",["blissmixer","start-upload"]]}]
[24-06-02 16:23:08.1993] Slim::Web::JSONRPC::handleURI (158) JSON parsed procedure: {
  id => 1,
  method => "slim.request",
  params => ["", ["blissmixer", "start-upload"]],
}
[24-06-02 16:23:08.2011] Slim::Web::JSONRPC::requestMethod (398) requestMethod(["", ["blissmixer", "start-upload"]])
[24-06-02 16:23:08.2021] Slim::Web::JSONRPC::requestMethod (473) Dispatching...
[24-06-02 16:23:08.2031] Slim::Web::JSONRPC::requestMethod (492) Request is async: will be back
[24-06-02 16:23:13.2050] Slim::Web::JSONRPC::requestWrite (525) requestWrite()
[24-06-02 16:23:13.2058] Slim::Web::JSONRPC::generateJSONResponse (368) generateJSONResponse()
[24-06-02 16:23:13.2081] Slim::Web::JSONRPC::writeResponse (299) JSON response: {
  id => 1,
  method => "slim.request",
  params => ["", ["blissmixer", "start-upload"]],
  result => { port => 0 },
}
[24-06-02 16:23:13.2088] Slim::Web::JSONRPC::writeResponse (314) JSON raw response: [{"params":["",["blissmixer","start-upload"]],"method":"slim.request","id":"1","result":{"port":0}}]
[24-06-02 16:23:13.2100] Slim::Web::JSONRPC::writeResponse (351) Response headers: [
HTTP/1.1 200 OK
Content-Length: 98
Content-Type: application/json

]
[24-06-02 16:23:13.2141] Slim::Web::JSONRPC::handleClose (55) Closing any subscriptions for Slim::Web::HTTP::ClientConn=GLOB(0x55cb68a490)

This corresponds to the following bliss-analyser timestamps:

[2024-06-02 16:23:08 I] Requesting LMS plugin to allow uploads
[2024-06-02 16:23:08 D] connecting to 127.0.0.1:9000 at 127.0.0.1:9000
[2024-06-02 16:23:08 D] created stream: TcpStream { addr: 127.0.0.1:39178, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:23:08 D] sending request POST http://127.0.0.1:9000/jsonrpc.js
[2024-06-02 16:23:08 D] writing prelude: POST /jsonrpc.js HTTP/1.1
Host: 127.0.0.1:9000
User-Agent: ureq/2.4.0
Accept: */*
accept-encoding: gzip
Content-Length: 77
[2024-06-02 16:23:13 D] response 200 to POST http://127.0.0.1:9000/jsonrpc.js
[2024-06-02 16:23:13 D] adding stream to pool: http|127.0.0.1|9000 -> TcpStream { addr: 127.0.0.1:39178, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:23:13 D] dropping stream: TcpStream { addr: 127.0.0.1:39178, peer: 127.0.0.1:9000, fd: 3 }
[2024-06-02 16:23:13 E] Invalid port
chrober commented 4 months ago

Sorry, just found out that for whatever reason the Bliss Mixer plugin was not installed properly: (log-level=debug for plugin.blissmixer)

[24-06-02 17:42:38.6924] Plugins::BlissMixer::Plugin::_cliCommand (350) Requested to allow uploads
[24-06-02 17:42:38.6932] Plugins::BlissMixer::Plugin::_stopMixer (172)  not running
[24-06-02 17:42:38.6939] Plugins::BlissMixer::Plugin::_startMixer (245) No mixer binary

I did not even realise the DSTM mixer was not using Bliss since it fell back to last.fm. Just uninstalled and re-installed Bliss Mixer, now everything works fine again.