Pandora FMS Community

API Error 500 to generate graph

Giuseppe Paolo · 24 abr 2023, 15:48 · 7 mensajes · 79 visitas

API
  1. Inicio del debate

    Hello users!

    I'm having and error to generate graphs using API. Show error 500.

    Someone have issue like this? How can you solve it?

    With this url returns OK:

    (Link not available anymore)

    OK,v7.0NG.770,PC230413

    But with this URL, show error 500:

    (Link not available anymore)
    [HTTP/1.1 500 Internal Server Error 398ms]

    Thanks,

    Giuseppe Paolo Fontana Padilha

  2. Hi Giuseppe Paolo,

    I have not been able to replicate the problem.

    You can query the API as follows:

    https://X.X.X.X/pandora\_console/include/api.php?op=get&op2=module\_graph&id=YYYY&other=3600%7C1&other\_mode=url\_encode\_separator\_%7C&apipass=1234&api=1&user=admin&pass=pandora

    Change the XXXX for the Pandora FMS server IP and the YYYYY for the module ID.

    Then change the credentials of the API and your user.

    In case there is an error, can you check the console or apache logs?

    Best regards,

    Víc.

  3. Hi Vic, thanks for your asking... With your URL show the same error (Attached).

    About the error log from Apache, cannot show anything related to this issue... *

    * PS: I'm running PandoraFMS on Docker. (Then I access this docker with "exec -it /bin/bash", and get the error_log and access_log files.

    Thanks,

    Giuseppe Paolo Fontana Padilha

    Error-Pandora-ConsoleLog.jpg81 KB · JPG
    Error-Pandora-ConsoleLog.jpg
  4. Hi @vic ,

    Do you know how can I solve it?

    Thanks,

    Giuseppe Paolo Fontana Padilha

  5. My error is the same that related at Github: https://github.com/pandorafms/pandorafms/issues/220

    With Api Get Events works fine.

    I locate the error at /var/log/php-fpm/www-error.log:

    [28-Apr-2023 14:33:53 America/Sao_Paulo] Wrench\Exception\HandshakeException: No accept header receieved on handshake response in /var/www/html/pandora_console/vendor/chrome-php/wrench/src/Protocol/Protocol.php:469
    Stack trace:
    #0 /var/www/html/pandora_console/vendor/chrome-php/wrench/src/Client.php(243): Wrench\Protocol\Protocol->validateResponseHandshake()
    #1 /var/www/html/pandora_console/vendor/chrome-php/chrome/src/Communication/Socket/Wrench.php(99): Wrench\Client->connect()
    #2 /var/www/html/pandora_console/vendor/chrome-php/chrome/src/Communication/Connection.php(186): HeadlessChromium\Communication\Socket\Wrench->connect()
    #3 /var/www/html/pandora_console/vendor/chrome-php/chrome/src/Browser/BrowserProcess.php(146): HeadlessChromium\Communication\Connection->connect()
    #4 /var/www/html/pandora_console/vendor/chrome-php/chrome/src/BrowserFactory.php(81): HeadlessChromium\Browser\BrowserProcess->start()
    #5 /var/www/html/pandora_console/include/functions.php(4306): HeadlessChromium\BrowserFactory->createBrowser()
    #6 /var/www/html/pandora_console/include/functions_graph.php(848): generator_chart_to_pdf()
    #7 /var/www/html/pandora_console/include/functions_api.php(14539): grafico_modulo_sparse()
    #8 /var/www/html/pandora_console/include/api.php(346): api_get_module_graph()
    #9 {main}

    Thanks,

    Giuseppe Paolo Fontana Padilha

  6. I solve this situation returning to version 767 LTS. It's all ok now.

    Thanks,

    Giuseppe Paolo Fontana Padilha

Entra en tu cuenta para publicar.