Menu

#5358 Ошибка: 500 - Perl execution failed – unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)")

1.940
open
Ilia
None
5
2020-03-06
2020-02-07
No

I use Webmin 1.941. Sometime, where loading "Stats History", get errors: "Ошибка: 500 - Perl execution failed – unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)")".
OS: Debian 8.11 / Linux 3.4.113-sun8i on armv7l.
Webmin language: Russian RU.UTF-8

1 Attachments

Discussion

  • Jamie Cameron

    Jamie Cameron - 2020-02-09

    Does anything get logged to /var/webmin/miniserv.error when this happens?

     
  • Andrej Taran

    Andrej Taran - 2020-02-11

    tail -f /var/webmin/miniserv.error

    Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
    [11/Feb/2020:13:53:28 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:53:34 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:53:46 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:02 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:20 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:28 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:34 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
    Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
    [11/Feb/2020:13:54:42 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:48 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:51 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    Use of uninitialized value $ip in concatenation (.) or string at /usr/share/webmin/system-status/system_info.pl line 39.
    [11/Feb/2020:13:54:57 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:54:59 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:55:02 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:55:05 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

    [11/Feb/2020:13:55:11 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10940.

     
  • Jamie Cameron

    Jamie Cameron - 2020-02-13
    • assigned_to: Jamie Cameron --> Ilia Rostovtsev
     
  • Ilia

    Ilia - 2020-02-13

    ..sometime, when loading "Stats History", get errors ..

    Can you describe sometimes? Besides, can you send me the content of the following directory: /etc/webmin/authentic-theme.

     
    • Andrej Taran

      Andrej Taran - 2020-02-13

      Webmin work after installation or upgrade from version 1.930. And I get errors always after reboot. "Stats History" show message "Loading..."

       
  • Ilia

    Ilia - 2020-02-13

    There is inconsistency what is considered to be valid among what allowed in JSON strings, and what is not allowed in ECMAscript string literals. :-(

    Besdies, @Andrej I have updated JSON:PP with the latest version, and updated convert_to_json sub.

    It should resolve your issue. After editing web-lib-funcs.pl file, you would need to restart Webmin, running:

    /etc/webmin/restart
    
     
  • Andrej Taran

    Andrej Taran - 2020-02-13

    I updated two files: PP.pm and web-lib-funcs.pl. Restarted webmin. But i get errors:
    [13/Feb/2020:15:38:35 +0200] [10.10.20.200] /stats.cgi : Perl execution failed : unexpected end of string while parsing JSON string, at character offset 17684 (before "(end of string)") at /usr/share/webmin/web-lib-funcs.pl line 10955. Line number changed to 10955.
    What json file parsed webmin with errors?

     
  • Ilia

    Ilia - 2020-02-13

    Okay, is there a way you can send me the content of /etc/webmin/authentic-theme?

     
  • Andrej Taran

    Andrej Taran - 2020-02-13

    In attachment

     
  • Andrej Taran

    Andrej Taran - 2020-02-13

    File stats-root.json was corrupted. I delete this file and webmin work without errors. :-)
    Please replace this file to /var/webmin and create new file after reboot.

     

    Last edit: Andrej Taran 2020-02-13
  • Ilia

    Ilia - 2020-02-13

    Well, sure thing but the question is how did you end up having that file being corrupted?

    It sounds like there is an improvement needed for convert_from_json sub. I'll study on the attached files when get back to PC.

    Thanks for your feedback!

     
  • Ilia

    Ilia - 2020-02-18

    Okay. I see now how you ended up with this error. I have made a patch to prevent this from happening in the future.

    Thanks for reporting! ;)

     
  • Andrej Taran

    Andrej Taran - 2020-03-06

    Ok. Last patch work very well. Thanks

     
  • Ilia

    Ilia - 2020-03-06

    Ok. Last patch work very well. Thanks

    Good to know! Thanks.

     

Log in to post a comment.

MongoDB Logo MongoDB