reines / dropwizard-debpkg-maven-plugin

A maven plugin for packing Dropwizard applications as Debian packages.
Apache License 2.0
52 stars 12 forks source link

Rouge processes during startup/shutdown #12

Closed jplock closed 9 years ago

jplock commented 10 years ago

I'm running into some tracking issues when using the shell script that is launched from the upstart job. A similar discussion was had on the dropwizard-user google group at https://groups.google.com/d/msg/dropwizard-user/PPgqS2ZHeFg/xaBAE2HA4jQJ where the poster recommended using https://gist.github.com/sargun/5693318 instead of launching java inside of bash.

What are your thoughts on removing the shell scripts and modifying the upstart scripts in this manner? Have you ran into these issues before?

reines commented 10 years ago

I haven't noticed this, but I'll definitely take a look. It was working how you suggest until 0.6, when I split the start logic out to a script so it could be shared between upstart and sysvinit.

reines commented 10 years ago

So as you've seen the bash shell is spawned by upstart, which then spawns the java process with a different PID. However this is still correctly being monitored and stopped by upstart. What is the specific issue this is causing you?

jplock commented 10 years ago

Here's what I was doing when I noticed the issue:

  1. built a debian package using mvn package
  2. installed it on my server using dpkg -i package.deb
  3. I then started the service service package start
  4. I then build a new version of the same package
  5. I then installed the new version, without stopping the service, using dpkg -i package.deb

that left two copies of the service running

reines commented 10 years ago

Which OS+version are you running? Did you upgrade the version of dropwizard-debpkg-maven-plugin in between?

I can imagine this is likely to happen if upgrading from 0.5 to 0.6 (sorry I totally didn't think of that at the time, I should probably have tried to handle it more gracefully...), though I can't seem to reproduce on Ubuntu 14.04 with Upstart when keeping the plugin at 0.7.

jplock commented 10 years ago

I'm using ubuntu 14.04 and was using version 0.6 of this package as I hadn't seen 0.7 in maven central. Let me try out that version.

reines commented 9 years ago

I'm closing this as the SystemV/Upstart/SystemD code has changed a bit since 0.6, and I haven't been able to reproduce this. Please re-open if this is still an issue.