Chef-server services are down

The following two services are down in chef-server.
When i try restarting the service it will start and when I check back the status again it will be down again.

down: bookshelf: 0s, want up; run: log: (pid 1249) 5119249s
down: postgresql: 0s, want up; run: log: (pid 1252) 5119249s

Could I get any inputs/help on this to get rid of this issue, why it is happening else let me know if my approach to issue is wrong.

Try a chef-server-ctl tail postgresql and chef-server-ctl tail bookshelf and post the logs.

The below are the logs for both,

----------------------------------------logs of bookshelf--------------------------------------------
2016-11-24_09:19:30.99384 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:32.15658 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:33.24761 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:34.33068 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:35.41067 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:36.51136 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:37.62666 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}
2016-11-24_09:19:38.69642 Usage: bookshelf {start|stop|restart|reboot|ping|console|console_clean|attach}

----------------------------------------logs of postgresql-------------------------------------------
2016-11-24_09:18:56.53277 WARNING: could not create listen socket for "0.0.0.0"
2016-11-24_09:18:56.53328 FATAL: could not create any TCP/IP sockets
2016-11-24_09:18:57.58564 LOG: could not bind IPv4 socket: Address already in use
2016-11-24_09:18:57.58568 HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.

2016-11-24_09:18:57.58570 WARNING: could not create listen socket for "0.0.0.0"
2016-11-24_09:18:57.58571 FATAL: could not create any TCP/IP sockets
2016-11-24_09:18:58.65030 LOG: could not bind IPv4 socket: Address already in use
2016-11-24_09:18:58.65033 HINT: Is another postmaster already running on port 5432? If not, wait a few seconds and retry.

Seems postgres can’t start because something is using the port 5432, you can have a look at what with netstat -anpe - grep ':5432'.

Either it’s a dead process,or you have another postgres on the system using the port, a reboot should clean it up for the first case, for the later, you’re on your own, mixing chef-server with something else is not recommended unless you know what you’re doing.