Search squid archive

Re: logfileHandleWrite: daemon:/var/logs/access.log: error writing ((32) Broken pipe)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Resolved; well sort of!

I've been setting up log file permissions to jibe with the cache_effective_user tag in /etc/squid3/squid.conf, which I had set to squid. As I was troubleshooting, I also changed the http_port tag from 8080, but I noticed the output when I tried starting squid remained 8080:

Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 11 flags=9

Obviously my squid.conf was not being used, that's when I noticed squid -v indicated sysconfdir=/etc/squid (i.e. not /etc/squid3).

I discovered that I had ended up with two config locations:
/etc/squid/squid.conf
/etc/squid3/squid.conf

This was likely due to issues with me using a binary install:
sudo apt-get install squid

and also making custom builds, with outdated ./configure options. I was using the configure options listed here:
http://wiki.squid-cache.org/SquidFaq/CompilingSquid#Debian.2C_Ubuntu

It indicates using --sysconfdir=/etc/squid, but that doesn't jibe with sudo apt-get install squid, which puts squid.conf in /etc/squid3

I've opened this bug:
http://bugs.squid-cache.org/show_bug.cgi?id=4313

I'll request wiki update access too.

I indicated 'sort of' at the outset because while I'm pretty certain having two locations for squid.conf was the source of all my problems, I wasn't able to confirm 100%. I abandoned my troubleshooting activities because I had to re-install the OS anyway. For example, I can't reconcile why I had /etc/squid3/ given I had purged my original squid install...

Interestingly, it turns out that I didn't need to rebuild at all. Filtering by MAC address is now provided by default, as indicated in this thread which also provides some excellent suggestions for configuring your build environment:
http://lists.squid-cache.org/pipermail/squid-users/2015-August/005257.html


On Fri, Aug 28, 2015 at 5:43 PM, Howard Waterfall <hwaterfall@xxxxxxxxx> wrote:
Sorry, I thought that by copying the subject line of Priya's message thread, I would have continued the thread. Here's the link for context:

Cheers,
Deiter

On Fri, Aug 28, 2015 at 8:31 AM, Howard Waterfall <hwaterfall@xxxxxxxxx> wrote:
Ubuntu 14.04
Squid 3.5.5

Hi -
I'm having pretty much exactly the same problem as Priya. I didn't see a resolution so I'm picking up the thread.

I've installed and run squid 3.5.5 previously w/o a problem using:
sudo apt-get install squid

I want to filter by mac address though, so I purged that install and re-built squid with the --enable-arp-acl flag. This is when the problems begin. I've provided what was requested from Priya below. I'm grateful for any help.

Thanks,
Deiter

Output from sudo /usr/local/squid/sbin/squid -NCd1:
WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log
/usr/local/squid/var/logs/cache.log: Permission denied
         messages will be sent to 'stderr'.
2015/08/28 14:47:27| cannot change current directory to /var/spool/squid3: (2) No such file or directory
2015/08/28 14:47:27| Current Directory is /home/ubuntu
WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log
/usr/local/squid/var/logs/cache.log: Permission denied
         messages will be sent to 'stderr'.
2015/08/28 14:47:27| WARNING: Closing open FD    2
2015/08/28 14:47:27| Starting Squid Cache version 3.5.5 for armv7l-unknown-linux-gnueabihf...
2015/08/28 14:47:27| Service Name: squid
2015/08/28 14:47:27| Process ID 2118
2015/08/28 14:47:27| Process Roles: master worker
2015/08/28 14:47:27| With 1024 file descriptors available
2015/08/28 14:47:27| Initializing IP Cache...
2015/08/28 14:47:27| DNS Socket created at [::], FD 7
2015/08/28 14:47:27| DNS Socket created at 0.0.0.0, FD 8
2015/08/28 14:47:27| Adding nameserver 75.75.75.75 from /etc/resolv.conf
2015/08/28 14:47:27| Adding nameserver 75.75.76.76 from /etc/resolv.conf
2015/08/28 14:47:27| Adding domain hsd1.ca.comcast.net from /etc/resolv.conf
2015/08/28 14:47:27| Adding domain localdomain from /etc/resolv.conf
2015/08/28 14:47:27| Adding domain localdomain from /etc/resolv.conf
2015/08/28 14:47:27| Adding nameserver 192.168.1.1 from /etc/resolv.conf
2015/08/28 14:47:27| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log
2015/08/28 14:47:27| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log
fopen: Permission denied
2015/08/28 14:47:27| Store logging disabled
2015/08/28 14:47:27| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2015/08/28 14:47:27| Target number of buckets: 1008
2015/08/28 14:47:27| Using 8192 Store buckets
2015/08/28 14:47:27| Max Mem  size: 262144 KB
2015/08/28 14:47:27| Max Swap size: 0 KB
2015/08/28 14:47:27| Using Least Load store dir selection
2015/08/28 14:47:27| cannot change current directory to /var/spool/squid3: (2) No such file or directory
2015/08/28 14:47:27| Current Directory is /home/ubuntu
2015/08/28 14:47:27| Finished loading MIME types and icons.
2015/08/28 14:47:27| HTCP Disabled.
2015/08/28 14:47:27| Squid plugin modules loaded: 0
2015/08/28 14:47:27| Adaptation support is off.
2015/08/28 14:47:27| Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 11 flags=9
2015/08/28 14:47:28| logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)
2015/08/28 14:47:28| Closing HTTP port [::]:8080
2015/08/28 14:47:28| storeDirWriteCleanLogs: Starting...
2015/08/28 14:47:28|   Finished.  Wrote 0 entries.
2015/08/28 14:47:28|   Took 0.00 seconds (  0.00 entries/sec).
FATAL: I don't handle this error well!
Squid Cache (Version 3.5.5): Terminated abnormally.
CPU Usage: 0.290 seconds = 0.220 user + 0.070 sys
Maximum Resident Size: 34480 KB
Page faults with physical i/o: 0

Output from squid -v:
Squid Cache: Version 3.5.5
Service Name: squid
configure options:  '--prefix=/usr' '--localstatedir=/var' '--libexecdir=/lib/squid' '--srcdir=.' '--datadir=/share/squid' '--sysconfdir=/etc/squid' '--with-default-user=proxy' '--with-logdir=/var/log' '--with-pidfile=/var/run/squid.pid' '--enable-arp-acl' --enable-ltdl-convenience

Output from ls -al /usr/local/squid/var/logs/access.log:
-rw-rw---- 1 squid squid_admin 5262306 Jun 29 21:47 /usr/local/squid/var/logs/access.log

Output from ls -al /usr/local/squid/var/logs:
total 5224
drwxrwxrwx 2 squid squid_admin    4096 Aug 28 09:35 .
drwxr-xr-x 5 root  root           4096 Jun 12 06:57 ..
-rw-rw---- 1 squid squid_admin 5262306 Jun 29 21:47 access.log
-rw-rw---- 1 squid squid_admin   67925 Jun 27 02:47 cache.log

Output from ls -al /usr/local/squid/var:
total 20
drwxr-xr-x 5 root  root        4096 Jun 12 06:57 .
drwxr-xr-x 8 root  root        4096 Jun 12 06:57 ..
drwxrwxrwx 3 root  root        4096 Jun 12 06:57 cache
drwxrwxrwx 2 squid squid_admin 4096 Aug 28 09:35 logs
drwxrwxrwx 3 root  root        4096 Jun 21 12:17 run

I adjusted the paths above from what was asked of Priya to jibe with my set-up, but just in case:

Output from ls -al /var/logs/access.log:
ls: cannot access /var/logs/access.log: No such file or directory

Output from ls -al /var/logs:
ls: cannot access /var/logs: No such file or directory



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

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux