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

Suricata PHP Error Line: 183, Message: Uncaught ValueError: date_create_from_format():

Scheduled Pinned Locked Moved IDS/IPS
5 Posts 3 Posters 521 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 Dec 22, 2023, 4:04 PM

    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-12-22 16:00:
    
    4 1 Reply Last reply Dec 22, 2023, 8:21 PM Reply Quote 0
    • 4
      4o4rh @4o4rh
      last edited by Dec 22, 2023, 8:21 PM

      @gwaitsi i am suddely getting this on mass after changing from legacy to inline.

      1 Reply Last reply Reply Quote 0
      • B
        bmeeks
        last edited by bmeeks Dec 23, 2023, 4:30 PM Dec 23, 2023, 4:29 PM

        I think I may have forgotten to port some fixes I did for that error on the ALERTS and BLOCKS tabs into the Dashboard Widget as well.

        Let me check on that. The error is caused by either a blank line in the alerts.log file or an invalid timestamp entry. Usually it's a blank line that should be skipped.

        If you want an instant fix, search through the active alerts.log file in /var/log/suricata/suricata_xxxyyyy/ to find and delete any blank lines.

        P 1 Reply Last reply Jan 19, 2024, 10:13 PM Reply Quote 1
        • P
          PF_User @bmeeks
          last edited by Jan 19, 2024, 10:13 PM

          @bmeeks Thank you for the information I just started having the same problem I also shrunk the file size so its getting rotated more often.

          1 Reply Last reply Reply Quote 0
          • B
            bmeeks
            last edited by Feb 9, 2024, 4:09 PM

            This bug will be fixed in the next Suricata package update which is posted for the Netgate developer team to review and merge. The new package version with the fix will be 7.03. Look for it to post in the near future.

            1 Reply Last reply Reply Quote 0
            • First post
              Last post
            Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
              [[user:consent.lead]]
              [[user:consent.not_received]]