ahamdi's picture

Hello,

Postgresql service stopped working after changing network device. the appliance is running as VM in proxmox.

Please help.

 

Thank you

 

 

 

Forum: 
Jeremy Davis's picture

The first thing to do is to check if it's running:
service postgresql status

That should tell you if it's running or not and may also give you some clues on what might be going wrong.

If it's not running, you can start it. If it is running, then you can try to restart it (although I'm not sure that will be enough).

To start (if not running):

service postgresql start

To restart (if already running - you can probably guess this one already):

service postgresql restart

If none of that really helps, then probably the next thing to check is the log file. I don't recall what it is exactly, but it should be in /var/log; probably /var/log/postgres/ or similar. If you have a look in /var/log you should find something that looks relevant. If it doesn't make any sense to you, then feel free to post the bottom ~10-15 lines of it.

Another tool which may come in handy when trying to resolve issues like this is netstat. You can use that to see if it's listening as you expect. So something like this should help:

netstat -l

If that gives too much info and/or is too hard to read, you can pipe the output through grep to search for specific words. Unfortunately, I'm not 100% sure what the name of the postgres process will be but I'll have a guess. E.g. here are a couple of suggestions:

netstat -l | grep postgres
netstat -l | grep pgsql

Hopefully that helps get you started with the troubleshooting. Please let us know how you go.

Ahamdi's picture

Dear Jeremy, First, I would like to let you know that I am very thankful that you replied to my request of help. The problem was so critical to the point that it could create serious damage.   You recommendation to check the log file was the key to identify the problem. I noticed the following message in the log file: 2017-07-07 11:48:08 UTC [563-1] LOG:  specifying both host name and CIDR mask is invalid: "192.1680.0.0/24" As you can see, the problem was that there is a 0 next 168 which was preventing  the server from starting. Once i corrected this mistake, the service started without issues. Thank you again, Regards, Ahamdi
Jeremy Davis's picture

Great news.

Add new comment