unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: Danny Milosavljevic <dannym@scratchpost.org>
To: Catonano <catonano@gmail.com>
Cc: "Alex Kost" <alezost@gmail.com>,
	29992@debbugs.gnu.org, "Clément Lassieur" <clement@lassieur.org>
Subject: bug#29992: 'postgres' service doesn't stop
Date: Fri, 12 Jan 2018 22:42:42 +0100	[thread overview]
Message-ID: <20180112224242.0e656c54@scratchpost.org> (raw)
In-Reply-To: <CAJ98PDw8K+Oy96SzJ9udbSgcvEkFH8rwZOGmTOQfYOaqFzC57w@mail.gmail.com>

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/<pid> 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.

  reply	other threads:[~2018-01-12 21:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-05 15:32 bug#29992: 'postgres' service doesn't stop Clément Lassieur
2018-01-08 10:59 ` Ludovic Courtès
2018-01-08 11:33   ` Clément Lassieur
2018-01-08 21:55   ` Alex Kost
2018-01-12  9:46     ` Catonano
2018-01-12 21:42       ` Danny Milosavljevic [this message]
2018-01-24  2:20   ` bug#29992: [PATCH] services: postgresql: Use pg_ctl to start and stop postgres Clément Lassieur
2018-01-24 15:04     ` Ludovic Courtès
2018-01-24 17:16       ` Clément Lassieur
2018-01-25 13:13         ` Clément Lassieur
2018-01-25 13:20       ` Clément Lassieur
2018-01-25 14:22         ` Ludovic Courtès
2018-01-25 14:56           ` Clément Lassieur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180112224242.0e656c54@scratchpost.org \
    --to=dannym@scratchpost.org \
    --cc=29992@debbugs.gnu.org \
    --cc=alezost@gmail.com \
    --cc=catonano@gmail.com \
    --cc=clement@lassieur.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).