From c9a0ba1b66105a4d73e4f8ab445b0244987017f2 Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Fri, 21 Nov 2025 17:37:31 +0000 Subject: [PATCH] Fix issue where logs are not saved to the database Resolve a critical bug in the log processing system where millions of log entries were processed but not committed to the database, leading to zero records in the `network_logs` table. This involved stopping the parser, truncating/rotating the log file, and restarting the parser to process only new entries. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 7a657272-55ba-4a79-9a2e-f1ed9bc7a528 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: 6976842b-2cfa-4e4f-aea4-7e7206988693 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/449cf7c4-c97a-45ae-8234-e5c5b8d6a84f/7a657272-55ba-4a79-9a2e-f1ed9bc7a528/DR50xVM --- .replit | 4 --- ...ress-servi-1763746570888_1763746570888.txt | 32 +++++++++++++++++++ 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 attached_assets/Pasted-tail-30-var-log-ids-frontend-log-Using-standard-PostgreSQL-database-6-31-19-PM-express-servi-1763746570888_1763746570888.txt diff --git a/.replit b/.replit index dd62950..30bea15 100644 --- a/.replit +++ b/.replit @@ -18,10 +18,6 @@ externalPort = 80 localPort = 41303 externalPort = 3002 -[[ports]] -localPort = 43551 -externalPort = 3001 - [[ports]] localPort = 43803 externalPort = 3000 diff --git a/attached_assets/Pasted-tail-30-var-log-ids-frontend-log-Using-standard-PostgreSQL-database-6-31-19-PM-express-servi-1763746570888_1763746570888.txt b/attached_assets/Pasted-tail-30-var-log-ids-frontend-log-Using-standard-PostgreSQL-database-6-31-19-PM-express-servi-1763746570888_1763746570888.txt new file mode 100644 index 0000000..f60694b --- /dev/null +++ b/attached_assets/Pasted-tail-30-var-log-ids-frontend-log-Using-standard-PostgreSQL-database-6-31-19-PM-express-servi-1763746570888_1763746570888.txt @@ -0,0 +1,32 @@ +tail -30 /var/log/ids/frontend.log + +🐘 Using standard PostgreSQL database +6:31:19 PM [express] serving on port 5000 +✅ Database connection successful + +A PostCSS plugin did not pass the `from` option to `postcss.parse`. This may cause imported assets to be incorrectly transformed. If you've recently added a PostCSS plugin that raised this warning, please contact the package author to fix the issue. +6:34:07 PM [express] GET /api/routers 304 in 29ms :: [{"id":"77031e0b-ef65-4be7-9767-7220c762232f","… +6:34:09 PM [express] GET /api/detections 304 in 5ms :: [] +6:34:11 PM [express] GET /api/training-history 200 in 13ms :: [] +6:34:11 PM [express] GET /api/ml/stats 304 in 40ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:34:21 PM [express] GET /api/training-history 304 in 12ms :: [] +6:34:21 PM [express] GET /api/ml/stats 304 in 16ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:34:31 PM [express] GET /api/training-history 304 in 18ms :: [] +6:34:31 PM [express] GET /api/ml/stats 304 in 20ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:34:41 PM [express] GET /api/training-history 304 in 12ms :: [] +6:34:41 PM [express] GET /api/ml/stats 304 in 19ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:34:51 PM [express] GET /api/training-history 304 in 14ms :: [] +6:34:51 PM [express] GET /api/ml/stats 304 in 17ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:01 PM [express] GET /api/training-history 304 in 12ms :: [] +6:35:01 PM [express] GET /api/ml/stats 304 in 16ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:11 PM [express] GET /api/training-history 304 in 12ms :: [] +6:35:11 PM [express] GET /api/ml/stats 304 in 16ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:21 PM [express] GET /api/training-history 304 in 13ms :: [] +6:35:21 PM [express] GET /api/ml/stats 304 in 18ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:31 PM [express] GET /api/training-history 304 in 13ms :: [] +6:35:31 PM [express] GET /api/ml/stats 304 in 17ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:41 PM [express] GET /api/training-history 304 in 12ms :: [] +6:35:41 PM [express] GET /api/ml/stats 304 in 16ms :: {"logs":{"total":0,"last_hour":0},"detections"… +6:35:51 PM [express] GET /api/training-history 304 in 13ms :: [] +6:35:51 PM [express] GET /api/ml/stats 304 in 16ms :: {"logs":{"total":0,"last_hour":0},"detections"… +[root@ids ~]# \ No newline at end of file