Starting/stopping/restarting squid-deb-proxy is not clear

Bug #695937 reported by Alan Pope 🍺🐧🐱 πŸ¦„ on 2010-12-31
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
squid-deb-proxy (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: squid-deb-proxy

Wanting to restart squid-deb-proxy on my Ubuntu 10.04 LTS server, if I use the init script I am able to stop/start but not restart. I get notified I should use "service" rather than the init script but that doesn't work.

alan@ubuntuserver:~$ sudo /etc/init.d/squid-deb-proxy restart
[sudo] password for alan:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid-deb-proxy restart

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the restart(8) utility, e.g. restart squid-deb-proxy
restart: Job failed to restart

alan@ubuntuserver:~$ sudo service squid-deb-proxy restart
restart: Unknown instance:
alan@ubuntuserver:~$

alan@ubuntuserver:~$ ps -ef | grep squid
root 1192 1 0 Dec30 ? 00:00:00 /usr/sbin/squid
proxy 1194 1192 0 Dec30 ? 00:00:05 (squid)
alan 9177 9025 0 10:15 pts/0 00:00:00 grep --color=auto squid
alan@ubuntuserver:~$ sudo service squid-deb-proxy stop
stop: Unknown instance:
alan@ubuntuserver:~$ sudo /etc/init.d/squid-deb-proxy stop
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid-deb-proxy stop

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the stop(8) utility, e.g. stop squid-deb-proxy

alan@ubuntuserver:~$ sudo /etc/init.d/squid-deb-proxy start
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service squid-deb-proxy 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-deb-proxy
squid-deb-proxy start/running, process 9197

alan@ubuntuserver:~$ ps -ef | grep squid
root 1192 1 0 Dec30 ? 00:00:00 /usr/sbin/squid
proxy 1194 1192 0 Dec30 ? 00:00:05 (squid)
root 9197 1 0 10:15 ? 00:00:00 squid -f /etc/squid-deb-proxy/squid-deb-proxy.conf
proxy 9199 9197 0 10:15 ? 00:00:00 (squid) -f /etc/squid-deb-proxy/squid-deb-proxy.conf
alan 9202 9025 0 10:15 pts/0 00:00:00 grep --color=auto squid

*boggle*

Jorge Castro (jorge) on 2010-12-31
Changed in squid-deb-proxy (Ubuntu):
status: New → Confirmed
Matt Zimmerman (mdz) wrote :

If I've read your transcript correctly, what's confused you is that upstart's restart(8) action has different semantics than the traditional init.d "restart". In particular, if the job is NOT running and you issue a restart(8) through upstart, it will fail, rather than start the job.

This is apparently by design, and documented:

       restart
              JOB [KEY=VALUE]...

              Requests that an instance of the named JOB be restarted, out‐
              putting the status of the job to standard output when the com‐
              mand completes.

              See status for a description of the output format and start for
              a discussion on instances.

              Note that this command can only be used when there is an
              instance of JOB, if there is none then it returns an error
              instead of starting a new one.

...but I find it confusing as well and am not sure why it works this way.

Oh golly, I feel a bit silly now, sorry about that.

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package squid-deb-proxy - 0.4

---------------
squid-deb-proxy (0.4) natty; urgency=low

  * mirror-dstdomain.acl:
    - add ddebs.ubuntu.com to default mirrors
  * apt-avahi-discover:
    - use avahi-resolve to workaround the issue that avahi-browse
      sometimes hands out ipv6 even when asked for ipv4 only,
      many thanks to Andrew Simpson (LP: #686265)
  * contrib/squid-deb-proxy.init:
    - add sysv init script, thanks to Andrew Simpson
  * debian/squid-deb-proxy.upstart:
    - write avahi services file on post-start and kill it again
      on pre-stop (LP: #695937)
  * debian/squid-deb-proxy.squid-deb-proxy-avahi.upstart:
    - removed, this is part of squid-deb-proxy.upstart now
  * Makefile:
    - fix permission of 30autoproxy (LP: #697955)
  * debian/squid-deb-proxy.logrotate:
    - add logrotate file (LP: #718923), thanks to
      Johan van Dijk and Andrew Simpson
 -- Michael Vogt <email address hidden> Wed, 23 Mar 2011 21:53:11 +0100

Changed in squid-deb-proxy (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers