tswstarplanet opened a new issue #3157:
URL: https://github.com/apache/incubator-dolphinscheduler/issues/3157


   *For better global communication, please give priority to using English 
description, thx! *
   
   **Describe the bug**
   look at the code of NettyRemotingServer
   ```java
       public void start(){
   
           if(this.isStarted.get()){
               return;
           }
   
           this.serverBootstrap
                   .group(this.bossGroup, this.workGroup)
                   .channel(NioServerSocketChannel.class)
                   .option(ChannelOption.SO_REUSEADDR, true)
                   .option(ChannelOption.SO_BACKLOG, 
serverConfig.getSoBacklog())
                   .childOption(ChannelOption.SO_KEEPALIVE, 
serverConfig.isSoKeepalive())
                   .childOption(ChannelOption.TCP_NODELAY, 
serverConfig.isTcpNoDelay())
                   .childOption(ChannelOption.SO_SNDBUF, 
serverConfig.getSendBufferSize())
                   .childOption(ChannelOption.SO_RCVBUF, 
serverConfig.getReceiveBufferSize())
                   .childHandler(new ChannelInitializer<NioSocketChannel>() {
   
                       @Override
                       protected void initChannel(NioSocketChannel ch) throws 
Exception {
                           initNettyChannel(ch);
                       }
                   });
   
           ChannelFuture future;
           try {
               future = 
serverBootstrap.bind(serverConfig.getListenPort()).sync();
           } catch (Exception e) {
               logger.error("NettyRemotingServer bind fail {}, 
exit",e.getMessage(), e);
               throw new RuntimeException(String.format("NettyRemotingServer 
bind %s fail", serverConfig.getListenPort()));
           }
           if (future.isSuccess()) {
               logger.info("NettyRemotingServer bind success at port : {}", 
serverConfig.getListenPort());
           } else if (future.cause() != null) {
               throw new RuntimeException(String.format("NettyRemotingServer 
bind %s fail", serverConfig.getListenPort()), future.cause());
           } else {
               throw new RuntimeException(String.format("NettyRemotingServer 
bind %s fail", serverConfig.getListenPort()));
           }
           //
           isStarted.compareAndSet(false, true);
       }
   ```
   If multiple threads execute the method at a time, it may start the netty 
server multiple times.
   **To Reproduce**
   Steps to reproduce the behavior, for example:
   1. Go to '...'
   2. Click on '....'
   3. Scroll down to '....'
   4. See error
   
   **Expected behavior**
   A clear and concise description of what you expected to happen.
   
   **Screenshots**
   If applicable, add screenshots to help explain your problem.
   
   
   **Which version of Dolphin Scheduler:**
    -[1.1.0-preview]
   
   **Additional context**
   Add any other context about the problem here.
   
   **Requirement or improvement
   - Please describe about your requirements or improvement suggestions.
   


----------------------------------------------------------------
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.

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


Reply via email to