diff --git a/server/modules/routing/binlog/blr.c b/server/modules/routing/binlog/blr.c index 930379c12..d69d8fca4 100644 --- a/server/modules/routing/binlog/blr.c +++ b/server/modules/routing/binlog/blr.c @@ -50,6 +50,7 @@ * 30/09/2015 Massimiliano Pinto Addition of send_slave_heartbeat option * 23/10/2015 Markus Makela Added current_safe_event * 27/10/2015 Martin Brampton Amend getCapabilities to return RCAP_TYPE_NO_RSESSION + * 26/11/2015 Massimiliano Pinto Added check for missing service listener * * @endverbatim */ @@ -217,6 +218,14 @@ char task_name[BLRM_TASK_NAME_LEN+1] = ""; return NULL; } + /* Check for listeners associated to this service */ + if (service->ports == NULL) + { + MXS_ERROR("%s: Error: No listener configured for binlogrouter. Add a listener section in config file.", + service->name); + return NULL; + } + /* * We only support one server behind this router, since the server is * the master from which we replicate binlog records. Therefore check