[MacPorts] #24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured)
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- I've just installed mpd-0.15.8_0 and followed the instructions for getting launchd to manage it. But stopping the daemon does not work: i.e. running "sudo launchctl stop org.macports.mpd" has no discernible effect on the system state. mpd just keeps running. Here's how things look with mpd running: {{{ $ ps u -ax | grep mpd greg 81805 1.3 0.1 75436 396 s006 S+ 5:50PM 0:00.00 grep mpd root 177 0.0 0.9 88532 6876 s000 S+ 4:30PM 0:36.58 ./bin/mpd etc/mpd.conf --no-daemon --stdout root 46337 0.0 0.1 75424 704 ?? Ss 5:37PM 0:00.01 /opt/local/bin/daemondo --label=mpd --start-cmd /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper start ; --stop- cmd /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop ; --restart-cmd /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper restart ; --pid=none }}} (Disclaimer: I am completely new to MacPorts and launchd. So I'm making educated guesses here.) From this, I'm guessing that "sudo launchctl stop org.macports.mpd" runs {{{ /opt/local/etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop }}} But if I run that command manually, it fails: {{{ $ sudo etc/LaunchDaemons/org.macports.mpd/mpd.wrapper stop daemon: no pid_file specified in the config file etc/LaunchDaemons/org.macports.mpd/mpd.wrapper: line 23: 92889 Abort trap /opt/local/bin/mpd --kill }}} (Incidentally, it takes a loooong time for mpd to crash, around 21 sec. Not sure if that is an upstream bug or not.) From the reading I've done on launchd, I gather that pid files are frowned upon: you're supposed to launchd take care of it. OK, fine, but doesn't that mean that mpd.wrapper cannot use "mpd --kill"? -- Ticket URL: <http://trac.macports.org/ticket/24043> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: macports-tickets@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Comment(by greg-macports@…): Oops, again forgot to mention that this is on OS X 10.5.8 on a G4. -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:1> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Changes (by macsforever2000@…): * owner: macports-tickets@… => milosh@… * cc: rmsfisher@… (added) -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:2> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Comment(by rmsfisher@…): I don't want to say outright, "You're doing it wrong," as I'm sure there exist alternatives to the "normal way" to load and unload launchd plists.[[br]] Please try:[[br]] {{{sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mpd.plist}}}[[br]]Let us know if that works for you. -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:3> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Comment(by rmsfisher@…): Greg,[[br]] Please let me know if the above command for unloading this launchd plist works for you. If I don't hear from you within a week, I will assume you worked it out and close this ticket as "wontfix".[[br]][[br]] Cheers,[[br]] Ryan -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:4> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Comment(by xcingix@…): Error in connection() 61 - Connection refused ool-4354fe61:bin danny$ sudo port mpd restart Unrecognized action "mpd" ool-4354fe61:bin danny$ sudo mpd restart config: problems opening file restart for reading: No such file or directory Abort trap ool-4354fe61:bin danny$ sudo launchctl unload -w /Library/LaunchDaemons/org.macports.mpd.plist launchctl: Error unloading: org.macports.mpd ool-4354fe61:bin danny$ -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:5> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) -----------------------------------+---------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: new Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Keywords: | Port: mpd -----------------------------------+---------------------------------------- Comment(by greg-macports@…): Replying to [comment:4 rmsfisher@…]:
Please let me know if the above command for unloading this launchd plist works for you. If I don't hear from you within a week, I will assume you worked it out and close this ticket as "wontfix".[[br]][[br]]
Huh? Sorry, you stop a daemon by unloading a config file? That's just weird. But if that's how launchd works, I guess that's how it works. Whatever. So yeah, you can mark this one "won't fix" or "not a bug" or "problem between keyboard and chair", whatever. ;-) -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:6> MacPorts <http://www.macports.org/> Ports system for Mac OS
#24043: mpd-0.15.8_0: "mpd.wrapper stop" does not work (no pid_file configured) ------------------------------------+--------------------------------------- Reporter: greg-macports@… | Owner: milosh@… Type: defect | Status: closed Priority: Normal | Milestone: Component: ports | Version: 1.8.2 Resolution: wontfix | Keywords: Port: mpd | ------------------------------------+--------------------------------------- Changes (by rmsfisher@…): * status: new => closed * resolution: => wontfix Comment: It's really wacky, especially when files left loaded (with 'launchctl load -w') are modified or removed leaving their tasks in limbo. If you need any additional help with launchd .plist files, #macports on Freenode IRC has several users who understand it better than I do. -- Ticket URL: <http://trac.macports.org/ticket/24043#comment:7> MacPorts <http://www.macports.org/> Ports system for Mac OS
participants (1)
-
MacPorts