JSON-RPC (port 9090) always disabled after restart

  • Hi,

    I'm new to LibreELEC so I'm not sure if this is intended or bug. I'm using Hyperion to control the LED backlight. It uses the JSON-RPC to detect Kodi state. However, the Kodi is not listening on port 9090 even it is enabled via the Settings->Services>Control->Allow remote control from applications on this system. If I disable it and reenable, then Kodi starts to listen on the port 9090. However after I restart my NUC, it is again not listening.

    According to Kodi documentation, the configuration is written to advancedsettings.xml file, but this file is located in /usr/share/kodi/system, which is in read-only.

    How to force LibreELEC/Kodi to always listen on port 9090?

    HW NUC 8i3BEK, LibreELEC-Generic.x86_64-9.2.0.img.gz

    Thanks,

    Radim

  • Update: It works, if I also enable "Allow remote control from applications on other systems". In this case the settings will be survive reset. This is not what I like, but at least the hyperion works as it should now. Maybe a bug in Kodi?

  • /storage/.kodi/userdata/advancedsettings.xml .. create it if required, it doesn't exist (as it's not needed) by default.

    chewitt

    This is only required when one wants to change the default port number (9090).

    In Kodi 10.0.4 only EventServer port (9777) is opened after restart despite the option "Allow remote control from applications on this system" being enabled.

    Code
    # netstat -tulp | grep kodi
    tcp        0      0 0.0.0.0:36666           0.0.0.0:*               LISTEN      1047/kodi.bin
    tcp        0      0 0.0.0.0:50152           0.0.0.0:*               LISTEN      1047/kodi.bin
    tcp        0      0 :::36666                :::*                    LISTEN      1047/kodi.bin
    udp        0      0 localhost:9777          0.0.0.0:*                           1047/kodi.bin

    After toggling the option JSON-RPC is initialized and the port 9090 is opened and allows connections.

    There is a warning in the log during boot regarding JSON-RPC not sure if it's relevant to the issue

    Code
    2023-02-13 03:55:47.383 T:1047  WARNING <general>: JSONRPC: Could not parse type "Setting.Details.SettingList"
    2023-02-13 03:55:47.383 T:1047     INFO <general>: JSONRPC: Adding type "Setting.Details.SettingList" to list of incomplete definitions (waiting for "Setting.Details.Setting")
    2023-02-13 03:55:47.384 T:1047     INFO <general>: JSONRPC: Resolving incomplete types/methods referencing Setting.Details.Setting
    2023-02-13 03:55:47.412 T:1047     INFO <general>: JSONRPC v12.4.0: Successfully initialized