squid writes to /var/log/messages

classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

squid writes to /var/log/messages

sampei02@tiscali.it
With Squid 4.8 and rsyslogd 8.24, I noted some Squid logs in /var/log/messages, .e.g " ipcacheParse No Address records…” or “ Starting new redirector helpers…”.
I configured log Squid to default options, excluded for "access_log /var/log/squid/access.log” instead of "access_log /var/log/squid/access.log squid”
Where can I find answer because Squid writes to /var/log/messages too?


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

sampei02@tiscali.it
Ok, I noted these 2 squid processes:

root /usr/sbin/squid -sYC
squid       (squid-1) --kid squid-1 -sYC

-s means "Enable logging to syslog”

This option ‘-s’ could explain writing to messages ?

> On 21 Dec 2020, at 09:14, NgTech LTD <[hidden email]> wrote:
>
> Hey Sampei,
>
> It's recommended you would send a squid.conf so we would try to
> understand what might cause the issue you are writing about.
>
> Thanks,
> Eliezer
>
> On Mon, Dec 21, 2020 at 9:07 AM [hidden email] <[hidden email]> wrote:
>>
>> With Squid 4.8 and rsyslogd 8.24, I noted some Squid logs in /var/log/messages, .e.g " ipcacheParse No Address records…” or “ Starting new redirector helpers…”.
>> I configured log Squid to default options, excluded for "access_log /var/log/squid/access.log” instead of "access_log /var/log/squid/access.log squid”
>> Where can I find answer because Squid writes to /var/log/messages too?
>>
>>
>> _______________________________________________
>> squid-users mailing list
>> [hidden email]
>> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Amos Jeffries
Administrator
On 21/12/20 9:55 pm, [hidden email] wrote:
> Ok, I noted these 2 squid processes:
>
> root /usr/sbin/squid -sYC
> squid       (squid-1) --kid squid-1 -sYC
>
> -s means "Enable logging to syslog”
>
> This option ‘-s’ could explain writing to messages ?

Squid does not write to /var/log/messages. On startup before Squid reads
any configuration about whether cache.log or syslog is to be used it
logs to stderr.

That stderr channel is handled by whatever init system or shell is
starting Squid. /var/log/messages is the init system log file.


Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Ambrose LI
On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:

> On 21/12/20 9:55 pm, [hidden email] wrote:
> > Ok, I noted these 2 squid processes:
> >
> > root /usr/sbin/squid -sYC
> > squid       (squid-1) --kid squid-1 -sYC
> >
> > -s means "Enable logging to syslog”
> >
> > This option ‘-s’ could explain writing to messages ?
>
> Squid does not write to /var/log/messages. On startup before Squid reads any
> configuration about whether cache.log or syslog is to be used it logs to
> stderr.
>
> That stderr channel is handled by whatever init system or shell is starting
> Squid. /var/log/messages is the init system log file.

Actually no, /var/log/messages is not an init system log file; on some Linux
distros it is a default log location for syslog.

I can confirm that squid will write to /var/log/messages if syslog logging is
enabled AND syslog is configured to write to /var/log/messages (this is the
default behaviour on some Linux distributions, such as Debian, but not Ubuntu).


--
Ambrose Li <[hidden email]> | Time zone: GMT-5 (Eastern)
ambroseli.ca

“Any organization which designs a system… will inevitably produce a
 design whose structure is a copy of the organization’s communication
 structure.” — Conway’s Law

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

sampei02@tiscali.it
> I can confirm that squid will write to /var/log/messages if syslog logging is
> enabled AND syslog is configured to write to /var/log/messages (this is the
> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).



My distro is Centos7 and rsyslog is enabled and It’s  configured to write to /var/log/messages; it’s the default behaviour.
But how can I avoid Squid writes into this file? I chose the Squid default log files which are contained into /var/log/squid/ folder.



> On 21 Dec 2020, at 11:31, Ambrose Li <[hidden email]> wrote:
>
> On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
>> On 21/12/20 9:55 pm, [hidden email] wrote:
>>> Ok, I noted these 2 squid processes:
>>>
>>> root /usr/sbin/squid -sYC
>>> squid       (squid-1) --kid squid-1 -sYC
>>>
>>> -s means "Enable logging to syslog”
>>>
>>> This option ‘-s’ could explain writing to messages ?
>>
>> Squid does not write to /var/log/messages. On startup before Squid reads any
>> configuration about whether cache.log or syslog is to be used it logs to
>> stderr.
>>
>> That stderr channel is handled by whatever init system or shell is starting
>> Squid. /var/log/messages is the init system log file.
>
> Actually no, /var/log/messages is not an init system log file; on some Linux
> distros it is a default log location for syslog.
>
> I can confirm that squid will write to /var/log/messages if syslog logging is
> enabled AND syslog is configured to write to /var/log/messages (this is the
> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).
>
>
> --
> Ambrose Li <[hidden email]> | Time zone: GMT-5 (Eastern)
> ambroseli.ca
>
> “Any organization which designs a system… will inevitably produce a
> design whose structure is a copy of the organization’s communication
> structure.” — Conway’s Law
>
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Amos Jeffries
Administrator
On 22/12/20 2:29 am, sampei02 wrote:
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).
>
>
>
> My distro is Centos7 and rsyslog is enabled and It’s  configured to write to /var/log/messages; it’s the default behaviour.
> But how can I avoid Squid writes into this file? I chose the Squid default log files which are contained into /var/log/squid/ folder.
>


Removing that "s" command line parameter will indeed stop the rsyslog
output. You may still get some /var/log/messages entries from the init
scripts etc.

Amos
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Matus UHLAR - fantomas
In reply to this post by sampei02@tiscali.it
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).

On 21.12.20 14:29, [hidden email] wrote:
>My distro is Centos7 and rsyslog is enabled and It’s  configured to write
>to /var/log/messages; it’s the default behaviour.  But how can I avoid
>Squid writes into this file?  I chose the Squid default log files which are
>contained into /var/log/squid/ folder.

note that the messages you poster are usually sent to cache_log, not
access_log, so check your cache_log settings.

as noted below, the "-s" option for squid makes it log to syslog, so you
need to remove that option off your systemd unit file or init.d file,
whichever is used on centos7.

>> On 21 Dec 2020, at 11:31, Ambrose Li <[hidden email]> wrote:
>>
>> On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
>>> On 21/12/20 9:55 pm, [hidden email] wrote:
>>>> Ok, I noted these 2 squid processes:
>>>>
>>>> root /usr/sbin/squid -sYC
>>>> squid       (squid-1) --kid squid-1 -sYC
>>>>
>>>> -s means "Enable logging to syslog”
>>>>
>>>> This option ‘-s’ could explain writing to messages ?
>>>
>>> Squid does not write to /var/log/messages. On startup before Squid reads any
>>> configuration about whether cache.log or syslog is to be used it logs to
>>> stderr.
>>>
>>> That stderr channel is handled by whatever init system or shell is starting
>>> Squid. /var/log/messages is the init system log file.
>>
>> Actually no, /var/log/messages is not an init system log file; on some Linux
>> distros it is a default log location for syslog.
>>
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
- Holmes, what kind of school did you study to be a detective?
- Elementary, Watkins.  -- Daffy Duck & Porky Pig
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Alex Rousskov
In reply to this post by sampei02@tiscali.it
On 12/21/20 8:29 AM, [hidden email] wrote:

> My distro is Centos7 and rsyslog is enabled and It’s  configured to
> write to /var/log/messages; it’s the default behaviour. But how can I
> avoid Squid writes into this file? I chose the Squid default log
> files which are contained into /var/log/squid/ folder.

You already know from other responses that removing "-s" from your Squid
command line options is the primary solution for stopping Squid from
logging to syslog, but I wanted to add a caveat:

* Some Squid messages are only logged to syslog.
  Those messages are logged to syslog regardless of the "-s" presence.
  I suspect they may also disregard the "-l facility" setting.

... where "logged to syslog" should be interpreted as "sent to the
syslog daemon", of course.

IMO, this caveat is essentially a Squid bug.

You can prevent all Squid messages from appearing in system log files by
configuring your syslog daemon accordingly.


HTH,

Alex.


>> On 21 Dec 2020, at 11:31, Ambrose Li wrote:
>>
>> On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
>>> On 21/12/20 9:55 pm, [hidden email] wrote:
>>>> Ok, I noted these 2 squid processes:
>>>>
>>>> root /usr/sbin/squid -sYC
>>>> squid       (squid-1) --kid squid-1 -sYC
>>>>
>>>> -s means "Enable logging to syslog”
>>>>
>>>> This option ‘-s’ could explain writing to messages ?
>>>
>>> Squid does not write to /var/log/messages. On startup before Squid reads any
>>> configuration about whether cache.log or syslog is to be used it logs to
>>> stderr.
>>>
>>> That stderr channel is handled by whatever init system or shell is starting
>>> Squid. /var/log/messages is the init system log file.
>>
>> Actually no, /var/log/messages is not an init system log file; on some Linux
>> distros it is a default log location for syslog.
>>
>> I can confirm that squid will write to /var/log/messages if syslog logging is
>> enabled AND syslog is configured to write to /var/log/messages (this is the
>> default behaviour on some Linux distributions, such as Debian, but not Ubuntu).
>>
>>
>> --
>> Ambrose Li <[hidden email]> | Time zone: GMT-5 (Eastern)
>> ambroseli.ca
>>
>> “Any organization which designs a system… will inevitably produce a
>> design whose structure is a copy of the organization’s communication
>> structure.” — Conway’s Law
>>
>> _______________________________________________
>> squid-users mailing list
>> [hidden email]
>> http://lists.squid-cache.org/listinfo/squid-users
>
> _______________________________________________
> squid-users mailing list
> [hidden email]
> http://lists.squid-cache.org/listinfo/squid-users
>

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

sampei02@tiscali.it
I solved disabling ‘-s' option in squid startup script.
Thanks



On 21 Dec 2020, at 15:36, Alex Rousskov <[hidden email]> wrote:

On 12/21/20 8:29 AM, [hidden email] wrote:

My distro is Centos7 and rsyslog is enabled and It’s  configured to
write to /var/log/messages; it’s the default behaviour. But how can I
avoid Squid writes into this file? I chose the Squid default log
files which are contained into /var/log/squid/ folder.

You already know from other responses that removing "-s" from your Squid
command line options is the primary solution for stopping Squid from
logging to syslog, but I wanted to add a caveat:

* Some Squid messages are only logged to syslog.
 Those messages are logged to syslog regardless of the "-s" presence.
 I suspect they may also disregard the "-l facility" setting.

... where "logged to syslog" should be interpreted as "sent to the
syslog daemon", of course.

IMO, this caveat is essentially a Squid bug.

You can prevent all Squid messages from appearing in system log files by
configuring your syslog daemon accordingly.


HTH,

Alex.


On 21 Dec 2020, at 11:31, Ambrose Li wrote:

On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
On 21/12/20 9:55 pm, [hidden email] wrote:
Ok, I noted these 2 squid processes:

root /usr/sbin/squid -sYC
squid       (squid-1) --kid squid-1 -sYC

-s means "Enable logging to syslog”

This option ‘-s’ could explain writing to messages ?

Squid does not write to /var/log/messages. On startup before Squid reads any
configuration about whether cache.log or syslog is to be used it logs to
stderr.

That stderr channel is handled by whatever init system or shell is starting
Squid. /var/log/messages is the init system log file.

Actually no, /var/log/messages is not an init system log file; on some Linux
distros it is a default log location for syslog.

I can confirm that squid will write to /var/log/messages if syslog logging is
enabled AND syslog is configured to write to /var/log/messages (this is the
default behaviour on some Linux distributions, such as Debian, but not Ubuntu).


-- 
Ambrose Li <[hidden email]> | Time zone: GMT-5 (Eastern)
ambroseli.ca

“Any organization which designs a system… will inevitably produce a
design whose structure is a copy of the organization’s communication
structure.” — Conway’s Law

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users


_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Song & Movie
In reply to this post by Ambrose LI
Can any one help me to create http proxy ?

On Mon, Dec 21, 2020 at 4:31 AM Ambrose Li <[hidden email]> wrote:
On Mon, Dec 21, 2020 at 11:01:07PM +1300, Amos Jeffries wrote:
> On 21/12/20 9:55 pm, [hidden email] wrote:
> > Ok, I noted these 2 squid processes:
> >
> > root                /usr/sbin/squid -sYC
> > squid       (squid-1) --kid squid-1 -sYC
> >
> > -s means "Enable logging to syslog”
> >
> > This option ‘-s’ could explain writing to messages ?
>
> Squid does not write to /var/log/messages. On startup before Squid reads any
> configuration about whether cache.log or syslog is to be used it logs to
> stderr.
>
> That stderr channel is handled by whatever init system or shell is starting
> Squid. /var/log/messages is the init system log file.

Actually no, /var/log/messages is not an init system log file; on some Linux
distros it is a default log location for syslog.

I can confirm that squid will write to /var/log/messages if syslog logging is
enabled AND syslog is configured to write to /var/log/messages (this is the
default behaviour on some Linux distributions, such as Debian, but not Ubuntu).


--
Ambrose Li <[hidden email]> | Time zone: GMT-5 (Eastern)
ambroseli.ca

“Any organization which designs a system… will inevitably produce a
 design whose structure is a copy of the organization’s communication
 structure.” — Conway’s Law

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users

_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users
Reply | Threaded
Open this post in threaded view
|

Re: squid writes to /var/log/messages

Antony Stone
On Thursday 24 December 2020 at 18:44:21, Song & Movie wrote:

> Can any one help me to create http proxy ?

1. Please do not hijack an unrelated thread on the list.  Please start a new
thread by posting to [hidden email] with an appropriate
subject.

2. Please give us at least *some* information about:

a) what you're trying to achieve
b) what system you want to install it on
c) what you've done already
d) what problems you've run into

Regards,


Antony,

--
Late in 1972 President Richard Nixon announced that the rate of increase of
inflation was decreasing.   This was the first time a sitting president used a
third derivative to advance his case for re-election.

 - Hugo Rossi, Notices of the American Mathematical Society

                                                   Please reply to the list;
                                                         please *don't* CC me.
_______________________________________________
squid-users mailing list
[hidden email]
http://lists.squid-cache.org/listinfo/squid-users