Posts by outcave

    Hi again.
    I never mentioned that I use a VPN because the VPN is NOT part of the problem, I have also tried to disable VPN (and disabled the VPN auto connect) and the behavior is the same, anyway see the new logs with VPN disabled:

    journalctl -a | pastebinit -> DNCB
    cat $HOME/.kodi/temp/kodi.log | pastebinit -> gBgJ

    Yes, VPN is working but thanks to a my workaround (shell script that fix the default route after the error "ERROR: Linux route add command failed: external program exited with error status: 2").

    The "linux route add 0.0.0.0/0 via GATEWAY_IP" problem is still here (also on LibreELEC v7.90.008) as you was able to see in my LibreELEC log.
    See here a my old post about that problem: OpenELEC Mediacenter - OpenELEC Forum - VPN Manager for OpenVPN (38/63)
    My FIX: OpenELEC Mediacenter - OpenELEC Forum - VPN Manager for OpenVPN (38/63)

    About VPN, I think the "route add 0.0.0.0/0 via GATEWAY_IP" problem that you say is solved is still there (also on LibreELEC v7.90.008) on connmand or busybox.
    Also because I cannot understand why connmand go to ADD the default route (route 0.0.0.0 gw 192.168.147.1) just after have deleted it...., see the bold lines:

    Nov 18 17:46:23 LibreELEC openvpn[278]: /sbin/ip addr add dev tun0 10.3.200.14/24 broadcast 10.3.200.255
    Nov 18 17:46:23 LibreELEC connmand[318]: tun0 {add} address 10.3.200.14/24 label tun0 family 2
    Nov 18 17:46:23 LibreELEC connmand[318]: tun0 {add} route 10.3.200.0 gw 0.0.0.0 scope 253 <LINK>
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {add} route 159.122.133.197 gw 192.168.147.1 scope 0 <UNIVERSE>
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {del} route 0.0.0.0 gw 192.168.147.1 scope 0 <UNIVERSE>
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {add} route 0.0.0.0 gw 192.168.147.1 scope 0 <UNIVERSE>

    Nov 18 17:46:23 LibreELEC openvpn[278]: ERROR: Linux route add command failed: external program exited with error status: 2
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {del} route 8.8.8.8 gw 192.168.147.1 scope 0 <UNIVERSE>
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {del} route 8.8.4.4 gw 192.168.147.1 scope 0 <UNIVERSE>
    Nov 18 17:46:23 LibreELEC connmand[318]: eth0 {del} route 192.168.147.1 gw 0.0.0.0 scope 253 <LINK>
    Nov 18 17:46:23 LibreELEC connmand[318]: tun0 {add} route 0.0.0.0 gw 10.3.200.254 scope 0 <UNIVERSE>

    The last line (route 0.0.0.0 gw 10.3.200.254) that is the new default gateway should be executed just after the first delete (route 0.0.0.0 gw 192.168.147.1).

    Anyway this route add/del problem is another problem that if you want we can talk on another thread.

    About the main problem (MySQL) I think the problem is that some Kodi stuff still starting before the network goes UP.
    Focus your attention to the time in the log files.
    The time starts at "18:52:40" but this is not the correct time (I started LibreELEC at about 21:54), this should be the time inside the LibreELEC release (Odroid C2 does not have a RTC).
    Well.. going on: LibreELEC starts to log MySQL error at "18:52:42".
    Kodi.sh starts at 18:52:44 (Oct 20 18:52:44 LibreELEC kodi.sh[420]: hwclock: ioctl 0x4024700a failed: Input/output error)

    Why kodi.sh start after the MySQL connections?

    Going on, connmand will go to DELETE the network interface:

    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} route 0.0.0.0 gw 192.168.147.1 scope 0 <UNIVERSE>
    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} route 8.8.8.8 gw 192.168.147.1 scope 0 <UNIVERSE>
    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} route 8.8.4.4 gw 192.168.147.1 scope 0 <UNIVERSE>
    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} route 192.168.147.1 gw 0.0.0.0 scope 253 <LINK>
    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} address 192.168.147.27/24 label eth0
    Oct 20 18:52:42 LibreELEC connmand[314]: eth0 {del} route 192.168.147.0 gw 0.0.0.0 scope 253 <LINK>


    And going on: the "Link is Up - 1000/Full" is 2 seconds later (at 18:52:44) these "eth0 del".

    Still going on, we have finally the eth0 add:


    Oct 20 18:52:44 LibreELEC kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
    Oct 20 18:52:44 LibreELEC connmand[314]: ipconfig state 3 ipconfig method 1
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} address 192.168.147.27/24 label eth0 family 2
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} route 192.168.147.0 gw 0.0.0.0 scope 253 <LINK>
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} route 192.168.147.1 gw 0.0.0.0 scope 253 <LINK>
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} route 8.8.8.8 gw 192.168.147.1 scope 0 <UNIVERSE>
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} route 8.8.4.4 gw 192.168.147.1 scope 0 <UNIVERSE>
    Oct 20 18:52:44 LibreELEC connmand[314]: eth0 {add} route 0.0.0.0 gw 192.168.147.1 scope 0 <UNIVERSE>

    and just later the NTP update:


    Oct 20 18:52:44 LibreELEC connmand[314]: ntp: time slew +2520110.999889 s
    Nov 18 21:54:35 LibreELEC systemd[1]: Time has been changed

    How is it possible that LibreELEC strats the MySQL connection before the network interface goes UP?
    Why connmand will go to "eth0 del" before "eth0 add"?
    If this "eth0 del" before the "eth0 add" is correct, I expect that all Kodi stuff will starts just after these "eth0 add".....

    Also with 'systemctl restart kodi' same behavior.
    [hr]


    Ok, I want to put another update.

    I did setup the "WAIT FOR NETWORK" in the advanced network settings, restarted, and now it works!

    So, please try that as well.

    Regards!

    WAIT FOR NETWORK is already enabled in LibreELEC settings (up to 10 seconds)
    [hr]
    but... when I execute 'systemctl restart kodi' on the screen I see the Kodi logo for lots of seconds (about 10 seconds...) so.. does WAIT FOR NETWORK really works?
    Is not possible that Kodi will wait these 10 seconds (also if networks is already UP) and later goes in timeout and Kodi think that the network is still not yet started?


    outcave can you post the output from "journalctl -a | pastebinit" and the corresponding kodi.log - this would allow us to see when the network is coming up, and what kodi is doing at that time. But it does appear to be a "network wait" type issue, strange it's not working...

    Hi Milhouse

    "journalctl -a | pastebinit" -> aBXM

    cat $HOME/.kodi/temp/kodi.log | pastebinit -> DFRX

    Hi Milhouse, I'm sorry but the behavior is the same:
    Before:

    After your release:

    Here the DEBUG log: NaUn8TWr


    I have the feeling that some Kodi stuff starts, in LibreELEC, before the network goes UP, see for example the row 738 and some next. The "LibreELEC Addon" fails due to a "Temporary failure in name resolution". But from the shell I can correctly resolve releases.libreelec.tv
    Also the MySQL connection is even before at row 481.. so how is it possible that it can connect to MySQL Server at that time (18:52:42) if later (at 18:52:44) cannot resolve an hostname?

    So I think that most of the Kodi staff, in LibreELEC, wrongly starts before the network goes UP (my feeling).

    Hi.
    I'm trying to have a "central" video library using MySQL, so all my Kodi devices will have the same and synchronized library.
    I followed this guide: MySQL - Official Kodi Wiki
    It's an easy setup but I was not able to get working.
    When my LibreELEC (Krypton) v7.90.008 ALPHA on Odroid C2 starts is not able to access to MySQL server (or this is the error) and it's not able to create the new Database (or this is the error).
    See here the errors on LibreELEC side:

    This is my advancedsettings.xml on LibreELEC:

    On MySQL Server side I have:

    - Raspberry Pi 2 running MySQL version 5.5.52 (Linux raspberrypi 4.4.32-v7+ #925 SMP Wed Nov 16 21:39:23 GMT 2016 armv7l GNU/Linux)
    - MySQL listening IP "bind-address" setted to 0.0.0.0 (it means all IPs)
    - The port 3306 is opened and working
    - No firewall
    - I use others applications that use (connect, query, insert, etc..) other databases/instances on the same MySQL Server
    - MySQL listen correctly on 0.0.0.0 port 3306, see here:

    Code
    root@raspberrypi:~# netstat -a | grep -i sql
    tcp        0      0 *:mysql                 *:*                     LISTEN
    tcp        0      0 localhost:mysql         localhost:50170         ESTABLISHED
    tcp        0      0 localhost:50170         localhost:mysql         ESTABLISHED
    unix  2      [ ACC ]     STREAM     LISTENING     7159     /var/run/mysqld/mysqld.sock
    unix  3      [ ]         STREAM     CONNECTED     7775     /var/run/mysqld/mysqld.sock

    I was able to connect to MySQL over network:

    MySQL "kodi" user grants are OK:

    Code
    mysql> SHOW GRANTS FOR 'kodi';
    +--------------------------------------------------------------------------------------------------------------+
    | Grants for kodi@%                                                                                            |
    +--------------------------------------------------------------------------------------------------------------+
    | GRANT ALL PRIVILEGES ON *.* TO 'kodi'@'%' IDENTIFIED BY PASSWORD '*2249595D6A53B38A77AA4AB2091D9B1A71F88735' |
    +--------------------------------------------------------------------------------------------------------------+
    1 row in set (0.00 sec)

    Then on MySQL side is all OK.

    The problem seem that LibreELEC does NOT connect to the database, I mean no MySQL ethernet traffic over the LAN from LibreELEC to MySQL Server....
    See there a "tcpdump" executed on MySQL Server (192.168.147.6) when LibreELEC boot:

    As you can see LibreELEC (IP 192.168.147.27) does NOT try to connect to MySQL Server (tcpdump shows only netbios requests), there are NOT any requests/connections to MySQL (port 3306).
    FYI, If I execute a "crude" telnet to MySQL Server on port 3306 from LibreELEC I can access to that port....

    Any ideas?
    Thanks!

    The vast majority of our users doesn't care for those tools. Those who do, can easily add them via addons as already explained.

    Adding all sorts of tools or addons by default will only have LibreELEC grow in size, which is not something we want. LibreELEC needs to be a lean (and mean) piece of software, and not turn into bloatware. :angel:

    I think that 1 Megabyte of space is sufficient to include it in the release by default....