LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 05-04-2015, 03:04 PM   #1
cdaniels79
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Rep: Reputation: Disabled
Squid using CHROOT


Hello,
I'm trying to get squid up and running under a CHROOT (which by the way the instructions on wiki appear to point to a lot of directories that are different if you compile and install with out changing anything)

Prior to attempting the CHROOT I had Squid running fine, however there appears to be some issues now that I'm running under chroot.

Here is my log file

<---- START LOG----->

2015/05/01 20:33:21| Starting Squid Cache version 3.3.9 for x86_64-unknown-linux-gnu...
2015/05/01 20:33:21| Process ID 3095
2015/05/01 20:33:21| Process Roles: master worker
2015/05/01 20:33:21| With 1024 file descriptors available
2015/05/01 20:33:21| Initializing IP Cache...
2015/05/01 20:33:21| DNS Socket created at [::], FD 5
2015/05/01 20:33:21| DNS Socket created at 0.0.0.0, FD 6
2015/05/01 20:33:21| Adding domain kcfam.net from /etc/resolv.conf
2015/05/01 20:33:21| Adding nameserver [::1] from /etc/resolv.conf
2015/05/01 20:33:21| WARNING: rejecting '[::1]' as a name server, because it is not a numeric IP address
2015/05/01 20:33:21| Adding nameserver 127.0.0.1 from /etc/resolv.conf
2015/05/01 20:33:21| Logfile: opening log daemon:/usr/local/squid/var/logs/access.log
2015/05/01 20:33:21| Logfile Daemon: opening log /usr/local/squid/var/logs/access.log
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/log_file_daemon: (2) No such file or directory
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/log_file_daemon: (2) No such file or directory
2015/05/01 20:33:21| Local cache digest enabled; rebuild/rewrite every 3600/3600 sec
2015/05/01 20:33:21| Store logging disabled
2015/05/01 20:33:21| Swap maxSize 0 + 262144 KB, estimated 20164 objects
2015/05/01 20:33:21| Target number of buckets: 1008
2015/05/01 20:33:21| Using 8192 Store buckets
2015/05/01 20:33:21| Max Mem size: 262144 KB
2015/05/01 20:33:21| Max Swap size: 0 KB
2015/05/01 20:33:21| Using Least Load store dir selection
2015/05/01 20:33:21| Set Current Directory to /usr/local/squid/var/cache/squid
2015/05/01 20:33:21| Loaded Icons.
2015/05/01 20:33:21| HTCP Disabled.
2015/05/01 20:33:21| Pinger socket opened on FD 11
2015/05/01 20:33:21| Squid plugin modules loaded: 0
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/pinger: (2) No such file or directory
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/pinger: (2) No such file or directory
2015/05/01 20:33:21| Adaptation support is off.
2015/05/01 20:33:21| Accepting HTTP Socket connections at local=[::]:3128 remote=[::] FD 9 flags=9
2015/05/02 00:33:22| logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)
2015/05/02 00:33:22| Closing HTTP port [::]:3128
2015/05/02 00:33:22| storeDirWriteCleanLogs: Starting...
2015/05/02 00:33:22| Finished. Wrote 0 entries.
2015/05/02 00:33:22| Took 0.00 seconds ( 0.00 entries/sec).
FATAL: I don't handle this error well!
Squid Cache (Version 3.3.9): Terminated abnormally.
CPU Usage: 0.019 seconds = 0.013 user + 0.006 sys
Maximum Resident Size: 49008 KB
Page faults with physical i/o: 0
Memory usage for squid via mallinfo():
total space in arena: 4764 KB
Ordinary blocks: 4694 KB 4 blks
Small blocks: 0 KB 1 blks
Holding blocks: 1324 KB 4 blks
Free Small blocks: 0 KB
Free Ordinary blocks: 69 KB
Total in use: 6018 KB 126%
Total free: 69 KB 1%
2015/05/02 00:33:22| Closing Pinger socket on FD 11

<--- END LOG --->

I see three errors.

Number 1
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/pinger: (2) No such file or directory

Number 2
2015/05/01 20:33:21| ipcCreate: /usr/local/squid/libexec/log_file_daemon: (2) No such file or directory

Number 3
2015/05/02 00:33:22| logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)


Not knowing much about the inter workings of squid, and what not, but I'm guessing that Number 3 will be resolved when Number 2 is resolved. And Number 1 and 2 are closely related.

The issue is I'm at a stand still have to proceed with fixing Number 1 and 2.
my chroot directive is

chroot /srv/squid

and I've copied all of the /usr/local/squid/libexec/ to /srv/squid/usr/local/squid/libexec

So i believe I have it in the right place. And the file permissions appear to be the same within the CHROOT as they are in the normal directories.

Any Ideas?

Casey
 
Old 05-06-2015, 11:40 AM   #2
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Chroot into the jail and run 'pinger' it should complain about any libs it can't find.
 
Old 05-06-2015, 08:19 PM   #3
cdaniels79
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by /dev/random View Post
Chroot into the jail and run 'pinger' it should complain about any libs it can't find.
Your saying the issue isn't with Squid not finding "pinger" but pinger cant find something it needs in the jail?

Likewise with the log_file_daemon?

Thanks for your help. It will be a few days before I get to take a look at it, but thanks for giving me a direction.
 
Old 05-07-2015, 09:27 AM   #4
/dev/random
Member
 
Registered: Aug 2012
Location: Ontario, Canada
Distribution: Slackware 14.2, LFS-current, NetBSD 6.1.3, OpenIndiana
Posts: 319

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by cdaniels79 View Post
Your saying the issue isn't with Squid not finding "pinger" but pinger cant find something it needs in the jail?

Likewise with the log_file_daemon?

Thanks for your help. It will be a few days before I get to take a look at it, but thanks for giving me a direction.
Yes! When I jailed squid in the past I ran into this issue. running the commands that were broken gave me a hint into what was missing from the jail.
 
Old 05-08-2015, 02:39 PM   #5
cdaniels79
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by /dev/random View Post
Yes! When I jailed squid in the past I ran into this issue. running the commands that were broken gave me a hint into what was missing from the jail.
Okay, thank you so much I made a huge amount of progress. Though I'm still running into one error, that I can't seem to resolve.

logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)
 
Old 05-08-2015, 08:26 PM   #6
cdaniels79
LQ Newbie
 
Registered: Oct 2013
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by cdaniels79 View Post
Okay, thank you so much I made a huge amount of progress. Though I'm still running into one error, that I can't seem to resolve.

logfileHandleWrite: daemon:/usr/local/squid/var/logs/access.log: error writing ((32) Broken pipe)
N/M I'm an idiot. adding /dev/null,
solved the remaining problems.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
chroot install of arch fails, no mounted / in a chroot. Shadow_7 Arch 2 04-20-2015 04:33 PM
Chroot in shell scripts: Ensuring that subsequent commands execute within the chroot Kenny_Strawn Programming 2 05-21-2012 12:25 PM
running squid in chroot environment bzlaskar Linux - Server 1 05-01-2007 12:11 PM
squid under chroot environment. bzlaskar Linux - Security 3 04-29-2007 11:39 PM
i am trying to chroot squid but GT-GEO Linux - General 3 03-12-2002 12:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration