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

Suricata causing crashes - Uncaught ValueError: date_create_from_format():

Scheduled Pinned Locked Moved IDS/IPS
4 Posts 2 Posters 564 Views
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.
  • 4
    4o4rh
    last edited by Mar 13, 2023, 8:52 AM

    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
    • B
      bmeeks
      last edited by Mar 13, 2023, 1:57 PM

      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.

      4 1 Reply Last reply Mar 13, 2023, 7:10 PM Reply Quote 0
      • 4
        4o4rh @bmeeks
        last edited by Mar 13, 2023, 7:10 PM

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

        B 1 Reply Last reply Mar 13, 2023, 7:15 PM Reply Quote 0
        • B
          bmeeks @4o4rh
          last edited by bmeeks Mar 13, 2023, 7:15 PM Mar 13, 2023, 7:15 PM

          @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
          • N NightlyShark referenced this topic on Mar 26, 2023, 3:51 PM
          1 out of 4
          • First post
            1/4
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
            This community forum collects and processes your personal information.
            consent.not_received