Squid3 + transparent mode - somtehing is wrong here.



  • Hey i recently installed the squid3 package and configured it to run in transparent mode.

    i am getting this error in  /var/squid/logs/cache.log
    i have tried to runs squid -z as suggested but when i am entering the command in ssh, web gui or in the console. then nothing happens and the marker isn't evening blinking ? i have tried to wait for like 12 hours when i wasn't home and the machine hasn't finished yet?

    [2.2.1-RELEASE][admin@pfSense.localdomain]/root: 2015/03/24 17:19:06 kid1| Creating missing swap directories 
    

    2015/03/24 00:00:10 kid1| Starting Squid Cache version 3.4.10 for amd64-portbld-freebsd10.1…
    2015/03/24 00:00:10 kid1| ERROR: /var/squid/cache/0C: (2) No such file or directory
    FATAL: Failed to verify one of the swap directories, Check cache.log
    for details.  Run 'squid -z' to create swap directories
    if needed, or if running Squid for the first time.
    Squid Cache (Version 3.4.10): Terminated abnormally.
    CPU Usage: 0.079 seconds = 0.048 user + 0.032 sys
    Maximum Resident Size: 117472 KB
    Page faults with physical i/o: 0



  • Disk problem perhaps?  Anything in the System log when it happens?  Are you using the default folder structure or did you make changes?  I've seen it take some time to create a large structure, but nothing like 12 hours.



  • I dont think it is disk problems because everything else is working like a charm ;)
    But i noticed my real time monitor (in the proxy server > real time) is completly empty and dosn't show anything?

    This is my system log from last night

    |

    Mar 24 00:00:00 pfSense php: swapstate_check.php: Creating Squid cache dir /var/squid/cache
    Mar 24 00:00:00 pfSense php: swapstate_check.php: Creating squid cache subdirs in /var/squid/cache
    Mar 24 00:00:00 pfSense squid[75848]: Squid Parent: (squid-1) process 14690 exited due to signal 6 with status 0
    Mar 24 00:00:00 pfSense kernel: pid 14690 (squid), uid 62: exited on signal 6
    Mar 24 00:00:03 pfSense squid[75848]: Squid Parent: (squid-1) process 98964 started
    Mar 24 00:00:03 pfSense (squid-1): Failed to verify one of the swap directories, Check cache.log for details.  Run 'squid -z' to create swap directories if needed, or if running Squid for the first time.
    Mar 24 00:00:03 pfSense squid[75848]: Squid Parent: (squid-1) process 98964 exited with status 1
    Mar 24 00:00:05 pfSense php: swapstate_check.php: The command '/usr/pbi/squid-amd64/sbin/squid -k kill -f /usr/pbi/squid-amd64/local/etc/squid/squid.conf' returned exit code '1', the output was 'squid: ERROR: Could not send signal 9 to process 14690: (3) No such process'
    Mar 24 00:00:05 pfSense squid[12673]: Squid Parent: will start 1 kids
    Mar 24 00:00:05 pfSense squid[12673]: Squid Parent: (squid-1) process 13229 started
    Mar 24 00:00:06 pfSense squid[75848]: Squid Parent: (squid-1) process 13669 started
    Mar 24 00:00:07 pfSense (squid-1): Failed to verify one of the swap directories, Check cache.log for details.  Run 'squid -z' to create swap directories if needed, or if running Squid for the first time.
    Mar 24 00:00:07 pfSense squid[75848]: Squid Parent: (squid-1) process 13669 exited with status 1
    Mar 24 00:00:10 pfSense squid[75848]: Squid Parent: (squid-1) process 14559 started
    Mar 24 00:00:10 pfSense (squid-1): Failed to verify one of the swap directories, Check cache.log for details.  Run 'squid -z' to create swap directories if needed, or if running Squid for the first time.
    Mar 24 00:00:10 pfSense squid[75848]: Squid Parent: (squid-1) process 14559 exited with status 1
    Mar 24 00:00:12 pfSense squid[12673]: Squid Parent: (squid-1) process 13229 exited with status 0
    Mar 24 00:00:12 pfSense php: swapstate_check.php: Squid cache and/or swap.state exceeded size limits. Removing and rotating. File was 2394720 bytes, 0% of total disk space.
    Mar 24 00:00:13 pfSense squid[75848]: Squid Parent: (squid-1) process 18820 started |



  • For whatever reason, it is not able to write to that location.  Squid does not create its folder structure every time it starts.  If you shell in and run:

    ls -l /var/squid

    Who owns the cache folder?  Is it proxy or something else?

    What happens if you create /var/squid/cache2 and then change your hard disk cache location to match?



  • hmm that is weird, because the cache folder is getting bigger and bigger

     ls -l /var/squid
    total 16
    drwxr-xr-x   2 proxy  proxy  512 Mar 20 19:15 acl
    drwxr-xr-x  18 proxy  proxy  512 Mar 24 17:19 cache
    drwxr-xr-x   3 proxy  proxy  512 Mar 13 18:35 lib
    drwxr-xr-x   2 proxy  proxy  512 Mar 24 19:09 logs
    
    /var/squid/cache: du -hs
     41M	.
    


  • Do you have it set to clear your cache on log rotation?

    https://forum.pfsense.org/index.php?topic=88785.0



  • actually i do ;) i am going to diasble it an see what happends



  • I got the same error with /var being in RAM not on disk