Menu

SQUID Initialize Cache Fail

Webmin
Jim Layton
2017-01-01
2017-01-21
  • Jim Layton

    Jim Layton - 2017-01-01

    Hi All,

    Latest Webmin and SQUID on Linuxlite whihc I believe is Debian9. Install seems to go fine but fails to enable cache with-
    FATAL: Bungled /etc/squid3/squid.conf line.....

    I tried uncommenting the suggested line-

    cache_dir ufs /var/spool/squid3 100 16 256

    This does not work

    Tried the suggestion here-
    https://sourceforge.net/p/webadmin/bugs/4523/

    This does not work.

    It is also not a permission error. Actually it looks like it might be a long standing Webmin bug. One thing I noticed is several variables including "..." in the conf file. It looks like the conf file itself may be bad or is getting rewriten somehow. Also of not is no SQUID3 folders anywhere to be found which seem to get referenced in the cache config in Webmin.

    I'm at a loss. This should not be that difficult. I feel like I'm missing something here. SQUID can run without any cache or so I'm told.

     
  • Jim Layton

    Jim Layton - 2017-01-02

    Exact error after uncommenting suggested line-

    Initializing the Squid cache with the command squid3 -f /etc/squid/squid.conf -z ..

    FATAL: Bungled /etc/squid/squid.conf line 3410: cache_dir rock /hdd1 ... min-size=100000
    Squid Cache (Version 3.5.12): Terminated abnormally.
    CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
    Maximum Resident Size: 155872 KB
    Page faults with physical i/o: 0

    Suspect lines of the conf-

    cache_dir rock /hdd1 ... min-size=100000
    cache_dir rock /ssd1 ... max-size=99999
    cache_dir rock /hdd2 ... min-size=100000
    cache_dir rock /ssd2 ... max-size=99999
    cache_dir rock /hdd3 ... min-size=100000
    cache_dir rock /ssd3 ... max-size=99999

    This is how they are actually written. The three dots included.

     
  • Jamie Cameron

    Jamie Cameron - 2017-01-02

    Can someone who is seeing this please attach their entire squid config file to this thread? Or to this bug report : https://sourceforge.net/p/webadmin/bugs/4523/

     
  • Jim Layton

    Jim Layton - 2017-01-02

    I am away from my office but will tomorrow. I also could not find a default config file anywhere in the wild.

    I eventually got this to work by manually adding the values "100 16 256" as seen below-

    cache_dir rock /hdd1 ... min-size=100000
    Becomes
    cache_dir rock /hdd1 100 16 256
    And so on for each reference

    After this the cache directories will build but SQUID is unable to write to the log file directory and throws another error. I then changed the user in Webmin to an administrator account and it finishes.

    Squid however still fails to start after all this. When you click on the "Start SQUID" button it executes a SQUID3 service which does not exist. Apparently at one point it was called SQUID3 or perhaps some distros create SQUID3 folders but either way it fails to run.. I'm not sure if this is a SQUID problem or a Webmin problem or a Debian problem.

    I then installed SQUID for Windows on one of our 2012r2 servers and it runs perfectly out of the box. Mind you I'm not blaming this on Webmin but SQUID is ridiculously complicated to get running on Linux.

     

    Last edit: Jim Layton 2017-01-02
  • Elizabeth

    Elizabeth - 2017-01-16

    I just tried to install Squid through Webmin and ran into the exact same problem.

    I made a little more progress by going to "Module Config" and removing the number 3 from all references. This allows the Start Squid and Stop Squid buttons to work correctly.

    I did some research on the cache_dir rock lines. Apparently the default config is completely broken. I tried to remove all of the rock lines since it already has UFS cache. However, every time I hit initialize cache it re-creats the rock lines. Making further progress impossible

    At this point I'm giving up on the idea of running Squid through Webmin because even if I manually adjust the config file Webmin keeps overwriting it every time.

    I am running Webmin 1.831 and Squid 3.5.12 and Ubuntu Server 16.10.

     
  • patrick

    patrick - 2017-01-18

    Setting up an old laptop for my 5 y.o. nephew and using Webmin as the parental control interface for squid/dansguardian. I just ran into this issue as well.

    All of the current latest versions for Ubuntu/Webmin/Squid/Dansguardian.

    Here's the exact error message:

    Stopping squid ...
    .. Done
    
    Initializing the Squid cache with the command squid -f /etc/squid/squid.conf -z ..
    
    FATAL: Bungled /etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ... max-size=99999
    Squid Cache (Version 3.5.12): Terminated abnormally.
    CPU Usage: 0.012 seconds = 0.012 user + 0.000 sys
    Maximum Resident Size: 100912 KB
    Page faults with physical i/o: 0
    
    Failed to re-start Squid ..
    
    FATAL: Bungled /etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ... max-size=99999
    Squid Cache (Version 3.5.12): Terminated abnormally.
    CPU Usage: 0.012 seconds = 0.008 user + 0.004 sys
    Maximum Resident Size: 39568 KB
    Page faults with physical i/o: 0
    

    Here's my Webmin squid settings:

    • Generate all calamaris reports? - Yes
    • Calamaris output format - HTML
    • Extra Calamaris command-line parameters -
    • Maximum log lines to pass to calamaris - Unlimited
    • Encryption method for proxy passwords - crypt md5base64
    • Sort proxy users - Yes
    • Show stop/start/apply buttons - Both
    • Create proxy users when creating system users - No
    • Update proxy users when updating system users - Yes
    • Delete proxy users when deleting system users - Yes
    • Full path to squid config file - /etc/squid/squid.conf
    • Command to start squid Automatic - /etc/init.d/squid start
    • Command to stop squid Automatic - /etc/init.d/squid stop
    • Command to apply changes Automatic - /etc/init.d/squid restart
    • Squid executable - squid
    • Full path to PID file - /var/run/squid.pid
    • Full path to squid cache directory - /var/spool/squid
    • Squid cachemgr.cgi executable - /usr/lib/cgi-bin/cachemgr.cgi
    • Full path to squid log directory - /var/log/squid
    • Path to calamaris log analysis program - calamaris
    • Path to squidclient program - squidclient

    Here's what I changed in squid.conf to get it working

    1.) Uncommented on line 3410:
    cache_dir ufs /var/spool/squid 100 16 256

    2.) Commented out on lines 3467-3472:

    cahe_dir rock /hdd3 ... min-size=100000
    cache_dir rock /ssd2 ... max-size=99999
    cache_dir rock /hdd2 ... min-size=100000
    cache_dir rock /ssd1 ... max-size=99999
    cache_dir rock /hdd1 ... min-size=100000
    

    3.) Kept line 3473 active:
    cache_dir ufs /var/spool/squid 100 16 256

    4.) Restarted squid from the terminal
    sudo /etc/init.d/squid restart

    5.) Reloaded webmin squid module and all seems well so far!

    Attached is my squid.conf file
    Thank you for your effort in resolving this for future release.

     
  • patrick

    patrick - 2017-01-21

    Checking back in. Scratch #3 above. It results in duplicate entries.

    My settings are still not right as I cannot view the cache. I get an HTTP header error instead. I'm going to keep trying some things and will report back if I make any progress.

    BTW:
    For Those Experiencing This Issue

    Changing all occurances of "squid3" to "squid" in the module config, as well as correcting several paths (actually search for each file/directory on YOUR system), Uncommenting line 3410, Commenting out lines 3467-3473, restarting squid and webmin from the terminal with sudo /etc/init.d/squid restart && sudo /etc/init.d/webmin restart (make sure the squid command(s) are listed (without "sudo") in your module config or the start/stop/restart buttons will fail). Logout and log back in to webmin and the squid module will work fine except for a few small quirks. You can at least start/stop/restart squid, change squid settings, change cache settings, clear/initialize cache, and most main functionality.

    The default Webmin settings flat-out don't work. Take the time to confirm and verify each and every module option with YOUR system. This is not a plug-and-play module and also requires squid already be properly configured, or at-least able to start the service successfully from a terminal.

     

    Last edit: patrick 2017-01-21

Log in to post a comment.

MongoDB Logo MongoDB