<div dir="ltr">Resolved; well sort of!<div><br></div><div><div>I've been setting up log file permissions to jibe with the <b>cache_effective_user</b> tag in /etc/squid3/squid.conf, which I had set to squid. As I was troubleshooting, I also changed the <b>http_port</b> tag from 8080, but I noticed the output when I tried starting squid remained 8080:</div></div><div><br></div><div><b><span style="font-size:12.8000001907349px">Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 11 flags=9</span><br></b></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">Obviously my squid.conf was not being used, that's when I noticed <b>squid -v</b> indicated </span><span style="font-size:12.8000001907349px"><b>sysconfdir=/etc/squid</b> (i.e. not </span><span style="font-size:12.8000001907349px"><b>/etc/squid</b><u style="font-weight:bold">3)</u>. </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I discovered that </span><span style="font-size:12.8000001907349px">I had ended up with two config locations:</span></div><div><span style="font-size:12.8000001907349px"><b>/etc/squid/squid.conf</b></span></div><div><span style="font-size:12.8000001907349px"><b>/etc/squid3/squid.conf</b></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">This was likely due to issues with me using a binary install:</span></div><div><b><span style="font-size:12.8000001907349px">sudo apt-get install squid</span><span style="font-size:12.8000001907349px"><br></span></b></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">and also making custom builds, with outdated ./configure options. </span><span style="font-size:12.8000001907349px">I was using the configure </span><span style="font-size:12.8000001907349px">options listed here:</span></div><div><span style="font-size:12.8000001907349px"><a href="http://wiki.squid-cache.org/SquidFaq/CompilingSquid#Debian.2C_Ubuntu">http://wiki.squid-cache.org/SquidFaq/CompilingSquid#Debian.2C_Ubuntu</a></span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">It indicates using </span><span style="color:rgb(0,0,0);white-space:pre-wrap"><b>--sysconfdir=/etc/squid</b>, but that doesn't jibe with </span><span style="font-size:12.8000001907349px"><b>sudo apt-get install squid</b>, which puts squid.conf in </span><b style="color:rgb(0,0,0);white-space:pre-wrap">/etc/squid3</b></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I've opened this bug:</span></div><div><span style="font-size:12.8000001907349px"><a href="http://bugs.squid-cache.org/show_bug.cgi?id=4313">http://bugs.squid-cache.org/show_bug.cgi?id=4313</a></span><br></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I'll request wiki update access too.</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I indicated 'sort of' at the outset because while </span><span style="font-size:12.8000001907349px">I'm pretty certain</span><span style="font-size:12.8000001907349px"> having two locations for <b>squid.conf</b> </span><span style="font-size:12.8000001907349px">was the source of all my problems, I wasn't able to confirm 100%. </span><span style="font-size:12.8000001907349px">I abandoned my troubleshooting activities because I had to re-install the OS anyway. For example, I can't reconcile why I had </span><span style="font-size:12.8000001907349px"><b>/etc/squid3/ </b>given I had purged my original squid install...</span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">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:</span></div><div><span style="font-size:12.8000001907349px"><a href="http://lists.squid-cache.org/pipermail/squid-users/2015-August/005257.html">http://lists.squid-cache.org/pipermail/squid-users/2015-August/005257.html</a></span><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 5:43 PM, Howard Waterfall <span dir="ltr"><<a href="mailto:hwaterfall@gmail.com" target="_blank">hwaterfall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">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:<div><a href="http://lists.squid-cache.org/pipermail/squid-users/2015-February/002131.html" target="_blank">http://lists.squid-cache.org/pipermail/squid-users/2015-February/002131.html</a><br></div><div><br></div><div>Cheers,</div><div>Deiter</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Aug 28, 2015 at 8:31 AM, Howard Waterfall <span dir="ltr"><<a href="mailto:hwaterfall@gmail.com" target="_blank">hwaterfall@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ubuntu 14.04<div>Squid 3.5.5</div><div><br></div><div>Hi -<div>I'm having pretty much exactly the same problem as Priya. I didn't see a resolution so I'm picking up the thread.</div><div><br></div><div>I've installed and run squid 3.5.5 previously w/o a problem using:</div></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>sudo apt-get install squid</div></blockquote><div><br></div><div>I want to filter by mac address though, so I purged that install and re-built squid with the <b>--enable-arp-acl</b> flag. This is when the problems begin. I've provided what was requested from Priya below. I'm grateful for any help.</div><div><br></div><div>Thanks,</div><div>Deiter</div><div><br></div><div>Output from <b>sudo /usr/local/squid/sbin/squid -NCd1:</b><br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log</div><div>/usr/local/squid/var/logs/cache.log: Permission denied</div><div>         messages will be sent to 'stderr'.</div><div>2015/08/28 14:47:27| cannot change current directory to /var/spool/squid3: (2) No such file or directory</div><div>2015/08/28 14:47:27| Current Directory is /home/ubuntu</div><div>WARNING: Cannot write log file: /usr/local/squid/var/logs/cache.log</div><div>/usr/local/squid/var/logs/cache.log: Permission denied</div><div>         messages will be sent to 'stderr'.</div><div>2015/08/28 14:47:27| WARNING: Closing open FD    2</div><div>2015/08/28 14:47:27| Starting Squid Cache version 3.5.5 for armv7l-unknown-linux-gnueabihf...</div><div>2015/08/28 14:47:27| Service Name: squid</div><div>2015/08/28 14:47:27| Process ID 2118</div><div>2015/08/28 14:47:27| Process Roles: master worker</div><div>2015/08/28 14:47:27| With 1024 file descriptors available</div><div>2015/08/28 14:47:27| Initializing IP Cache...</div><div>2015/08/28 14:47:27| DNS Socket created at [::], FD 7</div><div>2015/08/28 14:47:27| DNS Socket created at 0.0.0.0, FD 8</div><div>2015/08/28 14:47:27| Adding nameserver 75.75.75.75 from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Adding nameserver 75.75.76.76 from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Adding domain <a href="http://hsd1.ca.comcast.net" target="_blank">hsd1.ca.comcast.net</a> from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Adding domain localdomain from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Adding domain localdomain from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Adding nameserver 192.168.1.1 from /etc/resolv.conf</div><div>2015/08/28 14:47:27| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log</div><div>2015/08/28 14:47:27| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log</div><div>fopen: Permission denied</div><div>2015/08/28 14:47:27| Store logging disabled</div><div>2015/08/28 14:47:27| Swap maxSize 0 + 262144 KB, estimated 20164 objects</div><div>2015/08/28 14:47:27| Target number of buckets: 1008</div><div>2015/08/28 14:47:27| Using 8192 Store buckets</div><div>2015/08/28 14:47:27| Max Mem  size: 262144 KB</div><div>2015/08/28 14:47:27| Max Swap size: 0 KB</div><div>2015/08/28 14:47:27| Using Least Load store dir selection</div><div>2015/08/28 14:47:27| cannot change current directory to /var/spool/squid3: (2) No such file or directory</div><div>2015/08/28 14:47:27| Current Directory is /home/ubuntu</div><div>2015/08/28 14:47:27| Finished loading MIME types and icons.</div><div>2015/08/28 14:47:27| HTCP Disabled.</div><div>2015/08/28 14:47:27| Squid plugin modules loaded: 0</div><div>2015/08/28 14:47:27| Adaptation support is off.</div><div>2015/08/28 14:47:27| Accepting HTTP Socket connections at local=[::]:8080 remote=[::] FD 11 flags=9</div><div>2015/08/28 14:47:28| logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)</div><div>2015/08/28 14:47:28| Closing HTTP port [::]:8080</div><div>2015/08/28 14:47:28| storeDirWriteCleanLogs: Starting...</div><div>2015/08/28 14:47:28|   Finished.  Wrote 0 entries.</div><div>2015/08/28 14:47:28|   Took 0.00 seconds (  0.00 entries/sec).</div><div>FATAL: I don't handle this error well!</div><div>Squid Cache (Version 3.5.5): Terminated abnormally.</div><div>CPU Usage: 0.290 seconds = 0.220 user + 0.070 sys</div><div>Maximum Resident Size: 34480 KB</div><div>Page faults with physical i/o: 0</div></blockquote><div></div><div><br></div><div>Output from <b>squid -v:</b></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div>Squid Cache: Version 3.5.5</div><div>Service Name: squid</div><div>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</div></div><div><br></div></blockquote>Output from <b>ls -al /usr/local/squid/var/logs/access.log:</b><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote></blockquote><div>-rw-rw---- 1 squid squid_admin 5262306 Jun 29 21:47 /usr/local/squid/var/logs/access.log</div><div><br></div></blockquote><div>Output from <b>ls -al /usr/local/squid/var/logs:</b><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><div>total 5224</div></div><div><div>drwxrwxrwx 2 squid squid_admin    4096 Aug 28 09:35 .</div></div><div><div>drwxr-xr-x 5 root  root           4096 Jun 12 06:57 ..</div></div><div><div>-rw-rw---- 1 squid squid_admin 5262306 Jun 29 21:47 access.log</div></div><div><div>-rw-rw---- 1 squid squid_admin   67925 Jun 27 02:47 cache.log</div></div><div><br></div></blockquote>Output from <b>ls -al /usr/local/squid/var:</b><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div>total 20</div><div>drwxr-xr-x 5 root  root        4096 Jun 12 06:57 .</div><div>drwxr-xr-x 8 root  root        4096 Jun 12 06:57 ..</div><div>drwxrwxrwx 3 root  root        4096 Jun 12 06:57 cache</div><div>drwxrwxrwx 2 squid squid_admin 4096 Aug 28 09:35 logs</div><div>drwxrwxrwx 3 root  root        4096 Jun 21 12:17 run</div><div><br></div></blockquote>I adjusted the paths above from what was asked of Priya to jibe with my set-up, but just in case:<div></div></div><div><br></div><div><div>Output from <b>ls -al /var/logs/access.log:</b><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote></blockquote></blockquote></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">ls: cannot access /var/logs/access.log: No such file or directory</blockquote><div><div><div style="font-weight:normal"><br></div><div style="font-weight:normal">Output from <b>ls -al /var/logs:</b><br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div></div></blockquote></blockquote></blockquote></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px">ls: cannot access /var/logs: No such file or directory</blockquote><div style="font-weight:normal"><div style="font-weight:bold"><br></div></div></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>