pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
SystemD Unit file missing "After=network-online.target" Parameter
2+ messages / 2 participants
[nested] [flat]

* SystemD Unit file missing "After=network-online.target" Parameter
@ 2018-09-07 10:38  Sebastian Elisa Pfeifer <s.pfeifer@ixolit.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Sebastian Elisa Pfeifer @ 2018-09-07 10:38 UTC (permalink / raw)
  To: pgsql-bugs

Hi,
In the environment

Kernel: Linux use-prod-web01 4.9.0-8-amd64 #1 SMP Debian
4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
OS: Debian 9 stretch
PostgreSQL: 9.3.23-2.pgdg90+1

Expected behavior: Postgres starting and binding to the external interface.

Actual behavior: Otherwise Postgres fails to bind to the external
interface at reboots randomly with the following error message:

|2018-09-06 14:02:32 UTC LOG: could not bind IPv4 socket: Cannot assign
requested address 2018-09-06 14:02:32 UTC HINT: Is another postmaster
already running on port 5432? If not, wait a few seconds and retry.
2018-09-06 14:02:32 UTC WARNING: could not create listen socket for
"123.123.123.123"|

Possible fix: Adding the parameter After=network-online.target to it's
SystemD Unit file.

Our setup includes the setting:
listen_addresses = 'localhost,123.123.123.123' (not the real IP)

Do not hesitate to contact me/us with further questions.

All the best
Sebastian

-- 
*Sebastian Elisa Pfeifer* :: System Administrator
IXOLIT GmbH <https://www.ixolit.com;
Mariahilfer Straße 77-79 :: A-1060, Vienna
tel +43-1-3530505 <tel:+4313530505> :: fax +43-1-3530505-30
web www.ixolit.com <https://www.ixolit.com;
Linkedin <https://www.linkedin.com/company/1707775; Facebook
<https://www.facebook.com/ixolit; Twitter <https://twitter.com/ixolit;
Google+ <https://plus.google.com/+IxolitGmbHWien; GitHub
<https://github.com/ixolit;

CONFIDENTIALITY NOTICE:
The information contained in this communication, including attachments,
is confidential and intended only for the exclusive use of the
addressee. If the reader of this message is not the intended recipient,
or the employee or agent responsible for delivering it to the intended
recipient, you are hereby notified that any dissemination, distribution
or copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us by telephone
immediately. Thank you.

Attachments:

logo-ixolit.png (image/png, 694B) download view image
icons-mail-linkin.png (image/png, 598B) download view image
icons-mail-fb.png (image/png, 509B) download view image
icons-mail-twitter.png (image/png, 467B) download view image
icons-mail-google-plus.png (image/png, 639B) download view image
icons-mail-github.png (image/png, 567B) download view image
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: SystemD Unit file missing "After=network-online.target" Parameter
@ 2018-09-07 14:37  Christoph Berg <myon@debian.org>
  parent: Sebastian Elisa Pfeifer <s.pfeifer@ixolit.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Christoph Berg @ 2018-09-07 14:37 UTC (permalink / raw)
  To: Sebastian Elisa Pfeifer <s.pfeifer@ixolit.com>; +Cc: pgsql-bugs

Re: Sebastian Elisa Pfeifer 2018-09-07 <ab23ab6a-f54a-4063-be3d-dbc93f5dedd2@ixolit.com>
> |2018-09-06 14:02:32 UTC LOG: could not bind IPv4 socket: Cannot assign
> requested address 2018-09-06 14:02:32 UTC HINT: Is another postmaster
> already running on port 5432? If not, wait a few seconds and retry.
> 2018-09-06 14:02:32 UTC WARNING: could not create listen socket for
> "123.123.123.123"|
> 
> Possible fix: Adding the parameter After=network-online.target to it's
> SystemD Unit file.
> 
> Our setup includes the setting:
> listen_addresses = 'localhost,123.123.123.123' (not the real IP)

Hi,

thanks for the report.

I'll have to investigate if that's the correct fix in general. Afaict
network-online.target does less than what the name says, i.e. some
interfaces might still be configuring even at that point. Usual
symptoms are IPv6 devices that are still in address discovery.

I'll let you know what the outcome is.

Christoph




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


end of thread, other threads:[~2018-09-07 14:37 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-09-07 10:38 SystemD Unit file missing "After=network-online.target" Parameter Sebastian Elisa Pfeifer <s.pfeifer@ixolit.com>
2018-09-07 14:37 ` Christoph Berg <myon@debian.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox