[AFTV] Network not initialized when running as launcher
#1
When running XBMC as a launcher for the Fire TV, the network is not properly set up during boot, and I have to exit out of XBMC and restart in order to access the remote mysql database.

In the log files I just see messages like this:
Code:
15:43:40 T:1527932168   ERROR: Unable to open database: xbmc_video78 [2003](Can't connect to MySQL server on '192.168.73.24' (101))

This seems to be a regression from a long time ago, as I'm fairly confident I submitted the same bug for the original Xbox, after I had configured XBMC to be the Dashboard there Smile

Full log:
http://xbmclogs.com/show.php?id=261101

To fix, I need to exit out of XBMC and re-launch.
Reply
#2
I use mysql with out any issues, You might try changing the advancedsettings.xml to include this network setting, if you use samba.

<samba>
<clienttimeout>30</clienttimeout>
</samba>
Reply
#3
Thanks for the suggestion. I tried adding that but no change. Note that the error message I'm getting is about it being unable to connect to the remote mysql server, which would be unrelated to any samba tuning. For the record, I can still access the samba shares by browsing the sources. Only the database part is failing.

Edit: Are you using XBMC as a Launcher ? I used steps from this xda-developers.com thread to bypass the Fire TV launcher all together and boot directly into XBMC. The problem does not occur if I launch XBMC the "normal" way.
Reply
#4
I used the same to do my set too. And boot directly to xbmc without issues.

Still learning this android way of doing things, so not sure how much help I can be.

Maybe post this in his thread?

Could this be a setting in one of the apk's that you had to load?
Reply
#5
Problem is that your box network is not yet up when you enter XBMC as a launcher.
Depending on device/firmware/network, the network might come up sooner or later.

This only has an impact on mysql users, who need the network right from the start, while "normal" sqlite users don't.

How do you make XBMC the launcher? If by a 3rd party app, you should ask them to include an option to wait for the net before launching XBMC.
Reply
#6
I don't know if this helps any, as I have said, just starting to understand android.

In the wiki there is some info on using a autostart.sh. I use part of it on my openelec boxes to slow boot to get my sound to work. Link to wiki 7 MySQL connection errors at start-up.

I use this in all my openelec devices

Code:
#! /bin/sh

sleep 5

Where do you have your mysql?
Reply
#7
autostart.sh is specific to OE and not applicable to android
Reply
#8
I'm using it as a launcher on my FTV, using a MySQL library, and haven't had any issues. I'm even on wifi.
You might try enabling XBMC's Wake On LAN function with the netinittimeout and netsettletime parameters.
Quote:netinittimeout [secs] time xbmc will wait for network to (re)connect when booting or after resuming from suspend-mode
netsettletime [milli secs] time to wait for network to be consistently connected before progressing
Reply
#9
I'll look into that, thanks ! By the way, is your FTV using a static or dynamic IP ?
Reply
#10
(2014-08-06, 05:43)SandmanCL Wrote: I'll look into that, thanks ! By the way, is your FTV using a static or dynamic IP ?

Static, but assigned/reserved by my router. Makes it easier for me to SSH to it when needed.
Reply
#11
(2014-08-05, 15:51)Tight_wad Wrote: I don't know if this helps any, as I have said, just starting to understand android.

In the wiki there is some info on using a autostart.sh. I use part of it on my openelec boxes to slow boot to get my sound to work. Link to wiki 7 MySQL connection errors at start-up.

I use this in all my openelec devices

Code:
#! /bin/sh

sleep 5

Where do you have your mysql?

The MySQL errors reported in the OpeneEec wiki you link to sound like the same problem and as such it would seem like a cross-platform issue impacting more people like myself, so thanks for confirming that I'm not crazy ;-)

My MySQL instance is hosted on an Ubuntu 14.04 server. Both server and FTV client are wired. The FTV has a dynamic IP.
Reply
#12
(2014-08-05, 16:57)elmerohueso Wrote: I'm using it as a launcher on my FTV, using a MySQL library, and haven't had any issues. I'm even on wifi.
You might try enabling XBMC's Wake On LAN function with the netinittimeout and netsettletime parameters.
Quote:netinittimeout [secs] time xbmc will wait for network to (re)connect when booting or after resuming from suspend-mode
netsettletime [milli secs] time to wait for network to be consistently connected before progressing

I tried adding these settings but that resulted in the network never getting initialized.
Reply
#13
No help, deleted
Reply
#14
I now have 3 Ftv boxes set up. My first one has been great so last night I set up two more. One did fine, the other has same issue as yours.

Only thing that I found was that this one did not have my movie source content set to anything at all. My Tv shows where set properly. So I changed my set content for source to movies and it has booted up without issues several different times now.
Reply
#15
I can load all of my sources just fine so in my case changing any of this behavior wouldn't have any impact...

Based on multiple accounts of people experiencing similar issues it would seem that something should be done with the way xbmc handles network initialization and remote mysql. The mysql setup should only be done once a proper network connectivity has been established.
Reply

Logout Mark Read Team Forum Stats Members Help
[AFTV] Network not initialized when running as launcher0