From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: bug#29992: 'postgres' service doesn't stop Date: Fri, 12 Jan 2018 22:42:42 +0100 Message-ID: <20180112224242.0e656c54@scratchpost.org> References: <87mv1scodq.fsf@lassieur.org> <87373ghaza.fsf@gnu.org> <87d12krp5l.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44454) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ea76Q-0008Ba-9X for bug-guix@gnu.org; Fri, 12 Jan 2018 16:43:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ea76N-0001r8-5w for bug-guix@gnu.org; Fri, 12 Jan 2018 16:43:06 -0500 Received: from debbugs.gnu.org ([208.118.235.43]:46318) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ea76N-0001qw-1T for bug-guix@gnu.org; Fri, 12 Jan 2018 16:43:03 -0500 Sender: "Debbugs-submit" Resent-Message-ID: In-Reply-To: List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: "bug-Guix" To: Catonano Cc: Alex Kost , 29992@debbugs.gnu.org, =?UTF-8?Q?Cl=C3=A9ment?= Lassieur Hi Catonano, > When I run Tryton myself, I use this line: > trytond -c trytond.conf > this command doesn' t return a prompt Does it stay in foreground with the tryton service, too? It shouldn't do that for the service, see below. make-forkexec-constructor should takes a pid-file argument which is supposed to refer to a file that trytond creates. If that isn't specified, shepherd will default to the pid of the child process of shepherd that did the exec(). So it shouldn't have tryton in foreground in any case. Note: make-forkexec-constructor also has a #:log-file keyword argument - which is handy for debugging. > So, in order to stop Tryton I simply press Ctrl-C > > In the definition of my sevice, I use > #~(make-kill-destructor) > > to stop the Tryton service > > But I copied this from other services, I don't know what > "make-kill-destructor" does (define make-kill-destructor (lambda* (#:optional (signal SIGTERM)) (lambda (pid . args) (kill pid signal) #f))) So it sends SIGTERM to the process. What happens when you send SIGTERM manually ("kill -TERM ...")? > My Trytond service is not working anyway, I launch a vm with my service > running in it, I test it with the client, I see it doesn't work, I stop it > and then I'd like to launch it by hand to see something more You can try finding its pid with "ps -ef |grep tryton" and then compare their /proc/ trees (manually started vs. service-started). In your screenshot, that would be /proc/411, especially /proc/411/fd and its signal mask (in /proc/411/status). > But then, because a tryton-real daemon is still running, the socket for > that address is already bound, as you can see in the picture That's good then. Try "netstat -lpn | grep 411" (or whatever the pid is now) to find out whether it's actually listening.