sashapolo commented on code in PR #816:
URL: https://github.com/apache/ignite-3/pull/816#discussion_r887790764


##########
modules/configuration/src/main/java/org/apache/ignite/internal/rest/configuration/exception/handler/IgniteExceptionHandler.java:
##########
@@ -0,0 +1,43 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.rest.configuration.exception.handler;
+
+import io.micronaut.context.annotation.Requires;
+import io.micronaut.http.HttpRequest;
+import io.micronaut.http.HttpResponse;
+import io.micronaut.http.annotation.Produces;
+import io.micronaut.http.server.exceptions.ExceptionHandler;
+import jakarta.inject.Singleton;
+import 
org.apache.ignite.configuration.validation.ConfigurationValidationException;
+import org.apache.ignite.internal.rest.api.ErrorResult;
+import org.apache.ignite.lang.IgniteException;
+
+/**
+ * Handles {@link ConfigurationValidationException} and represents it as a 
rest response.
+ */
+@Produces
+@Singleton
+@Requires(classes = {IgniteException.class, ExceptionHandler.class})
+public class IgniteExceptionHandler implements 
ExceptionHandler<IgniteException, HttpResponse<ErrorResult>> {
+
+    @Override
+    public HttpResponse<ErrorResult> handle(HttpRequest request, 
IgniteException exception) {
+        ErrorResult errorResult = new ErrorResult("APPLICATION_EXCEPTION", 
exception.getMessage());
+        return HttpResponse.badRequest().body(errorResult);

Review Comment:
   Same here, I don't think it should be a "bad request"



##########
modules/cluster-management/src/main/java/org/apache/ignite/internal/cluster/management/rest/exception/handler/IgniteInternalExceptionHandler.java:
##########
@@ -0,0 +1,42 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.ignite.internal.cluster.management.rest.exception.handler;
+
+import io.micronaut.context.annotation.Requires;
+import io.micronaut.http.HttpRequest;
+import io.micronaut.http.HttpResponse;
+import io.micronaut.http.annotation.Produces;
+import io.micronaut.http.server.exceptions.ExceptionHandler;
+import jakarta.inject.Singleton;
+import org.apache.ignite.internal.rest.api.ErrorResult;
+import org.apache.ignite.lang.IgniteInternalException;
+
+/**
+ * Handles {@link IgniteInternalException} and represents it as a rest 
response.
+ */
+@Produces
+@Singleton
+@Requires(classes = {IgniteInternalException.class, ExceptionHandler.class})
+public class IgniteInternalExceptionHandler implements 
ExceptionHandler<IgniteInternalException, HttpResponse<ErrorResult>> {
+
+    @Override
+    public HttpResponse<ErrorResult> handle(HttpRequest request, 
IgniteInternalException exception) {
+        ErrorResult errorResult = new ErrorResult("INITIALIZATION_EXCEPTION", 
exception.getMessage());
+        return HttpResponse.badRequest().body(errorResult);

Review Comment:
   Are you sure it should be a "bad request` errror?



##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java:
##########
@@ -17,151 +17,161 @@
 
 package org.apache.ignite.internal.rest;
 
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelFuture;
-import io.netty.handler.logging.LogLevel;
-import io.netty.handler.logging.LoggingHandler;
+import io.micronaut.context.ApplicationContext;
+import io.micronaut.http.server.exceptions.ServerStartupException;
+import io.micronaut.openapi.annotation.OpenAPIInclude;
+import io.micronaut.runtime.Micronaut;
+import io.micronaut.runtime.exceptions.ApplicationStartupException;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.info.Contact;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.info.License;
 import java.net.BindException;
-import java.net.InetSocketAddress;
-import java.util.function.Consumer;
+import java.util.List;
+import java.util.Map;
 import org.apache.ignite.configuration.schemas.rest.RestConfiguration;
 import org.apache.ignite.configuration.schemas.rest.RestView;
-import org.apache.ignite.internal.configuration.ConfigurationManager;
-import org.apache.ignite.internal.configuration.ConfigurationRegistry;
+import 
org.apache.ignite.internal.cluster.management.rest.ClusterManagementController;
 import org.apache.ignite.internal.manager.IgniteComponent;
-import org.apache.ignite.internal.rest.api.RestHandlersRegister;
-import org.apache.ignite.internal.rest.api.Routes;
-import org.apache.ignite.internal.rest.netty.RestApiInitializer;
-import org.apache.ignite.internal.rest.routes.Router;
-import org.apache.ignite.internal.rest.routes.SimpleRouter;
-import org.apache.ignite.lang.IgniteException;
+import org.apache.ignite.internal.rest.api.RestFactory;
+import 
org.apache.ignite.internal.rest.configuration.ClusterConfigurationController;
+import 
org.apache.ignite.internal.rest.configuration.NodeConfigurationController;
 import org.apache.ignite.lang.IgniteInternalException;
 import org.apache.ignite.lang.IgniteLogger;
-import org.apache.ignite.network.NettyBootstrapFactory;
 
 /**
- * Rest component is responsible for starting REST endpoints.
+ * Rest module is responsible for starting REST endpoints for accessing and 
managing configuration.
  *
- * <p>It is started on port 10300 by default, but it is possible to change 
this in configuration itself. Refer to default config file in
+ * <p>It is started on port 10300 by default but it is possible to change this 
in configuration itself. Refer to default config file in
  * resources for the example.
  */
-public class RestComponent implements RestHandlersRegister, IgniteComponent {
+@OpenAPIDefinition(info = @Info(title = "Ignite REST module", version = 
"3.0.0-alpha", license = @License(name = "Apache 2.0", url = 
"https://ignite.apache.org";), contact = @Contact(email = 
"[email protected]")))
+@OpenAPIInclude(classes = {ClusterConfigurationController.class, 
NodeConfigurationController.class, ClusterManagementController.class})
+public class RestComponent implements IgniteComponent {
+    /** Default port. */
+    public static final int DFLT_PORT = 10300;
+
+    /** Server host. */
+    private static final String LOCALHOST = "localhost";
+
     /** Ignite logger. */
     private final IgniteLogger log = 
IgniteLogger.forClass(RestComponent.class);
 
-    /** Node configuration register. */
-    private final ConfigurationRegistry nodeCfgRegistry;
+    /** Factories that produce beans needed for REST controllers. */
+    private final List<RestFactory> restFactories;
 
-    /** Netty bootstrap factory. */
-    private final NettyBootstrapFactory bootstrapFactory;
+    private final RestConfiguration restConfiguration;
 
-    private final SimpleRouter router = new SimpleRouter();
+    /** Micronaut application context. */
+    private volatile ApplicationContext context;
 
-    /** Netty channel. */
-    private volatile Channel channel;
+    /** Server port. */
+    private int port;
 
     /**
      * Creates a new instance of REST module.
-     *
-     * @param nodeCfgMgr       Node configuration manager.
-     * @param bootstrapFactory Netty bootstrap factory.
      */
-    public RestComponent(ConfigurationManager nodeCfgMgr, 
NettyBootstrapFactory bootstrapFactory) {
-        nodeCfgRegistry = nodeCfgMgr.configurationRegistry();
-
-        this.bootstrapFactory = bootstrapFactory;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void registerHandlers(Consumer<Routes> registerAction) {
-        registerAction.accept(router);
+    public RestComponent(List<RestFactory> restFactories, RestConfiguration 
restConfiguration) {
+        this.restFactories = restFactories;
+        this.restConfiguration = restConfiguration;
     }
 
     /** {@inheritDoc} */
     @Override
     public void start() {
-        if (channel != null) {
-            throw new IgniteException("RestModule is already started.");
-        }
-
-        channel = startRestEndpoint(router).channel();
-    }
-
-    /**
-     * Start endpoint.
-     *
-     * @param router Dispatcher of http requests.
-     * @return Future which will be notified when this channel is closed.
-     * @throws RuntimeException if this module cannot be bound to a port.
-     */
-    private ChannelFuture startRestEndpoint(Router router) {
-        RestView restConfigurationView = 
nodeCfgRegistry.getConfiguration(RestConfiguration.KEY).value();
+        RestView restConfigurationView = restConfiguration.value();
 
         int desiredPort = restConfigurationView.port();
         int portRange = restConfigurationView.portRange();
 
-        int port = 0;
-        Channel ch = null;
-
-        ServerBootstrap bootstrap = bootstrapFactory.createServerBootstrap()
-                .handler(new LoggingHandler(LogLevel.INFO))
-                .childHandler(new RestApiInitializer(router));
-
         for (int portCandidate = desiredPort; portCandidate <= desiredPort + 
portRange; portCandidate++) {
-            ChannelFuture bindRes = 
bootstrap.bind(portCandidate).awaitUninterruptibly();
-
-            if (bindRes.isSuccess()) {
-                ch = bindRes.channel();
+            try {
+                context = buildMicronautContext(portCandidate).start();
                 port = portCandidate;
+                log.info("REST protocol started successfully");
+                return;
+            } catch (ApplicationStartupException e) {
+                if (isBindExceptionInside(e)) {

Review Comment:
   I would suggest to introduce a `findBindException` method that will return 
an exception or `null`. `e.getCause().getCause().getCause()` looks really weird



##########
parent/pom.xml:
##########
@@ -473,6 +475,55 @@
                 <version>${micronaut.version}</version>
             </dependency>
 
+            <dependency>
+                <groupId>io.micronaut</groupId>

Review Comment:
   So, what about using a `bom`?



##########
modules/cli/src/integrationTest/java/org/apache/ignite/cli/ItConfigCommandTest.java:
##########
@@ -169,11 +166,9 @@ public void partialGet() {
 
         assertEquals(0, exitCode);
 
-        JSONObject outResult = (JSONObject) 
JSONValue.parse(removeTrailingQuotes(unescapeQuotes(out.toString(UTF_8))));
-
-        assertTrue(outResult.containsKey("inbound"));
+        assertTrue(out.toString(UTF_8).contains("\"inbound\""));

Review Comment:
   It's a bit strange that you decided to use `assertThat` above, but not here)



##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java:
##########
@@ -17,151 +17,161 @@
 
 package org.apache.ignite.internal.rest;
 
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelFuture;
-import io.netty.handler.logging.LogLevel;
-import io.netty.handler.logging.LoggingHandler;
+import io.micronaut.context.ApplicationContext;
+import io.micronaut.http.server.exceptions.ServerStartupException;
+import io.micronaut.openapi.annotation.OpenAPIInclude;
+import io.micronaut.runtime.Micronaut;
+import io.micronaut.runtime.exceptions.ApplicationStartupException;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.info.Contact;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.info.License;
 import java.net.BindException;
-import java.net.InetSocketAddress;
-import java.util.function.Consumer;
+import java.util.List;
+import java.util.Map;
 import org.apache.ignite.configuration.schemas.rest.RestConfiguration;
 import org.apache.ignite.configuration.schemas.rest.RestView;
-import org.apache.ignite.internal.configuration.ConfigurationManager;
-import org.apache.ignite.internal.configuration.ConfigurationRegistry;
+import 
org.apache.ignite.internal.cluster.management.rest.ClusterManagementController;
 import org.apache.ignite.internal.manager.IgniteComponent;
-import org.apache.ignite.internal.rest.api.RestHandlersRegister;
-import org.apache.ignite.internal.rest.api.Routes;
-import org.apache.ignite.internal.rest.netty.RestApiInitializer;
-import org.apache.ignite.internal.rest.routes.Router;
-import org.apache.ignite.internal.rest.routes.SimpleRouter;
-import org.apache.ignite.lang.IgniteException;
+import org.apache.ignite.internal.rest.api.RestFactory;
+import 
org.apache.ignite.internal.rest.configuration.ClusterConfigurationController;
+import 
org.apache.ignite.internal.rest.configuration.NodeConfigurationController;
 import org.apache.ignite.lang.IgniteInternalException;
 import org.apache.ignite.lang.IgniteLogger;
-import org.apache.ignite.network.NettyBootstrapFactory;
 
 /**
- * Rest component is responsible for starting REST endpoints.
+ * Rest module is responsible for starting REST endpoints for accessing and 
managing configuration.
  *
- * <p>It is started on port 10300 by default, but it is possible to change 
this in configuration itself. Refer to default config file in
+ * <p>It is started on port 10300 by default but it is possible to change this 
in configuration itself. Refer to default config file in
  * resources for the example.
  */
-public class RestComponent implements RestHandlersRegister, IgniteComponent {
+@OpenAPIDefinition(info = @Info(title = "Ignite REST module", version = 
"3.0.0-alpha", license = @License(name = "Apache 2.0", url = 
"https://ignite.apache.org";), contact = @Contact(email = 
"[email protected]")))
+@OpenAPIInclude(classes = {ClusterConfigurationController.class, 
NodeConfigurationController.class, ClusterManagementController.class})
+public class RestComponent implements IgniteComponent {
+    /** Default port. */
+    public static final int DFLT_PORT = 10300;
+
+    /** Server host. */
+    private static final String LOCALHOST = "localhost";
+
     /** Ignite logger. */
     private final IgniteLogger log = 
IgniteLogger.forClass(RestComponent.class);
 
-    /** Node configuration register. */
-    private final ConfigurationRegistry nodeCfgRegistry;
+    /** Factories that produce beans needed for REST controllers. */
+    private final List<RestFactory> restFactories;
 
-    /** Netty bootstrap factory. */
-    private final NettyBootstrapFactory bootstrapFactory;
+    private final RestConfiguration restConfiguration;
 
-    private final SimpleRouter router = new SimpleRouter();
+    /** Micronaut application context. */
+    private volatile ApplicationContext context;
 
-    /** Netty channel. */
-    private volatile Channel channel;
+    /** Server port. */
+    private int port;
 
     /**
      * Creates a new instance of REST module.
-     *
-     * @param nodeCfgMgr       Node configuration manager.
-     * @param bootstrapFactory Netty bootstrap factory.
      */
-    public RestComponent(ConfigurationManager nodeCfgMgr, 
NettyBootstrapFactory bootstrapFactory) {
-        nodeCfgRegistry = nodeCfgMgr.configurationRegistry();
-
-        this.bootstrapFactory = bootstrapFactory;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void registerHandlers(Consumer<Routes> registerAction) {
-        registerAction.accept(router);
+    public RestComponent(List<RestFactory> restFactories, RestConfiguration 
restConfiguration) {
+        this.restFactories = restFactories;
+        this.restConfiguration = restConfiguration;
     }
 
     /** {@inheritDoc} */
     @Override
     public void start() {
-        if (channel != null) {
-            throw new IgniteException("RestModule is already started.");
-        }
-
-        channel = startRestEndpoint(router).channel();
-    }
-
-    /**
-     * Start endpoint.
-     *
-     * @param router Dispatcher of http requests.
-     * @return Future which will be notified when this channel is closed.
-     * @throws RuntimeException if this module cannot be bound to a port.
-     */
-    private ChannelFuture startRestEndpoint(Router router) {
-        RestView restConfigurationView = 
nodeCfgRegistry.getConfiguration(RestConfiguration.KEY).value();
+        RestView restConfigurationView = restConfiguration.value();
 
         int desiredPort = restConfigurationView.port();
         int portRange = restConfigurationView.portRange();
 
-        int port = 0;
-        Channel ch = null;
-
-        ServerBootstrap bootstrap = bootstrapFactory.createServerBootstrap()
-                .handler(new LoggingHandler(LogLevel.INFO))
-                .childHandler(new RestApiInitializer(router));
-
         for (int portCandidate = desiredPort; portCandidate <= desiredPort + 
portRange; portCandidate++) {
-            ChannelFuture bindRes = 
bootstrap.bind(portCandidate).awaitUninterruptibly();
-
-            if (bindRes.isSuccess()) {
-                ch = bindRes.channel();
+            try {
+                context = buildMicronautContext(portCandidate).start();
                 port = portCandidate;

Review Comment:
   unfortunately this is not correct. If you want to avoid making `port` 
variable `volatile` and guard it with `context` accesses, you must always write 
to the `port` variable **before** writing to the `context` variable. Same 
applies to reading, but in reverse order



##########
modules/rest/src/main/java/org/apache/ignite/internal/rest/RestComponent.java:
##########
@@ -17,151 +17,161 @@
 
 package org.apache.ignite.internal.rest;
 
-import io.netty.bootstrap.ServerBootstrap;
-import io.netty.channel.Channel;
-import io.netty.channel.ChannelFuture;
-import io.netty.handler.logging.LogLevel;
-import io.netty.handler.logging.LoggingHandler;
+import io.micronaut.context.ApplicationContext;
+import io.micronaut.http.server.exceptions.ServerStartupException;
+import io.micronaut.openapi.annotation.OpenAPIInclude;
+import io.micronaut.runtime.Micronaut;
+import io.micronaut.runtime.exceptions.ApplicationStartupException;
+import io.swagger.v3.oas.annotations.OpenAPIDefinition;
+import io.swagger.v3.oas.annotations.info.Contact;
+import io.swagger.v3.oas.annotations.info.Info;
+import io.swagger.v3.oas.annotations.info.License;
 import java.net.BindException;
-import java.net.InetSocketAddress;
-import java.util.function.Consumer;
+import java.util.List;
+import java.util.Map;
 import org.apache.ignite.configuration.schemas.rest.RestConfiguration;
 import org.apache.ignite.configuration.schemas.rest.RestView;
-import org.apache.ignite.internal.configuration.ConfigurationManager;
-import org.apache.ignite.internal.configuration.ConfigurationRegistry;
+import 
org.apache.ignite.internal.cluster.management.rest.ClusterManagementController;
 import org.apache.ignite.internal.manager.IgniteComponent;
-import org.apache.ignite.internal.rest.api.RestHandlersRegister;
-import org.apache.ignite.internal.rest.api.Routes;
-import org.apache.ignite.internal.rest.netty.RestApiInitializer;
-import org.apache.ignite.internal.rest.routes.Router;
-import org.apache.ignite.internal.rest.routes.SimpleRouter;
-import org.apache.ignite.lang.IgniteException;
+import org.apache.ignite.internal.rest.api.RestFactory;
+import 
org.apache.ignite.internal.rest.configuration.ClusterConfigurationController;
+import 
org.apache.ignite.internal.rest.configuration.NodeConfigurationController;
 import org.apache.ignite.lang.IgniteInternalException;
 import org.apache.ignite.lang.IgniteLogger;
-import org.apache.ignite.network.NettyBootstrapFactory;
 
 /**
- * Rest component is responsible for starting REST endpoints.
+ * Rest module is responsible for starting REST endpoints for accessing and 
managing configuration.
  *
- * <p>It is started on port 10300 by default, but it is possible to change 
this in configuration itself. Refer to default config file in
+ * <p>It is started on port 10300 by default but it is possible to change this 
in configuration itself. Refer to default config file in
  * resources for the example.
  */
-public class RestComponent implements RestHandlersRegister, IgniteComponent {
+@OpenAPIDefinition(info = @Info(title = "Ignite REST module", version = 
"3.0.0-alpha", license = @License(name = "Apache 2.0", url = 
"https://ignite.apache.org";), contact = @Contact(email = 
"[email protected]")))
+@OpenAPIInclude(classes = {ClusterConfigurationController.class, 
NodeConfigurationController.class, ClusterManagementController.class})
+public class RestComponent implements IgniteComponent {
+    /** Default port. */
+    public static final int DFLT_PORT = 10300;
+
+    /** Server host. */
+    private static final String LOCALHOST = "localhost";
+
     /** Ignite logger. */
     private final IgniteLogger log = 
IgniteLogger.forClass(RestComponent.class);
 
-    /** Node configuration register. */
-    private final ConfigurationRegistry nodeCfgRegistry;
+    /** Factories that produce beans needed for REST controllers. */
+    private final List<RestFactory> restFactories;
 
-    /** Netty bootstrap factory. */
-    private final NettyBootstrapFactory bootstrapFactory;
+    private final RestConfiguration restConfiguration;
 
-    private final SimpleRouter router = new SimpleRouter();
+    /** Micronaut application context. */
+    private volatile ApplicationContext context;
 
-    /** Netty channel. */
-    private volatile Channel channel;
+    /** Server port. */
+    private int port;
 
     /**
      * Creates a new instance of REST module.
-     *
-     * @param nodeCfgMgr       Node configuration manager.
-     * @param bootstrapFactory Netty bootstrap factory.
      */
-    public RestComponent(ConfigurationManager nodeCfgMgr, 
NettyBootstrapFactory bootstrapFactory) {
-        nodeCfgRegistry = nodeCfgMgr.configurationRegistry();
-
-        this.bootstrapFactory = bootstrapFactory;
-    }
-
-    /** {@inheritDoc} */
-    @Override
-    public void registerHandlers(Consumer<Routes> registerAction) {
-        registerAction.accept(router);
+    public RestComponent(List<RestFactory> restFactories, RestConfiguration 
restConfiguration) {
+        this.restFactories = restFactories;
+        this.restConfiguration = restConfiguration;
     }
 
     /** {@inheritDoc} */
     @Override
     public void start() {
-        if (channel != null) {
-            throw new IgniteException("RestModule is already started.");
-        }
-
-        channel = startRestEndpoint(router).channel();
-    }
-
-    /**
-     * Start endpoint.
-     *
-     * @param router Dispatcher of http requests.
-     * @return Future which will be notified when this channel is closed.
-     * @throws RuntimeException if this module cannot be bound to a port.
-     */
-    private ChannelFuture startRestEndpoint(Router router) {
-        RestView restConfigurationView = 
nodeCfgRegistry.getConfiguration(RestConfiguration.KEY).value();
+        RestView restConfigurationView = restConfiguration.value();
 
         int desiredPort = restConfigurationView.port();
         int portRange = restConfigurationView.portRange();
 
-        int port = 0;
-        Channel ch = null;
-
-        ServerBootstrap bootstrap = bootstrapFactory.createServerBootstrap()
-                .handler(new LoggingHandler(LogLevel.INFO))
-                .childHandler(new RestApiInitializer(router));
-
         for (int portCandidate = desiredPort; portCandidate <= desiredPort + 
portRange; portCandidate++) {
-            ChannelFuture bindRes = 
bootstrap.bind(portCandidate).awaitUninterruptibly();
-
-            if (bindRes.isSuccess()) {
-                ch = bindRes.channel();
+            try {
+                context = buildMicronautContext(portCandidate).start();
                 port = portCandidate;
+                log.info("REST protocol started successfully");
+                return;
+            } catch (ApplicationStartupException e) {
+                if (isBindExceptionInside(e)) {
+                    log.error("Got exception " + 
e.getCause().getCause().getCause() + " during node start on port "
+                            + portCandidate + " , trying again");
+                    continue;
+                }
                 break;

Review Comment:
   Looks like in case of `e` not being a `BindException` you will lose the 
exception and will not log it. I think it makes sense to simply re-throw it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to