Can't Connect to XBMC

NzbDrone can’t seem to connect to my XBMC web interface. I’ve checked the web interface from a browser and passwords/ip addresses/ports are all good, but I get [testxbmc] Failed when I run a test from NzbDrone. Here’s what the trace log says:

TaskExtensions Task Error: Verion received from XBMC is invalid, please correct your settings. 8:10 PM
XbmcService The underlying connection was closed: An unexpected error occurred on a receive.: The underlying connection was closed: An unexpected error occurred on a receive.

I’m running 12.2 of XBMC and have tried using the ip address in the setup, turning off firewalls and every config option I can think of.

I’ve seen this come up a couple times, but haven’t been able to reproduce. Hoping that we can get enough information so we can reproduce it.

What OS are you running XBMC on?
What OS are you running drone on?
You mentioned firewalls, were they the window’s built-in ones or another 3rd party one?
Are the Drone and XBMC systems on the same IP subnet (ie 192.168.1.x)?

Anything else you can provide to help track this down would be great, the above questions are just what comes to mind right now.

No worries - here are the details:

XBMC and drone run on the same box - Windows 7 - latest updates and service pack.
Windows built in firewall and Windows Defender for AV. Nothing else.
Same subnet - same box.

Other random stuff - it’s a wireless PC connection, also have SAB, Sickbeard and uTorrent running on it, oh and AirVideo HD.

Not sure if it’s relevant but in XBMC under System Info, I have an IP address of 169.254.x.x which is a bit weird. The machine is contactable and working with all app web interfaces on a 192.168.x.x address.

Happy to provide any logs etc.

XBMC might just be checking the wired NIC which doesn’t have an IP and has a default one (169.254.x.x), since the XBMC and Drone run on the same box, are you using either localhost or 127.0.0.1 to connect to XBMC or are you using the 192.168.x.x address or even the 169.254.x.x address?

Is SB able to talk to XBMC properly (just as a comparison)?

That setup is pretty similar to my laptop, except I’m running Windows 8, I occasionally see errors connecting to XBMC when I try multiple times within a short period of time, but thats only 1-2% of the time.

Ah, thanks for the explanation - makes sense.

I’ve tried localhost, 127.0.0.1, the 169 and the 192 address. None have worked and yeah, Sickbeard works fine.

I’ll keep working on it. Might even install on my laptop and see what I can work out.

I’d recommend localhost or 127.0.0.1 - but its still very weird that its not working. In 12.2 you need to enable showing advanced settings to set username/password, but not sure if the error you’re getting fits that scenario even.

Ok, I’m using localhost now and have double checked everything but still no joy. Today when I downloaded a missing episode, I received the following errors:

NotificationService Unable to send OnDownload notification to: XBMC: The remote server returned an error: (401) Unauthorized. 5:10 PM
HttpProvider Failed to get response from: http://localhost:8083/xbmcCmds/xbmcHttp?command=ExecBuiltIn(Notification(NzbDrone [TV] - Downloaded,Boardwalk Empire - 4x01 - New York Sour SDTV,5000,https://raw.github.com/NzbDrone/NzbDrone/develop/Logo/64.png)) The remote server returned an error: (401) Unauthorized. 5:10 PM
XbmcService The underlying connection was closed: An unexpected error occurred on a receive.: The underlying connection was closed: An unexpected error occurred on a receive.

So I checked the password on the XBMC connection and the username had been changed to “localhost” - what tha!!! I think I’ve seen this happen once before but thought it was me typing it in the wrong field. Something weird there…

I’ve been using XBMC with NzbDrone since it was added, it has never changed the username to the host name, the only time the settings are altered is when the save button is pressed. If this is happening its an issue, but I don’t see how it could even happen.

An update: Haven’t seen the account name changes happen again. I’ve finally got NzbDrone connecting to XBMC but the only way I was able to do it was to stop using a username and password. i.e. no security on the XBMC web interface. Not really an issue but a bit of a bummer.

Sorry to bump an old thread but i’m getting the same error ever since the plex fix was released yesterday (however possibly for longer, i’m not 100% sure).

“TaskExtensions Task Error: Verion received from XBMC is invalid, please correct your settings”

I’ve got the lastest drone installed on Linux, and my XBMC is on Windows 8.1, my other apps still connect just fine from the same source IP so it’s not firewall related (windows firewall is off anyways). They are on the same subnet but different PCs.

@PhAzE please provide the whole error message, thats just the start of it. The Plex changes didn’t change anything with XBMC, something else is causing it.

What version of XBMC?
What other apps are working (I assume CP)?

Working apps are cp, headphones, and I do have sb installed still and it works also, all on the same htpc that drone is on. The xbmc web interface is also working with the same port. I’ll get the full error once I get back home. Xbmc version 12.3.

Message
Task Error: Verion received from XBMC is invalid, please correct your settings.

Exception
NzbDrone.Core.Notifications.Xbmc.InvalidXbmcVersionException: Verion received from XBMC is invalid, please correct your settings.
at NzbDrone.Core.Notifications.Xbmc.XbmcService.Execute (NzbDrone.Core.Notifications.Xbmc.TestXbmcCommand message) [0x00000] in filename unknown:0
at NzbDrone.Core.Messaging.Commands.CommandExecutor.ExecuteCommand[TestXbmcCommand] (NzbDrone.Core.Messaging.Commands.Command command) [0x00000] in filename unknown:0

NzbDrone Ver. 2.0.0.1350

Just to test I created a VM with Unraid 6 and installed nzbdrone there. I configured XBMC and tried to test again with the same error. It takes about 2-3 minutes for the error to show while the message popup just shows “[testxbmc] starting” and waits until it times out basically, that when the exception is thrown.

I set drone to ‘trace’ logging and it’s not showing any more details on the problem. Are there any commands I can run from prompt that might help figure out what’s happening?

EDIT: Would also like to mention that turning off username and password fixes the problem (but leaves xbmc open for manipulation from anyone locally)

@PhAzE are you using a complex password? I’d expect an authentication error instead of a timeout if the credentials weren’t being sent properly, but disabling credentials on the XBMC side shouldn’t have this effect.

No it’s a light to medium password and a common one I use which I’ve re-enteted numerous times to make sure it was spelt right. Only letters and numbers. If I enter the wrong password it fails immediately.

I’m really not sure what the issue could be with this. Using a username and password shouldn’t change how drone tries to reach XBMC.

Do you have another XBMC machine on the network you can try connecting to?

I only have one xbmc client set up unfortunately. I’ve tested by changing the port and the timeout and all the settings, but no luck. Really strange, I guess i’ll have to leave it with username/password off for now. I wonder if maybe xbmc 12.3 has any differences in their json request structure vs 12.2.

Tested against 12.3 (Windows), I believe my XBMC machines are running 12.3 as well (OpenELEC). Everything is connecting with username and password properly.

Don’t know if this helps in any way and could be completely unrelated but I used to have problems all the time with random connection issues to xbmc fron drone , In drone settings I used address as 192.168.1.XX , I changed it to 127.0.0.1 (xbmc and drone are on the same machine) and I have not had a single error pop up since.