From owner-freebsd-questions@FreeBSD.ORG Tue Jun 1 08:14:36 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8FDAF1065670 for ; Tue, 1 Jun 2010 08:14:36 +0000 (UTC) (envelope-from SamanKaya@netscape.net) Received: from imr-ma04.mx.aol.com (imr-ma04.mx.aol.com [64.12.206.42]) by mx1.freebsd.org (Postfix) with ESMTP id 50E718FC1B for ; Tue, 1 Jun 2010 08:14:35 +0000 (UTC) Received: from mtaout-mb02.r1000.mx.aol.com (mtaout-mb02.r1000.mx.aol.com [172.29.41.66]) by imr-ma04.mx.aol.com (8.14.1/8.14.1) with ESMTP id o518EQbf015570 for ; Tue, 1 Jun 2010 04:14:26 -0400 Received: from [192.168.0.54] (81-178-2-118.dsl.pipex.com [81.178.2.118]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mtaout-mb02.r1000.mx.aol.com (MUA/Third Party Client Interface) with ESMTPSA id D5487E000089 for ; Tue, 1 Jun 2010 04:14:25 -0400 (EDT) Message-ID: <4C04C15F.7060800@netscape.net> Date: Tue, 01 Jun 2010 09:14:23 +0100 From: Kaya Saman User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.8.1.22) Gecko/20090605 SeaMonkey/1.1.17 (Ubuntu-1.1.17+nobinonly-0ubuntu0.9.04.1) MIME-Version: 1.0 To: FreeBSD Questions References: <4C03FA45.50008@netscape.net> In-Reply-To: <4C03FA45.50008@netscape.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit x-aol-global-disposition: G X-AOL-SCOLL-SCORE: 0:2:505059840:93952408 X-AOL-SCOLL-URL_COUNT: 0 x-aol-sid: 3039ac1d29424c04c1613902 X-AOL-IP: 81.178.2.118 Subject: Re: Squid not starting from rc in Jail, however works when run from root as command?? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 08:14:36 -0000 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@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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "freebsd-questions-unsubscribe@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