postgresql and firewald startup

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

postgresql and firewald startup

jeandet alexis
Hello,

I have a server running F25 with postgresql and firewald configured.
On startup postgreslq always fail to start complaining about port 5432. I did allow this port on the firewall, if I start manually postgresql after it works.
So I did plot the startup sequence (systemd-analyse plot), I saw that pgsql start after dbus.service but much before the firewall. Is there something wrong with the default config of pgsql systemd unit?
Or more likely, what did I miss? mess :)?

boot graph:

Best regards,
Alexis

_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postgresql and firewald startup

Samuel Sieb
On 06/09/2017 12:09 AM, Jeandet Alexis wrote:
> I have a server running F25 with postgresql and firewald configured.
> On startup postgreslq always fail to start complaining about port 5432.
> I did allow this port on the firewall, if I start manually postgresql
> after it works.

Can you paste the exact error?  Even if firewalld was running, it
shouldn't block postgresql from listening on the port.
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postgresql and firewald startup

Gordon Messmer-2
In reply to this post by jeandet alexis
On 06/09/2017 12:09 AM, Jeandet Alexis wrote:
> On startup postgreslq always fail to start complaining about port 5432.


My first guess would be that you've configured postgresql to listen on a
specific IP address, and when you do that, the service needs to depend
on "network-online.target" instead of "network.target."

Run "systemctl edit postgresql.service" and insert two lines:

[Unit]
After=network-online.target
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: postgresql and firewald startup

jeandet alexis
Hi Gordon,

Thanks that fixed the issue, indeed I configured it to listen on a specific IP. 
I didn't know the exact difference between network and network-online targets.
Best regards,
Alexis.
Le vendredi 09 juin 2017 à 17:31 -0700, Gordon Messmer a écrit :
On 06/09/2017 12:09 AM, Jeandet Alexis wrote:
On startup postgreslq always fail to start complaining about port 5432.


My first guess would be that you've configured postgresql to listen on a 
specific IP address, and when you do that, the service needs to depend 
on "network-online.target" instead of "network.target."

Run "systemctl edit postgresql.service" and insert two lines:

[Unit]
After=network-online.target
_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]

_______________________________________________
users mailing list -- [hidden email]
To unsubscribe send an email to [hidden email]
Loading...