Adding an XBMC connection fails on the latest release.
A manual JSON query from the NZBDrone server to the XBMC server succeeds though, go figure!
My guess is the json request is not being sent correctly considering xbmc logs receiving the request but does not parse it - feel free to tell me how far off i am
I tried to collect as much information as humanely possible but please let me know if you need more information!
Configuration
NZBDrone Version : 2.0.0.1690 NZBDrone OS : CentOS 6.5 - 2.6.32-431.20.3.el6.x86_64
XBMC Version : XBMC (12.3 Git:9ed3e58)
XBMC OS : Ubuntu 12.10 - 3.5.0-25-generic i686
Failure Scenario:
- Add XBMC host info as an NZBDrone Connection
- Click Test or Save
NZBDrone Log Output
This is what the nzbdrone log shows when attempting to test or save a connection to xbmc.
14-7-25 08:20:18.4|Debug|XbmcService|Determining version of XBMC Host: 192.168.1.105:8080
14-7-25 08:20:18.4|Debug|HttpProvider|Posting command: {
"jsonrpc": "2.0",
"method": "JSONRPC.Version",
"id": 1
}, to http://192.168.1.105:8080/jsonrpc
14-7-25 08:21:58.4|Debug|XbmcService|The request timed out
System.Net.WebException: The request timed out
at System.Net.HttpWebRequest.EndGetResponse (IAsyncResult asyncResult) [0x00000] in <filename unknown>:0
at System.Net.HttpWebRequest.GetResponse () [0x00000] in <filename unknown>:0
at System.Net.WebClient.GetWebResponse (System.Net.WebRequest request) [0x00000] in <filename unknown>:0
at System.Net.WebClient.ReadAll (System.Net.WebRequest request, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.UploadDataCore (System.Uri address, System.String method, System.Byte[] data, System.Object userToken) [0x00000] in <filename unknown>:0
at System.Net.WebClient.UploadData (System.Uri address, System.String method, System.Byte[] data) [0x00000] in <filename unknown>:0
14-7-25 08:21:58.4|Debug|XbmcService|Version is: 0.0.0
14-7-25 08:21:58.4|Error|XbmcService|Unable to send test message: Verion received from XBMC is invalid, please correct your settings.
NzbDrone.Core.Notifications.Xbmc.InvalidXbmcVersionException: Verion received from XBMC is invalid, please correct your settings.
at NzbDrone.Core.Notifications.Xbmc.XbmcService.Test (NzbDrone.Core.Notifications.Xbmc.XbmcSettings settings) [0x00000] in <filename unknown>:0
14-7-25 08:21:58.4|Warn|NzbDroneErrorPipeline|Invalid request Validation failed:
-- Unable to send test message
XBMC Log
The XBMC log during during the NZBDrone connection attempt
08:56:26 T:2865838912 DEBUG: webserver: request received for /jsonrpc
Manual JSON
The same json command works if manually initiated from the command line on the server hosting nzbdrone - this should rule out connection issues or XBMC issues.
Manual Command
curl -i -X POST \
-H 'Content-Type: application/json' \
-d '{"jsonrpc": "2.0","method": "JSONRPC.Version","id": 1}' \
http://xbmc:xbmc@192.168.1.105:8080/jsonrpc
Command Output
[nzbdrone@media-server logs]# curl -i -X POST \
> -H 'Content-Type: application/json' \
> -d '{"jsonrpc": "2.0","method": "JSONRPC.Version","id": 1}' \
> http://xbmc:xbmc@192.168.1.105:8080/jsonrpc
HTTP/1.1 200 OK
Content-Length: 77
Content-Type: application/json
Date: Fri, 25 Jul 2014 13:38:49 GMT
{"id":1,"jsonrpc":"2.0","result":{"version":{"major":6,"minor":0,"patch":3}}}
XBMC Log
The xbmc log of the successful request
09:12:57 T:2857446208 DEBUG: webserver: request received for /jsonrpc
09:12:57 T:2857446208 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0","method": "JSONRPC.Version","id": 1}
09:12:57 T:2857446208 DEBUG: JSONRPC: Calling jsonrpc.version