Menu

#4523 Can't initialize Squid cache because cache_dir won't be set by Webmin.

1.720
closed-fixed
nobody
6
2017-01-02
2014-12-17
Hadi Rezaee
No

Hello.
I installed squid with Webmin and made a user for it, and tried to initialize the cache, but i got this:

2014/12/17 16:07:30 kid1| Creating missing swap directories
2014/12/17 16:07:30 kid1| No cache_dir stores are configured.

So apparently you can fix this by login into ssh and editting squid's config file itself, by uncommenting the cache_dir line.
Perhaps it'd be awesome if Webmin did this by default?

Cheers
Hadi

Discussion

  • Jamie Cameron

    Jamie Cameron - 2014-12-17
    • status: open --> closed-fixed
     
  • Jamie Cameron

    Jamie Cameron - 2014-12-17

    Thanks for pointing this out - the cache directory will be automatically un-commented in the next Webmin release.

     
  • Dmitriy Vladimirovich

    bug back again
    when initializing cache on fresh install Webmin and Ubuntu 14.04 x64 got:

    nitializing the Squid cache with the command squid3 -f /etc/squid3/squid.conf -z ..
    FATAL: Bungled /etc/squid3/squid.conf line 3001: cache_dir ufs Directory-Name Mbytes L1 L2 [options]
    Squid Cache (Version 3.3.8): Terminated abnormally.
    CPU Usage: 0.009 seconds = 0.006 user + 0.003 sys
    Maximum Resident Size: 149360 KB
    Page faults with physical i/o: 0
    Failed to re-start Squid ..
    FATAL: Bungled /etc/squid3/squid.conf line 3001: cache_dir ufs Directory-Name Mbytes L1 L2 [options]
    Squid Cache (Version 3.3.8): Terminated abnormally.
    CPU Usage: 0.010 seconds = 0.003 user + 0.006 sys
    Maximum Resident Size: 36368 KB
    Page faults with physical i/o: 0

    problem imho when uncommenting lines near cache dir settings in /etc/squid3/squid.conf:

    ~~~~~~~~~~~~~~~~~~~~~~~~~~

    Default:

    No disk cache. Store cache ojects only in memory.

    Uncomment and adjust the following to add a disk cache directory.

    cache_dir Type Directory-Name Fs-specific-data [options]
    cache_dir ufs Directory-Name Mbytes L1 L2 [options]
    cache_dir aufs Directory-Name Mbytes L1 L2 [options]
    cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
    cache_dir rock Directory-Name Mbytes <max-size=bytes> [options]
    cache_dir is used.
    cache_dir Type Directory-Name Fs-specific-data [options]
    cache_dir ufs Directory-Name Mbytes L1 L2 [options]
    cache_dir aufs Directory-Name Mbytes L1 L2 [options]
    cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
    cache_dir rock Directory-Name Mbytes <max-size=bytes> [options]
    cache_dir ufs /var/spool/squid3 100 16 256
    cache_dir is used.</max-size=bytes></max-size=bytes>

    TAG: store_dir_select_algorithm

    <----->How Squid selects which cache_dir to use when the response

    <----->object will fit into more than one.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

     
  • Jamie Cameron

    Jamie Cameron - 2015-03-04
     
  • Jamie Cameron

    Jamie Cameron - 2015-03-04

    Ok, that looks like a separate bug - which I'll fix in the next Webmin release.

     
  • DDT2007

    DDT2007 - 2015-11-09

    The bug that Dmitriy posted about back in March 2015 is still with us using Webmin 1.770 and Squid 3.3.8 in Ubuntu 14.04 and 15.10:

    FATAL: Bungled /etc/squid3/squid.conf line 3037: cache_dir rock Directory-Name Mbytes <max-size=bytes> [options]
    Squid Cache (Version 3.3.8): Terminated abnormally.
    CPU Usage: 0.005 seconds = 0.000 user + 0.005 sys
    Maximum Resident Size: 145056 KB
    Page faults with physical i/o: 0
    

    Bungled conf file includes these lines:

    #   cache_dir is used.
    cache_dir is used.
    cache_dir ufs /var/spool/squid3 100 16 256
    cache_dir rock Directory-Name Mbytes <max-size=bytes> [options]
    cache_dir diskd Directory-Name Mbytes L1 L2 [options] [Q1=n] [Q2=n]
    cache_dir aufs Directory-Name Mbytes L1 L2 [options]
    cache_dir ufs Directory-Name Mbytes L1 L2 [options]
    cache_dir Type Directory-Name Fs-specific-data [options]
    #
    

    Please fix this bug once and for all.

     

    Last edit: DDT2007 2015-11-09
  • Jamie Cameron

    Jamie Cameron - 2015-11-10

    The next Webmin release will better check for valid cache_dir lines, which should fix this once and for all.

     
  • Rodrigo Ariel Pizarro

    Hello, i repor this same problem, when are u fixed, when is the prox release? thnks

     
  • Jamie Cameron

    Jamie Cameron - 2017-01-02

    Thanks, I will follow up on that thread.

     

Log in to post a comment.