# Chef-server services are down

**URL:** <https://discourse.chef.io/t/chef-server-services-are-down/9928>\
**Category:** Chef Infra (archive)\
**Created:** [November 24, 2016, 6:07am UTC](https://discourse.chef.io/t/chef-server-services-are-down/9928 "2016-11-24T06:07:08Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nikhil](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@nikhil](https://discourse.chef.io/u/nikhil)\
**Post date:** [November 24, 2016, 6:07am UTC](https://discourse.chef.io/t/chef-server-services-are-down/9928/1 "2016-11-24T06:07:08Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [November 24, 2016, 8:33am UTC](https://discourse.chef.io/t/chef-server-services-are-down/9928/2 "2016-11-24T08:33:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nikhil](https://avatars.discourse-cdn.com/v4/letter/n/b782af/32.png) [@nikhil](https://discourse.chef.io/u/nikhil)\
**Post date:** [November 24, 2016, 9:28am UTC](https://discourse.chef.io/t/chef-server-services-are-down/9928/3 "2016-11-24T09:28:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Tensibai](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.chef.io/tensibai/32/29_2.png) [@Tensibai](https://discourse.chef.io/u/Tensibai)\
**Post date:** [November 24, 2016, 10:44am UTC](https://discourse.chef.io/t/chef-server-services-are-down/9928/4 "2016-11-24T10:44:55Z")

</div>

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.
