Re: [squid-users] Problem with Squid3 Caches

2016-10-10 Thread Amos Jeffries
FYI: I am an IT consultant by trade. If you want private help I am happy
to do so after receiving a PayPal donation via the buttons at
.

Otherwise please keep the replies going to the list so others who know
the answers join in faster than I can reply, and everyone benefits.


On 9/10/2016 3:52 p.m., KR wrote:
> Hi Amos - 
> 
> So I believe I fixed the rock cache by specifying cache_dir /ssd1 5000 but 
> now I’m getting an error regarding writing to a file:
> 
> squid
> 2016/10/08 22:42:49| ALERT: setgid: (1) Operation not permitted
> WARNING: Cannot write log file: /var/log/squid/cache.log
> /var/log/squid/cache.log: Permission denied
>  messages will be sent to 'stderr'.
> 2016/10/08 22:42:49| ALERT: setgid: (1) Operation not permitted
> 
> Permissions are:
> 
> drwxr-xr-x 2 proxy proxy 4096 Oct  5 07:35 squid
> 
> So not sure why I’m getting this error.

That looks like Squid is not actually running as the user 'proxy', or
you are not starting it from an account that can change itself to be
that effective-user.

Squid-3 should be started by the root user, it will downgrade its
permissions before opening ports and handling traffic.

Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-07 Thread Amos Jeffries
On 7/10/2016 9:33 a.m., KR wrote:
> So I attempted to fix the cache reference in /var/etc/squid.conf but now I’m 
> getting the following:
> 
> FATAL: Bungled /etc/squid/squid.conf line 3410: cache_dir rock 
> /var/cache/squid 307200 16 256

That looks like the configuration for a UFS format directory, but
labeled as being a Rock format directory / database.

See the cache_dir documentation for what each one is supposed to be
configured with:


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-07 Thread Amos Jeffries
On 7/10/2016 9:02 a.m., KR wrote:
> Which script is that?
> 

Depends on which OS you have. For Linux it would be /etc/init.d/squid

Amos

>> On Oct 6, 2016, at 12:59 PM, Amos Jeffries wrote:
>>
>>> On 7/10/2016 3:30 a.m., KR wrote:
>>> Hello Amos,
>>>
>>> Yes, and when I try to specify only one cache dir by commenting out all of 
>>> the below, squid seems to automatically add them back in. 
>>
>> Hmm. Squid does not edit its own config file. Something else must be
>> doing that.
>>
>> Maybe the init script?
>>
>>
>> Amos
>>

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-06 Thread Amos Jeffries
On 6/10/2016 11:27 a.m., KR wrote:
> Hello Amos,
> 
> 
>> On Oct 5, 2016, at 9:07 AM, Amos Jeffries  wrote:
>>
>> On 5/10/2016 6:48 a.m., KR wrote:
>>> I uncommented that line and now I get
>>>
>>> Initializing the Squid cache with the command squid3 -f 
>>> /etc/squid/squid.conf -z ..
>>>
>>
>> Hmm. The 'squid3' package should have config files at /etc/squid3/*
>>
>> The 'squid' package has config files at /etc/squid/*
> 
> 
> It seems I have the /etc/squid/* package and NOT squid3.  Not sure why this 
> is referencing squid3.  What’s the difference?
> 

They packaged Squid-2 under the name 'squid' for many years, and
followed the 2.6/2.7 fork with that package name.
 while packaging Squid-3 as 'squid3'. Then when Squid-2 was dropped
Ubuntu migrated everyone to 'squid3' package.

The naming is finally getting back to being 'squid' with only latest
version available.



> 
>>> FATAL: Bungled /etc/squid/squid.conf line 3410: cache_dir rock /hdd1 ... 
>>> min-size=10
>>
>> Is that an exact copy-paste of the output?
>> Are the "..." characters really in your config file?
>>
>> If yes, the problem is that somebody has mindlessly cut-n-pasted
>> incomplete example config line(s) into your squid.conf.
>>
>> If no, then the problem is that you are hiding the broken piece of
>> config from us.
>>
>> Either way you have something to fix.
> 
> 
> That is exactly the error message I get.  It’s not in the config file.

That error message existing means the line *does* exist in the
squid.conf file you are loading.

The lack of '#' at the beginning of some lines you quoted below means
that those lines *are* being passed to Squid as active config to use.

> 
> # store_dir_select_algorithm round-robin
> # cache_dir rock /hdd1 ... min-size=10
> # cache_dir rock /ssd1 ... max-size=9
> # cache_dir rock /hdd2 ... min-size=10
> # cache_dir rock /ssd2 ... max-size=9
> # cache_dir rock /hdd3 ... min-size=10
> # cache_dir rock /ssd3 ... max-size=9
> cache_dir rock /ssd1 ... max-size=9
> cache_dir rock /hdd2 ... min-size=10
> cache_dir rock /ssd2 ... max-size=9
> cache_dir rock /hdd3 ... min-size=10
> cache_dir rock /ssd3 ... max-size=9
> 

That is a piece of example documentation being used blindly without
reading the actual documentation it is part of.

It is not even docs about the cache_dir directive!

The reason the "..." exist is that the documentation is explaining how
to use *store_dir_select_algorithm*. The settings other than the shown
ones are irrelevant for that documentation and being skipped.


Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-05 Thread Amos Jeffries
On 5/10/2016 6:48 a.m., KR wrote:
> I uncommented that line and now I get
> 
> Initializing the Squid cache with the command squid3 -f /etc/squid/squid.conf 
> -z ..
> 

Hmm. The 'squid3' package should have config files at /etc/squid3/*

The 'squid' package has config files at /etc/squid/*


> FATAL: Bungled /etc/squid/squid.conf line 3410: cache_dir rock /hdd1 ... 
> min-size=10

Is that an exact copy-paste of the output?
 Are the "..." characters really in your config file?

If yes, the problem is that somebody has mindlessly cut-n-pasted
incomplete example config line(s) into your squid.conf.

If no, then the problem is that you are hiding the broken piece of
config from us.

Either way you have something to fix.


> Squid Cache (Version 3.5.12): Terminated abnormally.

That is the version number from the Ubuntu 16.10 or later 'squid' package.

It should be started with the command 'squid', not 'squid3' as indicated
by the above lines.

Amos

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-04 Thread Antony Stone
On Tuesday 04 October 2016 at 19:43:21, KR wrote:

> > On Oct 4, 2016, at 11:45 AM, Antony Stone wrote:
> > 
> > On Tuesday 04 October 2016 at 17:00:24, KR wrote:
> >> Hello Anthony, Yuri,
> >> 
> >> It seems every line is commented out in the config?
> > 
> > Impossible - otherwise it couldn't generate the error message "FATAL:
> > Bungled /etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ..."
> > 
> > That is telling you that line 3467 of squid.conf starts with the
> > directive "cache_dir”.
> 
> I see, is there an easy way to omit all lines that begin with the # sign?

Well, grep?

eg: grep -v "^[^#]" will show all lines which start with something other than 
a # - in other words, it will omit blank lines and comments.

> The line in question is
> 
> # Uncomment and adjust the following to add a disk cache directory.
> #cache_dir ufs /var/spool/squid 100 16 256

Please confirm which file you are showing us the information from.

> > Standard Ubuntu?  Which version?
> 
> Standard and current.

So, 16.04?

> >> Attached are two screenshots that are suspect.
> > 
> > Er, what are those screenshots of?  It's certainly not the output of
> > Squid, or its config file.

An answer to this would be helpful.

> >> Ubuntu is running inside of a vm,
> > 
> > Er, so /ssd3 is not an actual SSD, then?  What is it?
> 
> I suspect it is an SSD drive

"Suspect"?

How have you set up this VM?  Is there an actual device mounted on /ssd3, or 
is it just some directory name in your VM?

> > I'm suspicious that you may be used webmin, and we've had someone here on
> > the list recently who installed Squid on Ubuntu along with webmin, and
> > we then found out that the package maintainer had put the documentation
> > file for squid.conf in place of the actual squid.conf.
> 
> I tried it both its webadmin

Please specify what yu mean by this - what is the "it" which "its" refers to 
above?

> and terminal to install.  Same result.  Squid seems to want a cache folder
> one very partition that exists.

I recommend you stop using any graphical tool to try to manage Squid, remove 
the package, and then simply:

1. Install the Squid (maybe called Squid3?  I can't quite recall for Ubuntu) 
package using apt-get or aptitude.

2. Edit the config file /etc/squid/squid.conf to your needs.

Hope that helps,


Antony.

-- 
"The future is already here.   It's just not evenly distributed yet."

 - William Gibson

   Please reply to the list;
 please *don't* CC me.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-04 Thread KR
I uncommented that line and now I get

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=10
Squid Cache (Version 3.5.12): Terminated abnormally.
CPU Usage: 0.008 seconds = 0.004 user + 0.004 sys
Maximum Resident Size: 114480 KB
Page faults with physical i/o: 6



> On Oct 4, 2016, at 11:45 AM, Antony Stone  
> wrote:
> 
> On Tuesday 04 October 2016 at 17:00:24, KR wrote:
> 
>> Hello Anthony, Yuri,
>> 
>> It seems every line is commented out in the config?
> 
> Impossible - otherwise it couldn't generate the error message "FATAL: Bungled 
> /etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ..."
> 
> Thta is telling you that line 3467 of squid.conf starts with the directive 
> "cache_dir".
> 
>> This is a fresh install.
> 
> Standard Ubuntu?  Which version?
> 
>> ls -al /ssd3 outputs:
>> 
>> total 8
>> drwxr-xr-x  2 root root 4096 Aug 13 18:20 .
>> drwxr-xr-x 30 root root 4096 Oct  3 13:49 ..
> 
> Hm, okay, so that really does exist on your machine, then...
> 
>> Attached are two screenshots that are suspect.
> 
> Er, what are those screenshots of?  It's certainly not the output of Squid, 
> or 
> its config file.
> 
>> Do I need all of these cache folders on every partition?
> 
> You can put your cache directories wherever you like.
> 
>> Ubuntu is running inside of a vm,
> 
> Er, so /ssd3 is not an actual SSD, then?  What is it?
> 
>> default installation method using the setup wizard.
> 
> I'm suspicious that you may be used webmin, and we've had someone here on the 
> list recently who installed Squid on Ubuntu along with webmin, and we then 
> found out that the package maintainer had put the documentation file for 
> squid.conf in place of the actual squid.conf.
> 
> It can still work (not everything is commented out) but it's *far* bigger 
> than 
> it needs to be, and is somewhat confusing to work with.
> 
> 
> Regards,
> 
> 
> Antony.
> 
> -- 
> It may not seem obvious, but (6 x 5 + 5) x 5 - 55 equals 5!
> 
>   Please reply to the list;
> please *don't* CC me.
> ___
> squid-users mailing list
> squid-users@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-04 Thread Antony Stone
On Tuesday 04 October 2016 at 17:00:24, KR wrote:

> Hello Anthony, Yuri,
> 
> It seems every line is commented out in the config?

Impossible - otherwise it couldn't generate the error message "FATAL: Bungled 
/etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ..."

Thta is telling you that line 3467 of squid.conf starts with the directive 
"cache_dir".

> This is a fresh install.

Standard Ubuntu?  Which version?

> ls -al /ssd3 outputs:
> 
> total 8
> drwxr-xr-x  2 root root 4096 Aug 13 18:20 .
> drwxr-xr-x 30 root root 4096 Oct  3 13:49 ..

Hm, okay, so that really does exist on your machine, then...

> Attached are two screenshots that are suspect.

Er, what are those screenshots of?  It's certainly not the output of Squid, or 
its config file.

> Do I need all of these cache folders on every partition?

You can put your cache directories wherever you like.

> Ubuntu is running inside of a vm,

Er, so /ssd3 is not an actual SSD, then?  What is it?

> default installation method using the setup wizard.

I'm suspicious that you may be used webmin, and we've had someone here on the 
list recently who installed Squid on Ubuntu along with webmin, and we then 
found out that the package maintainer had put the documentation file for 
squid.conf in place of the actual squid.conf.

It can still work (not everything is commented out) but it's *far* bigger than 
it needs to be, and is somewhat confusing to work with.


Regards,


Antony.

-- 
It may not seem obvious, but (6 x 5 + 5) x 5 - 55 equals 5!

   Please reply to the list;
 please *don't* CC me.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-03 Thread Antony Stone
On Monday 03 October 2016 at 20:55:07, Jason Alexander wrote:

> Greetings -
> 
> I’m trying to install squid on an Ubuntu workstation in a VM.  I install
> squid but unable to initialize caches.  I get the following error:
> 
> FATAL: Bungled /etc/squid/squid.conf line 3467: cache_dir rock /ssd3 ...

My guess is:

a) you have an email client which isn't correctly adding a plain text body

b) you do not have a directory /ssd3 on your computer

If either of those is incorrect, please follow Yuri's request to post your 
squid.conf (without comments or blank lines, please), but also add the output 
of:

ls -al /ssd3

from your machine.


Thanks,


Antony.

-- 
Tinned food was developed for the British Navy in 1813.

The tin opener was not invented until 1858.

   Please reply to the list;
 please *don't* CC me.
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users


Re: [squid-users] Problem with Squid3 Caches

2016-10-03 Thread Yuri Voinov

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
 
Show config.


04.10.2016 0:55, Jason Alexander пишет:
> Greetings -
>
> I’m trying to install squid on an Ubuntu workstation in a VM.  I
install squid but unable to initialize caches.  I get the following error:
>
> Initializing the Squid cache with the command squid3 -f
/etc/squid/squid.conf -z ..
>
> FATAL: Bungled /etc/squid/squid.conf line 3467: cache_dir rock /ssd3
... max-size=9
> Squid Cache (Version 3.5.12): Terminated abnormally.
> CPU Usage: 0.004 seconds = 0.004 user + 0.000 sys
> Maximum Resident Size: 115024 KB
> Page faults with physical i/o: 2
>
> Please advise how I may be able to fix this! Thank you.
>
> ~ KR
>
>
>
> ___
> squid-users mailing list
> squid-users@lists.squid-cache.org
> http://lists.squid-cache.org/listinfo/squid-users

-BEGIN PGP SIGNATURE-
Version: GnuPG v2
 
iQEcBAEBCAAGBQJX8qobAAoJENNXIZxhPexGhssH/i6ZgpGLflf9B+TQIwoQ7scn
llni2H6gliVz3AsB4usktPmU/slqe6EUjOkdsL/PPwv7i1C4xSyUs9V7D20uElmg
oIEzqTrfnU0tRmgaEEpKqE20XdtgbTDDgmGdiiJ0WAuxUes4KiNOoCpu9ZHjvkjF
rUCjL8itcZCzqZBdMK/QnHlTvcCMjvEfDeZspooLyYfDLLLHW/g77f4W/S/Zip9G
1yutt2v5omF3ExLTA4EXtvQ14pbCzgB9kjqqgdWHLcvQcLrgPpgZ5YVw5MXTOovF
nh6vMZGDcjJGUx3UMdj0VbxYK7yGzmIVZHRRR311EDEZ+I39pTCYi0QwymJgsa0=
=zWsi
-END PGP SIGNATURE-



0x613DEC46.asc
Description: application/pgp-keys
___
squid-users mailing list
squid-users@lists.squid-cache.org
http://lists.squid-cache.org/listinfo/squid-users