Navigation

    Netgate Discussion Forum
    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search

    Suricata causing crashes - Uncaught ValueError: date_create_from_format():

    IDS/IPS
    2
    4
    44
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • G
      gwaitsi last edited by

      PHP errors

      PHP ERROR: Type: 1, File: /usr/local/www/widgets/widgets/suricata_alerts.widget.php, Line: 183, Message: Uncaught ValueError: date_create_from_format(): Argument #2 ($datetime) must not contain any null bytes in /usr/local/www/widgets/widgets/suricata_alerts.widget.php:183
      Stack trace:
      #0 /usr/local/www/widgets/widgets/suricata_alerts.widget.php(183): date_create_from_format('m/d/Y-H:i:s.u', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...')
      #1 /usr/local/www/widgets/widgets/suricata_alerts.widget.php(78): suricata_widget_get_alerts()
      #2 {main}
      thrown @ 2023-03-12 21:08:16
      PHP ERROR: Type: 1, File: /usr/local/www/widgets/widgets/suricata_alerts.widget.php, Line: 183, Message: Uncaught ValueError: date_create_from_format(): Argument #2 ($datetime) must not contain any null bytes in /usr/local/www/widgets/widgets/suricata_alerts.widget.php:183
      Stack trace:
      #0 /usr/local/www/widgets/widgets/suricata_alerts.widget.php(183): date_create_from_format('m/d/Y-H:i:s.u', '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00...')
      #1 /usr/local/www/widgets/widgets/suricata_alerts.widget.php(78): suricata_widget_get_alerts()
      #2 {main}
      thrown @ 2023-03-12 22:53:08
      
      1 Reply Last reply Reply Quote 0
      • bmeeks
        bmeeks last edited by

        That looks like an unexpected error in the data parsed from your alerts log file. Could that file have been corrupted? The date field should never be null in a properly formatted alerts log entry.

        G 1 Reply Last reply Reply Quote 0
        • G
          gwaitsi @bmeeks last edited by

          @bmeeks might explain it. the was a crash the other day for another reason

          bmeeks 1 Reply Last reply Reply Quote 0
          • bmeeks
            bmeeks @gwaitsi last edited by bmeeks

            @gwaitsi said in Suricata causing crashes - Uncaught ValueError: date_create_from_format()::

            @bmeeks might explain it. the was a crash the other day for another reason

            I would delete the alerts log file and let it repopulate with new data. You can try clearing the alerts using the control on the ALERTS tab. But it's entirely possible the code in that tab might crash or complain about the corrupt file since the dashboard widget and the ALERTS tab both read the same alerts log file.

            If that happens, you will need to manually delete the file from a shell prompt. You can find it in a subdirectory under /var/log/suricata/ named with the interface name and a UUID.

            1 Reply Last reply Reply Quote 0
            • Referenced by  NightlyShark NightlyShark 
            • First post
              Last post