Squid not starting from rc in Jail, however works when run from root as command??

Kaya Saman SamanKaya at netscape.net
Tue Jun 1 08:14:36 UTC 2010


Kaya Saman wrote:
> Hi guys,
>
> I've just built a new BSD server running on a Mini-ITX NAS chassis and 
> it's working beautifully :-)
>
> I also took the time to learn how to build jails too as this is only 
> my second BSD build so am still really new to it although not to UNIX 
> as I use Solaris and Linux frequently.
>
> Anyhow I'm trying to migrate config which was on an old SPARC server 
> running Solaris 9 with a version of Squid got from the Blastwave repos 
> and currently I'm having major issues with it.
>
> Basically I think I've worked through to figure out that running as 
> user Squid or Proxy doesn't give me access to ports <1024, basically 
> the 'well known' ports.
>
> Here is the error message I get from Squid when trying to start it 
> using the rc.d file:
>
> May 31 17:47:11 proxy squid[4360]: Cannot open HTTP Port
> May 31 17:47:11 proxy squid[4358]: Squid Parent: child process 4360 
> exited due to signal 6
> May 31 17:47:14 proxy squid[4358]: Squid Parent: child process 4364 
> started
> May 31 17:47:15 proxy squid[4364]: Cannot open HTTP Port
> May 31 17:47:15 proxy squid[4358]: Squid Parent: child process 4364 
> exited due to signal 6
> May 31 17:47:18 proxy squid[4358]: Squid Parent: child process 4367 
> started
> May 31 17:47:18 proxy squid[4367]: Cannot open HTTP Port
> May 31 17:47:18 proxy squid[4358]: Squid Parent: child process 4367 
> exited due to signal 6
> May 31 17:47:21 proxy squid[4358]: Squid Parent: child process 4370 
> started
> May 31 17:47:21 proxy squid[4370]: Cannot open HTTP Port
> May 31 17:47:21 proxy squid[4358]: Squid Parent: child process 4370 
> exited due to signal 6
>
>
> If however I start Squid using /usr/local/sbin/squid -NCd1 as root I 
> get this and Squid works:
>
> proxy# /usr/local/sbin/squid -NCd1
> 2010/05/31 17:55:54| Starting Squid Cache version 2.7.STABLE7 for 
> amd64-portbld-freebsd8.0...
> 2010/05/31 17:55:54| Process ID 4484
> 2010/05/31 17:55:54| With 11095 file descriptors available
> 2010/05/31 17:55:54| Using kqueue for the IO loop
> 2010/05/31 17:55:54| Performing DNS Tests...
> 2010/05/31 17:55:54| Successful DNS name lookup tests...
> 2010/05/31 17:55:54| DNS Socket created at 0.0.0.0, port 39116, FD 6
> 2010/05/31 17:55:54| Adding nameserver 192.168.1.100 from 
> /etc/resolv.conf
> 2010/05/31 17:55:54| Adding nameserver 192.168.1.101 from 
> /etc/resolv.conf
> 2010/05/31 17:55:54| logfileOpen: opening log /var/log/squid/access.log
> 2010/05/31 17:55:54| Unlinkd pipe opened on FD 11
> 2010/05/31 17:55:54| Swap maxSize 102400 + 8192 KB, estimated 8507 
> objects
> 2010/05/31 17:55:54| Target number of buckets: 425
> 2010/05/31 17:55:54| Using 8192 Store buckets
> 2010/05/31 17:55:54| Max Mem  size: 8192 KB
> 2010/05/31 17:55:54| Max Swap size: 102400 KB
> 2010/05/31 17:55:54| logfileOpen: opening log /var/log/squid/store.log
> 2010/05/31 17:55:54| Rebuilding storage in /usr/local/squid/cache (DIRTY)
> 2010/05/31 17:55:54| Using Least Load store dir selection
> 2010/05/31 17:55:54| Set Current Directory to /var/spool/squid
> 2010/05/31 17:55:54| Loaded Icons.
> 2010/05/31 17:55:54| Accepting accelerated HTTP connections at 
> 192.168.1.110, port 80, FD 13.
> 2010/05/31 17:55:54| Accepting ICP messages at 0.0.0.0, port 3130, FD 14.
> 2010/05/31 17:55:54| Accepting SNMP messages on port 3401, FD 15.
> 2010/05/31 17:55:54| WCCP Disabled.
> 2010/05/31 17:55:54| Configuring x-ray Parent x-ray/80/0
> 2010/05/31 17:55:54| Configuring zeta-ray Parent zeta-ray/80/0
> 2010/05/31 17:55:54| Configuring delta-ray Parent delta-ray/80/0
> 2010/05/31 17:55:54| Configuring g-stat-1 Parent g-stat-1/80/0
> 2010/05/31 17:55:54| Ready to serve requests.
> 2010/05/31 17:55:54| Done reading /usr/local/squid/cache swaplog (0 
> entries)
> 2010/05/31 17:55:54| Finished rebuilding storage from disk.
> 2010/05/31 17:55:54|         0 Entries scanned
> 2010/05/31 17:55:54|         0 Invalid entries.
> 2010/05/31 17:55:54|         0 With invalid flags.
> 2010/05/31 17:55:54|         0 Objects loaded.
> 2010/05/31 17:55:54|         0 Objects expired.
> 2010/05/31 17:55:54|         0 Objects cancelled.
> 2010/05/31 17:55:54|         0 Duplicate URLs purged.
> 2010/05/31 17:55:54|         0 Swapfile clashes avoided.
> 2010/05/31 17:55:54|   Took 0.4 seconds (   0.0 objects/sec).
> 2010/05/31 17:55:54| Beginning Validation Procedure
> 2010/05/31 17:55:54|   Completed Validation Procedure
> 2010/05/31 17:55:54|   Validated 0 Entries
> 2010/05/31 17:55:54|   store_swap_size = 0k
> 2010/05/31 17:55:55| storeLateRelease: released 0 objects
>
>
>
> Running uname -a gives me this:
>
> FreeBSD Zeta-Ray.optiplex-networks.com 8.0-RELEASE FreeBSD 8.0-RELEASE 
> #0: Sat Nov 21 15:02:08 UTC 2009     
> root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  amd64
>
> and also Squid was built from ports too!!
>
> Because I built the system in a Jail I am using this syntax to bind 
> the port to the IP address:
>
> http_port 192.168.1.110:80 accel defaultsite=domain.com vhost
>
> When I mean Jail I am talking about FreeBDS Jails and not chroot 
> syntax :-)
>
> Can anybody offer me any advice or anywhere else to turn as I really 
> don't know what's going on????
>
> Many thanks!
>
>
> Kaya
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to 
> "freebsd-questions-unsubscribe at freebsd.org"

Just to add that I've tested my config on the default Squid port, 3128 
instead of port 80 using the provided http_port line above which then 
starts when used in conjunction with the rc script......

I'm using config based around this as a reverse proxy:

http://wiki.squid-cache.org/ConfigExamples/Reverse/MultipleWebservers

Since this is a production based system I really need to get the rc 
script working but not sure where to begin going about it as I seem to 
have one of those very specific or not too much observed problems!!

Regards,

Kaya



More information about the freebsd-questions mailing list