Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

In init.pp the squid service is defined like this:

service { 'squid':
ensure     => running,
enable     => true,
hasrestart => true,
hasstatus  => true,
subscribe  => File['/etc/squid/squid.conf'],
}

The result is this:

err: /Stage[main]/module_1::Squid/Service[squid]/ensure: change from stopped to running failed: Could not start Service[squid]: Execution of '/etc/init.d/squid start' returned 1:

If I run "etc/init.d/squid start" I get:

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service squid start
Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility,
e.g. start squid start: Job failed to start

I can start/stop squid on the machine with "service squid start/stop". It's Ubuntu 10.04 minimal.

share|improve this question

2 Answers 2

up vote 3 down vote accepted

Did you find any error while running squid -X

share|improve this answer
1  
Yes! There is a url_rewrite line that was supposed to be deleted... Thanks! –  chris Dec 10 '11 at 0:40

hi for everybody trying fixing that issue :

Rather than invoking init scripts through /etc/init.d, use the service(8) utility, e.g. service squid start Since the script you are attempting to invoke has been converted to an Upstart job, you may also use the start(8) utility, e.g. start squid start: Job failed to start.

First, I want to apologize for my English. I'm always learning this language.

Now let's read me : :)

I had already set up squid server once time but never meet this issue in my config but today, on a server that contain lamp application I was asked to do the same and I get the same issue and decide to configure squid.conf file step by step by verifying if squid will work after each new setup line by line. everything was working till I set the part of "cache-dir" "#cache_dir ufs /var/spool/squid3 100 16 256". Of course I wrote this line without the " # "

And then I get this error while trying to restart squid:

so I now increase the size of repertory /var/spool/squid3 on my drive and don't get this issue restarting squid

another solution is just to change the repertory of stockage

else execute the command "squid3 -z" or "squid -z" for old version of the daemon help to initialize the proxy server and find the common error

I hope my intervention will help people

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.