Forum
Noob question: Solving crash problems - Printable Version

+- Forum (http://forum.xbian.org)
+-- Forum: Software (/forum-6.html)
+--- Forum: Configuration (/forum-17.html)
+--- Thread: Noob question: Solving crash problems (/thread-2330.html)

Pages: 1 2


RE: Noob question: Solving crash problems - JumbledGrass - 7th Jun, 2014 05:30 AM

(7th Jun, 2014 04:59 AM)menakite Wrote:  Please try the netcat commands in my previous post


Code:
nc: connect to localhost port 9090 (tcp) failed: Connection refused

Quote:Also ensure JSON-RPC is enabled: http://wiki.xbmc.org/?title=JSON-RPC_API#Enabling_JSON-RPC (TCP/localhost applies to you; you may need to increase the settings level to advanced or expert, not sure)

Can I change that on the commandline?

If not, I'll do that tomorrow. I can't be in front of the TV right now.


RE: Noob question: Solving crash problems - menakite - 7th Jun, 2014 05:59 AM

That'd translate to editing the XML configuration file by hand, which is highly unsafe. Let's see tomorrow.


RE: Noob question: Solving crash problems - belese - 7th Jun, 2014 05:18 PM

Yes if you change xbmc port, it crash,
will have a look there.
for now, you can change port on
/usr/local/sbin/upstart-xbmc-bridge.py

change line 14 with your port,
but it will be erased on next update.

will put it in a config file later.


RE: Noob question: Solving crash problems - JumbledGrass - 8th Jun, 2014 02:27 AM

(7th Jun, 2014 04:59 AM)menakite Wrote:  ensure JSON-RPC is enabled: http://wiki.xbmc.org/?title=JSON-RPC_API#Enabling_JSON-RPC (TCP/localhost applies to you; you may need to increase the settings level to advanced or expert, not sure)

(I'm going to work through your individual suggestions one by one, so as not to confuse myself or my computer. Smile )

It's already on. Now strongly suspecting it's because I use port 8080, where 9090 is expected by bridge.

(7th Jun, 2014 05:18 PM)belese Wrote:  you can change port on
/usr/local/sbin/upstart-xbmc-bridge.py

change line 14 with your port,
but it will be erased on next update.

I am going to change it in the XBMC UI as it's more straightforward and will stick.

So: Under Settings/Services/Webserver I'm going to change "port" value to 9090.

Is this right?


RE: Noob question: Solving crash problems - CurlyMo - 8th Jun, 2014 02:35 AM

Port 8080 is used by the XBMC webserver and 9090 by the JSON API socket server. Those are different things.


RE: Noob question: Solving crash problems - JumbledGrass - 8th Jun, 2014 02:44 AM

(8th Jun, 2014 02:35 AM)CurlyMo Wrote:  Port 8080 is used by the XBMC webserver and 9090 by the JSON API socket server. Those are different things.

In that case I'm not going to do that.

I'm getting "Failed to start communication server" messages in XBMC when I try to toggle JSON-RPC off and on.


RE: Noob question: Solving crash problems - CurlyMo - 8th Jun, 2014 03:14 AM

Are you maybe running transmission?


RE: Noob question: Solving crash problems - JumbledGrass - 8th Jun, 2014 03:34 AM

(8th Jun, 2014 03:14 AM)CurlyMo Wrote:  Are you maybe running transmission?

Alas, no. I know where you were going with that and it would have explained a lot.

Here's the output of a command I was asked to run previously that may answer what is and isn't running, port wise.

Code:
$ sudo netstat -nlp | grep xbmc.bin
tcp        0      0 0.0.0.0:8080            0.0.0.0:*               LISTEN      914/xbmc.bin    
tcp        0      0 0.0.0.0:1204            0.0.0.0:*               LISTEN      914/xbmc.bin    
tcp        0      0 0.0.0.0:1206            0.0.0.0:*               LISTEN      914/xbmc.bin    
tcp        0      0 0.0.0.0:36666           0.0.0.0:*               LISTEN      914/xbmc.bin    
tcp        0      0 0.0.0.0:36667           0.0.0.0:*               LISTEN      914/xbmc.bin    
udp        0      0 0.0.0.0:9777            0.0.0.0:*                           914/xbmc.bin    
udp        0      0 0.0.0.0:1900            0.0.0.0:*                           914/xbmc.bin    
unix  2      [ ACC ]     STREAM     LISTENING     4440     914/xbmc.bin        /home/xbian/.xbmc/temp/commoncache.socket

I found this in advancedsettings.xml

Code:
<jsonrpc>
    <compactoutput>false</compactoutput>
    <tcpport>9999</tcpport>
   </jsonrpc>

I've changed it to 9090 (although it's highly unsafe to do so) and restarted XBMC.

I'm not seeing the respawns in dmesg anymore, nor am I seeing restarts in the bridge's log file. Fixed?


Re: Noob question: Solving crash problems - CurlyMo - 9th Jun, 2014 01:56 AM

Can you add this fix to the wiki.


RE: Noob question: Solving crash problems - JumbledGrass - 9th Jun, 2014 02:36 AM

I can see that changing the tcp port to 9999 is given as an example on the XBMC wiki, but I don't know if I changed it earlier myself based on that. If I did, it's less likely anybody else has done so and needs that info.

That said, where do you suggest I put this info?

http://wiki.xbmc.org/?title=advancedsettings.xml


Re: Noob question: Solving crash problems - CurlyMo - 9th Jun, 2014 02:37 AM

On the xbian wiki. Just make it logical.


RE: Noob question: Solving crash problems - menakite - 9th Jun, 2014 11:15 AM

(8th Jun, 2014 03:34 AM)JumbledGrass Wrote:  I've changed it to 9090 (although it's highly unsafe to do so) and restarted XBMC.
Glad you solved it. For the reader coming from Google, I was referring to manually edit the guisettings.xml file. That's ok for advancedsettings.xml.

@belese I'm trying to make this an addon. I needed to make 2 patches for XBMC as the Python API is SO limited, but it's quite complete, except a couple details. Will push on GitHub when my fixed line gets repaired (!) for you to review.


RE: Noob question: Solving crash problems - belese - 9th Jun, 2014 05:22 PM

@menakite
what are you needed that are not on xbmc python api?

if you want an addon, maybe rewrite it by using
http://romanvm.github.io/xbmcstubs/docs/classxbmc_1_1_monitor.html

you can have access to all json notification,
and it doesn't need to have json-server on.

or there is already a kind of xbmc/xbian service in xbian-config addon,
it's kind of plugnplay, you can just add a file in service dir (class name should be the same that file name),
EDIT : my mistake, it's not yet pnp, you have to add service here too (but code exist for pnp, so can add it)
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services.py

which herit from service like this
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services/firstrun.py

class service herit from xbmc.monitor, so all cb are accessible.
Belese


RE: Noob question: Solving crash problems - menakite - 9th Jun, 2014 11:57 PM

(9th Jun, 2014 05:22 PM)belese Wrote:  what are you needed that are not on xbmc python api?
It's missing the callbacks for the clean library actions (start/finished), my patch adds these. (My other patch added Player.isPlayingChannel() for PVR as I see it forces priority 5, but I ended up with Player.getPlayingFile().startswith("pvr://"))
I'll try to get this upstream, though Gotham only gets fixes so it won't land there.

Quote:if you want an addon, maybe rewrite it by using
http://romanvm.github.io/xbmcstubs/docs/classxbmc_1_1_monitor.html
I'm indeed subclassing Monitor and Player.

Quote:you can have access to all json notification, and it doesn't need to have json-server on.
Yeah, that's what I'm trying to achieve: avoid these problems by not depending on something the user can disable or change its settings.

Quote:or there is already a kind of xbmc/xbian service in xbian-config addon,
it's kind of plugnplay, you can just add a file in service dir (class name should be the same that file name),
EDIT : my mistake, it's not yet pnp, you have to add service here too (but code exist for pnp, so can add it)
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services.py

which herit from service like this
https://github.com/xbianonpi/xbian-package-config-xbmc/blob/master/content/usr/local/share/xbmc/addons/plugin.xbianconfig/services/firstrun.py

class service herit from xbmc.monitor, so all cb are accessible.
Ah! I didn't really know about this possibility, though I prefer if they remain separate.
I'll ping you on GitHub when I finish the remaining bits, test and then push.