unicorn Ruby/Rack server user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / code / Atom feed
* systemd with logs to journald
@ 2016-09-09 22:16 Bill Lipa
  2016-09-09 22:23 ` Eric Wong
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Lipa @ 2016-09-09 22:16 UTC (permalink / raw)
  To: unicorn-public

Hello,

Is there a recommended way to run unicorn under systemd and get its
stdout/err to go to journald rather than into a file on disk?  I
prefer to minimize the number of places I have to look for errors.

Thank you!

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: systemd with logs to journald
  2016-09-09 22:16 systemd with logs to journald Bill Lipa
@ 2016-09-09 22:23 ` Eric Wong
       [not found]   ` <CAKh11B7EFHq=zfvz0aej-bhKkvJyGwRxWRB3zjxOZejwERV3+A@mail.gmail.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2016-09-09 22:23 UTC (permalink / raw)
  To: Bill Lipa; +Cc: unicorn-public

Bill Lipa <dojo@masterleep.com> wrote:
> Hello,
> 
> Is there a recommended way to run unicorn under systemd and get its
> stdout/err to go to journald rather than into a file on disk?  I
> prefer to minimize the number of places I have to look for errors.

Remove the stdout_path and stderr_path directives from the
config file.

unicorn won't change stdout/stderr by default, so journald
should pick up anything that goes there.

Admittedly, I haven't gotten around to trying journald, just
systemd + syslog.  That combo handles stdout/stderr fine.

> Thank you!

No problem :>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: systemd with logs to journald
       [not found]   ` <CAKh11B7EFHq=zfvz0aej-bhKkvJyGwRxWRB3zjxOZejwERV3+A@mail.gmail.com>
@ 2016-09-09 22:45     ` Eric Wong
  2016-09-09 22:51       ` Bill Lipa
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Wong @ 2016-09-09 22:45 UTC (permalink / raw)
  To: Bill Lipa; +Cc: unicorn-public

Please don't drop the Cc: to unicorn-public@bogomips.org,
other readers are following along.

Bill Lipa <dojo@masterleep.com> wrote:
> If I do that, the output goes nowhere, I assume because I'm using the
> -D flag on the ExecStart:
> ExecStart=/home/ops/bin/bundle exec "unicorn_rails -D -c
> config/unicorn.rb -E beta"

You should never need -D (--daemonize) with systemd or any
process manager.  -D is intended for standalone init scripts
when the launching process could go away before the daemon.

> I'll try to redo my service file based on the one at
> https://unicorn.bogomips.org/examples/unicorn%40.service instead.
> Thanks for the response.

Yes, that service file should be the recommended way for
systemd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: systemd with logs to journald
  2016-09-09 22:45     ` Eric Wong
@ 2016-09-09 22:51       ` Bill Lipa
  0 siblings, 0 replies; 4+ messages in thread
From: Bill Lipa @ 2016-09-09 22:51 UTC (permalink / raw)
  To: Eric Wong; +Cc: unicorn-public

Thanks for the pointers!  I came across the official example too late,
but I'll convert over now.

On Fri, Sep 9, 2016 at 3:45 PM, Eric Wong <e@80x24.org> wrote:
> Please don't drop the Cc: to unicorn-public@bogomips.org,
> other readers are following along.
>
> Bill Lipa <dojo@masterleep.com> wrote:
>> If I do that, the output goes nowhere, I assume because I'm using the
>> -D flag on the ExecStart:
>> ExecStart=/home/ops/bin/bundle exec "unicorn_rails -D -c
>> config/unicorn.rb -E beta"
>
> You should never need -D (--daemonize) with systemd or any
> process manager.  -D is intended for standalone init scripts
> when the launching process could go away before the daemon.
>
>> I'll try to redo my service file based on the one at
>> https://unicorn.bogomips.org/examples/unicorn%40.service instead.
>> Thanks for the response.
>
> Yes, that service file should be the recommended way for
> systemd.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-09-09 22:51 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-09 22:16 systemd with logs to journald Bill Lipa
2016-09-09 22:23 ` Eric Wong
     [not found]   ` <CAKh11B7EFHq=zfvz0aej-bhKkvJyGwRxWRB3zjxOZejwERV3+A@mail.gmail.com>
2016-09-09 22:45     ` Eric Wong
2016-09-09 22:51       ` Bill Lipa

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/unicorn.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).