[LINUX] xbmc server: possible quick implementation?

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Montellese Offline
Team-XBMC Developer
Posts: 3,630
Joined: Jan 2009
Reputation: 34
Location: Switzerland
Post: #16
bladesuk1 Wrote:ERROR: JSONRPC Server: Failed to bind serversocket

The standard TCP port used by the JSONRPC TCP server is 9090 and you can change it through advancedsettings.xml (see http://wiki.xbmc.org/index.php?title=Adv...jsonrpc.3E).

But even if the JSONRPC TCP server does not start you can still access JSONRPC through HTTP (see http://wiki.xbmc.org/index.php?title=JSON_RPC#HTTP).

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.

[Image: badge.gif]
find quote
bladesuk1 Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #17
i'd actually managed to find that out with a bit of digging and realised i already had something running on that port. bit of tweaking managed to get that sorted out and jsonrpc is now running happily, by all accounts.

the next question, of course, is whether anything actually works Wink

so far, i've verified that i can shut it down from the web interface (using, i assume the event server) so that's looking good. i need to trigger a library update next, but i'll be configuring all of my sources to match the other xmbc instances on my network first. not too bothered about trashing that - in the absolute worst case, it can be rebuilt from the metadata stored with the media files themselves. i've plugged mediafrontpage in front of it, and that seems to be able to see and stop the server, too, although i've not had a chance to test the library side of it yet.

anyone else used the patchfile to get it working for yourself yet? or has anyone found anything more out about the broken mysql connections side of things?
find quote
bladesuk1 Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #18
well, it actually appears to be working as expected - i've got mediafrontpage talking to this back-end server quite happily, the json-rpc side of things included.

next trick will be putting together a daemon script to stop/start it cleanly, but other than that, i'm happy. i'm struggling to get curl to call the http-rpc interface - unauthorised, apparently.

any idea how i go about submitting this for inclusion in the mainline codebase?
find quote
gugahoi Offline
Fan
Posts: 724
Joined: Aug 2009
Reputation: 5
Post: #19
bladesuk1 Wrote:well, it actually appears to be working as expected - i've got mediafrontpage talking to this back-end server quite happily, the json-rpc side of things included.

next trick will be putting together a daemon script to stop/start it cleanly, but other than that, i'm happy. i'm struggling to get curl to call the http-rpc interface - unauthorised, apparently.

any idea how i go about submitting this for inclusion in the mainline codebase?

This is brilliant! I hope it gets implemented into the final Eden if it works as advertised! Thanks for this!

Maraschino - github - website
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #20
You can create a pull request on github for inclusion... Great No-GUI-approach to have some extra xbmc power.. And can you tell something about the impact on system resources? And given your topic title, is this Linux-only?
(This post was last modified: 2011-11-21 04:21 by Robotica.)
find quote
darkscout Offline
Posting Freak
Posts: 2,145
Joined: Jul 2008
Reputation: 12
Post: #21
Eden is in feature lock and debug. This will (if it works) make it into frodo.

[Image: aeKO.jpeg]
Code:
GRANT ALL PRIVILEGES ON `xbmc_%`.* TO 'xbmc'@'%';
IF you have a mysql problem, find one of the 4 dozen threads already open.
find quote
Croaker Offline
Member
Posts: 61
Joined: Mar 2010
Reputation: 0
Post: #22
once it made it into frodo (fingers crossed again) there should be enhancements to the JSON RPC to be able to manage media data headless too.

think about the possibilities:
Edit all data within XBMC WebInterface without the need of an external tool (and without PHP/MYSQL connection). XBMC keeps full control over the DB and no third-party software needs to be adjusted when the DB structure changes.
Implement some transcoding and you could watch your movies directly in the WebInterface in a HTML5 enabled browser.
sooo many possibilities!!!11
find quote
bladesuk1 Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #23
Robotica Wrote:You can create a pull request on github for inclusion...

okeydokey, i'll look into doing that, then.

Robotica Wrote:Great No-GUI-approach to have some extra xbmc power.. And can you tell something about the impact on system resources? And given your topic title, is this Linux-only?

i haven't really had a look at that side of things yet, to be honest. generally, it hasn't impacted on the system that it's on, though - it's an email/web/file/print server and everything seems to be running as it was before. that said, ps suggests that it's using a lot of one core of the cpu (although that might be because i've got it scanning at the moment). Uses bugger-all memory, though (less than a single php-fpm thread). there's no visible slowdown in the performance of the machine, though, despite the high cpu. it does suggest that there may be optimisations in there somewhere that can be made to bring that down. that'll probably need to be done by someone who actually knows c++ though!

as to linux-only, my initial thinking looked like it would have to be, but i think that it's actually likely to work on any platform as i've not had to change anything platform-specific with the latest git codebase. i'd suggest you give it a try on other platforms and see if it works for you Smile
find quote
bladesuk1 Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #24
this code is now forked at https://github.com/blades/xbmc if anyone wants to have a look/play with it.

i'm currently recompiling for a quick test before i create a pull request.

don't forget to start it up with --server --no-test options. i usually use --nolirc as well.
find quote
niietzshe Offline
Senior Member
Posts: 141
Joined: Dec 2009
Reputation: 0
Post: #25
Wicked, this looks like it's exactly the thing I'm after.
A headless server managing sickbeard, couchpotato, xbmc scrapes of new content etc...

I'll be keeping an eye on this as I start to think about what headless machine to go for.
find quote
Targettio Offline
Senior Member
Posts: 160
Joined: Aug 2010
Reputation: 0
Post: #26
This is exactly the type of thing I have been looking for.

But how do you configure the sources/webUI/library details without a GUI? I assume there must be a text file or something that I need to edit?

Thanks

Edit:

Found it, I need to fiddle with guisettings.xml and sources.xml in the user data folder.
(This post was last modified: 2011-12-22 15:12 by Targettio.)
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #27
bladesuk1 Wrote:as to linux-only, my initial thinking looked like it would have to be, but i think that it's actually likely to work on any platform as i've not had to change anything platform-specific with the latest git codebase. i'd suggest you give it a try on other platforms and see if it works for you Smile

I'm on Linux ;-) but you topic title could be misleading to other platform users...

Too bad your pull request doesn't get the attention it deserves: It's a much wanted feature and it would be great if some devs had a look at it...
(This post was last modified: 2011-12-22 15:09 by Robotica.)
find quote
bladesuk1 Offline
Junior Member
Posts: 32
Joined: Jul 2011
Reputation: 0
Post: #28
Robotica Wrote:I'm on Linux ;-) but you topic title could be misleading to other platform users...

yeah... i did better than i thought i was going to Smile

Robotica Wrote:Too bad your pull request doesn't get the attention it deserves: It's a much wanted feature and it would be great if some devs had a look at it...

i would imagine that they're busy putting the finishing touches to eden, so it might get some love later. but yeah, you'd think that there might be a bit more interest given the number of requests made for this functionality! to be honest, i reckon that it'll still need some tweaking to work properly, but as no-one else has tried it yet i can't really do much about it as (in all honesty) i'm not even sure what i'm testing at this point! i know i can use mediafrontpage to view the library, so browsing works, but i've not tried adding anything through it yet as i've not had much time of late to play with it due to a new baby at home raising hell. might get a chance over yule with a bit of luck...
find quote
Targettio Offline
Senior Member
Posts: 160
Joined: Aug 2010
Reputation: 0
Post: #29
bladesuk1 Wrote:i would imagine that they're busy putting the finishing touches to eden, so it might get some love later. but yeah, you'd think that there might be a bit more interest given the number of requests made for this functionality! to be honest, i reckon that it'll still need some tweaking to work properly, but as no-one else has tried it yet i can't really do much about it as (in all honesty) i'm not even sure what i'm testing at this point! i know i can use mediafrontpage to view the library, so browsing works, but i've not tried adding anything through it yet as i've not had much time of late to play with it due to a new baby at home raising hell. might get a chance over yule with a bit of luck...

Yes I imagine the devs are a little busy atm, but your right, there is a quite a few people that use mysql database so there will be a lot of interest in this.

I am just getting it up and running at the mo, hopefully I will be able to give some feed back soon.

congratulations on the kid Smile
find quote
Robotica Offline
Banned
Posts: 1,202
Joined: Aug 2010
Post: #30
I shared your solution in 2 other topics:
http://forum.xbmc.org/showthread.php?tid=105883
http://forum.xbmc.org/showthread.php?tid=111486

Hopefully, you get some feedback.
find quote
Post Reply