[squid-users] Can't store log in mysql 8.0 database
Francisco
frizquierdo87 at gmail.com
Fri Mar 3 19:22:27 UTC 2023
Hi, I\m trying to store logs in a mysql server 8.0 database from squid 5.7
in Debian 11.
My idea is store all logs in /var/log/squid/ dir, and logs from specifics
urls, domains and sites store in mysql database ('access_log_internet'
table) to restrict those users that overcuote an specific amount of MB.
*The config:*
*access_log /var/log/squid/nav_basica-access.log squid dominios*
* access_log /var/log/squid/nav_basica-access.log squid dominios_parciales *
* access_log /var/log/squid/nav_basica-access.log squid sitios *
* access_log /var/log/squid/nav_basica-access.log squid dominio_cu*
* access_log /var/log/squid/internet-access.log squid !dominios
!dominios_parciales !sitios !dominio_cu*
*logfile_daemon /usr/lib/squid/log_db_daemon*
*access_log
daemon:/192.168.56.2:3306/squidmgr/access_log_internet/squidmgr/squidmgrsquid
<http://192.168.56.2:3306/squidmgr/access_log_internet/squidmgr/squidmgrsquid>
!dominios !dominios_parciales !sitios !dominio_cu*
when try start squid, it's fail:
*Dec 31 19:00:00 1969Use of uninitialized value $DBI::errstr in
concatenation (.) or string at /usr/lib/squid/log_db_daemon line 403.Dec 31
19:00:00 1969Cannot connect to database: at /usr/lib/squid/log_db_daemon
line 403.Dec 31 19:33:43 1969/03/03 14:10:32| pinger: Initialising ICMP
pinger ...Dec 31 19:33:43 1969/03/03 14:10:32| pinger: ICMP socket
opened.Dec 31 19:33:43 1969/03/03 14:10:32| pinger: ICMPv6 socket openedDec
31 19:33:43 1969/03/03 14:10:32| Pinger exiting.Dec 31 19:33:43 1969/03/03
14:10:32 kid1| logfileHandleWrite:
daemon:/192.168.56.1:3306/squidmgr/access_log_internet/squidmgr/squidmgr
<http://192.168.56.1:3306/squidmgr/access_log_internet/squidmgr/squidmgr>:
error writing ((32) Broken pipe)Dec 31 19:33:43 1969/03/03 14:10:32 kid1|
Closing HTTP(S) port 192.168.56.2:8080 <http://192.168.56.2:8080>Dec 31
19:33:43 1969/03/03 14:10:32 kid1| storeDirWriteCleanLogs: Starting...Dec
31 19:33:43 1969/03/03 14:10:32 kid1| Finished. Wrote 134 entries.Dec 31
19:33:43 1969/03/03 14:10:32 kid1| Took 0.00 seconds (308045.98
entries/sec).Dec 31 19:33:43 1969/03/03 14:10:32 kid1| FATAL: I don't
handle this error well!Dec 31 19:33:43 1969/03/03 14:10:32 kid1| Squid
Cache (Version 5.7): Terminated abnormally.Dec 31 19:00:00 1969CPU Usage:
0.161 seconds = 0.132 user + 0.029 sysDec 31 19:00:00 1969Maximum Resident
Size: 109440 KBDec 31 19:00:00 1969Page faults with physical i/o: 0Dec 31
19:33:43 1969/03/03 14:10:32 kid1| Closing Pinger socket on FD 66Dec 31
19:33:43 1969/03/03 14:10:32| Removing PID file (/run/squid.pid)*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20230303/b066310c/attachment.htm>
More information about the squid-users
mailing list