MXS-2196: Don't start if listeners fail to start
The old behavior is to not start MaxScale if any listeners fail to bind. This behavior is convenient when there are conflicts with other applications so it should remain. This change prevents the internal service restarts from functioning which might have already been broken. The "restarting" of services after a failure to bind to an interface is somewhat questionable. Almost no transient errors are expected at startup with the exception of running out of sockets. This should probably be the only case when the internal service restart is done and in other cases it causes more harm than good.
This commit is contained in:
parent
6206abde3e
commit
459eb003de
@ -988,7 +988,7 @@ bool Listener::listen()
|
||||
case MXS_AUTH_LOADUSERS_FATAL:
|
||||
MXS_ERROR("[%s] Fatal error when loading users for listener '%s', "
|
||||
"service is not started.", m_service->name, name());
|
||||
return 0;
|
||||
return false;
|
||||
|
||||
case MXS_AUTH_LOADUSERS_ERROR:
|
||||
MXS_WARNING("[%s] Failed to load users for listener '%s', authentication"
|
||||
|
@ -338,6 +338,10 @@ int serviceStartAllPorts(Service* service)
|
||||
{
|
||||
++listeners;
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (service->state == SERVICE_STATE_FAILED)
|
||||
|
Loading…
x
Reference in New Issue
Block a user