1

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.

Ben Pilbrow
  • 12,041
  • 5
  • 36
  • 57
chris
  • 292
  • 2
  • 7
  • 14

2 Answers2

3

Did you find any error while running squid -X

User4283
  • 781
  • 3
  • 10
  • 27
-2

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

MrCHACHA
  • 1
  • 1