Bug 428998

Summary: squid doesn't check config before starting, causes strange error messages on start
Product: [Fedora] Fedora Reporter: Mads Kiilerich <mads>
Component: squidAssignee: Martin Nagy <mnagy>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 8CC: hripps
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-03-13 14:40:52 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
patch for /etc/init.d/squid, parse and check before attempting to start none

Description Mads Kiilerich 2008-01-16 17:53:27 UTC
Description of problem:


Version-Release number of selected component (if applicable):
squid-2.6.STABLE17-1.fc8

How reproducible:


Steps to Reproduce:
1. service squid start
2.
3.
  

Actual results:
[root@dev-mk squid]# service squid start
init_cache_dir /var/spool/squid... /etc/init.d/squid: line 65: 19712 Aborted   
             $SQUID -z -F -D >> /var/log/squid/squid.out 2>&1
Starting squid: /etc/init.d/squid: line 62: 19713 Aborted                 $SQUID
$SQUID_OPTS >> /var/log/squid/squid.out 2>&1
                                                           [FAILED]


Expected results:
The squid start script should run "squid -k parse" and show its output and only
attempt to start squid if it returns successfully

In my case it would have shown the following and helped me:
FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'
Squid Cache (Version 2.6.STABLE17): Terminated abnormally.
CPU Usage: 0.006 seconds = 0.003 user + 0.003 sys
Maximum Resident Size: 0 KB
Page faults with physical i/o: 0
Aborted


Additional info:
Error messages could be found in /var/log/squid/squid.out - but it isn't obvious
to look there.

The reason of this was that I tested on a machine without hostname in hosts, so
that hostname -s returned
hostname: Unknown host
and squid failed with 
FATAL: Could not determine fully qualified hostname.  Please set 'visible_hostname'

Comment 1 Mads Kiilerich 2008-01-16 17:53:27 UTC
Created attachment 291870 [details]
patch for /etc/init.d/squid, parse and check before attempting to start

Comment 2 Martin Nagy 2008-03-13 14:40:52 UTC
Will be fixed with squid-3.0.STABLE2-1.fc9