Bug 428998 - squid doesn't check config before starting, causes strange error messages on start
squid doesn't check config before starting, causes strange error messages on ...
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: squid (Show other bugs)
8
All Linux
low Severity low
: ---
: ---
Assigned To: Martin Nagy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-01-16 12:53 EST by Mads Kiilerich
Modified: 2016-07-26 19:46 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-03-13 10:40:52 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
patch for /etc/init.d/squid, parse and check before attempting to start (1.59 KB, patch)
2008-01-16 12:53 EST, Mads Kiilerich
no flags Details | Diff

  None (edit)
Description Mads Kiilerich 2008-01-16 12:53:27 EST
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 12:53:27 EST
Created attachment 291870 [details]
patch for /etc/init.d/squid, parse and check before attempting to start
Comment 2 Martin Nagy 2008-03-13 10:40:52 EDT
Will be fixed with squid-3.0.STABLE2-1.fc9

Note You need to log in before you can comment on or make changes to this bug.