Graylog server does not restart after reboot even if it is a service

Hi All,

I have on two CentOS 7 hosts installed Graylog (GL) cluster and I have Mongo cluster running on both boxes,
and elasticsearch (ES) running on one of hosts.
All components are systemd services.
When reboot one host I see ES and Mongo restarted but not GL.
from logs it looks like GL starts first and can not connect to mongo and after 30 sec GL service stops.
But shouldn’t it be that after say every 30 seconds GL tries to reconnect and does it for say 10 times or forever
until mongogo service is available?

Evgueni

Last messages in log:

2017-03-10T23:03:29.028Z INFO  [cluster] No server chosen by WritableServerSelector from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=192.158.204.15:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]}. Waiting for 30000 ms before timing out
2017-03-10T23:03:29.254Z INFO  [cluster] No server chosen by WritableServerSelector from cluster description ClusterDescription{type=UNKNOWN, connectionMode=SINGLE, serverDescriptions=[ServerDescription{address=192.158.204.15:27017, type=UNKNOWN, state=CONNECTING, exception={com.mongodb.MongoSocketOpenException: Exception opening socket}, caused by {java.net.ConnectException: Connection refused}}]}. Waiting for 30000 ms before timing out

You could add a dependency on MongoDB to the Graylog systemd unit if both are running on the same system:
https://github.com/Graylog2/fpm-recipes/issues/75