liguotian opened a new issue, #10895:
URL: https://github.com/apache/dolphinscheduler/issues/10895

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and 
found no similar issues.
   
   
   ### What happened
   
   start a dolphinscheduler in standalone mode, then execute shell or http task 
。
   task execute success,
   but I can view any effective log in LogViewWindow .
   
![image](https://user-images.githubusercontent.com/20315924/178423233-15ca9256-5f64-4f48-9be1-f01982b489ea.png)
   
   And I see an error in sever console 
   ```
   2022-07-12 14:10:38.522  WARN 66317 --- [tp1360125564-23] 
o.a.d.remote.NettyRemotingClient         : connect to 
Host{address='172.16.0.63:50051', ip='172.16.0.63', port=50051} error
   
   io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection 
refused: /172.16.0.63:50051
   Caused by: java.net.ConnectException: Connection refused
        at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) 
~[na:1.8.0_181]
        at 
sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) 
~[na:1.8.0_181]
        at 
io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330)
 ~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334)
 ~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) 
~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650)
 ~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) 
~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) 
~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989)
 ~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at 
io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) 
~[netty-all-4.1.53.Final.jar:4.1.53.Final]
        at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_181]
   ```
   172.16.0.63 is my local host . 
   
   ### What you expected to happen
   
   Task Log View Window should show right task log
   
   ### How to reproduce
   
   1.   sh ./bin/dolphinscheduler-daemon.sh start standalone-server  
   2.  add a workflow and a http Task or shell task 
   3.  run this worlflow
   4. view task log
   
   
   ### Anything else
   
   I try to read code ,i find No LoggerServer started in StandaloneServer .
   ```
   public class StandaloneServer {
       public static void main(String[] args) throws Exception {
           final TestingServer server = new TestingServer(true);
           System.setProperty("registry.servers", server.getConnectString());
   
           new SpringApplicationBuilder(
               ApiApplicationServer.class,
               MasterServer.class,
               WorkerServer.class,
               AlertServer.class,
               PythonGatewayServer.class,
           ).profiles("master", "worker", "api", "alert", "python-gateway", 
"h2", "standalone").run(args);
       }
   }
   ```
   Then I try to add code like this 
   ```
    new SpringApplicationBuilder(
               ApiApplicationServer.class,
               MasterServer.class,
               WorkerServer.class,
               AlertServer.class,
               PythonGatewayServer.class,
               LoggerServerAdapter.class
           ).profiles("master", "worker", "api", "alert", "python-gateway", 
"h2", "standalone").run(args);
   ```
   class LoggerServerAdapter  user for adapting LoggerServer .it code like 
   ```
   public class LoggerServerAdapter implements IStoppable {
   
       private final LoggerServer loggerServer;
   
       public LoggerServerAdapter() {
           this.loggerServer = new LoggerServer();
       }
   
       @PostConstruct
       public void start() {
           this.loggerServer.start();
       }
   
   
       @Override
       public void stop(String cause) {
           this.loggerServer.stop();
       }
   }
   ```
   
   And There exist another problem: StandaloneServer have no logback.xml , add 
a new logback.xml  for standalone mode and config in  
dolphinscheduler-daemon.sh  .
   
   
   does this problem fix in official feature Or Bugfix  or should I  to submit 
any PR
   
   
   
   ### Version
   
   2.0.5
   
   ### Are you willing to submit PR?
   
   - [X] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


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