You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/03/09 07:01:03 UTC

[GitHub] [dubbo] egalee opened a new issue #9752: dubbo 3.0.6 DeployerReadinessProbe 返回状态无法ready

egalee opened a new issue #9752:
URL: https://github.com/apache/dubbo/issues/9752


   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.6
   * Operating System version: windows10
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1. 配置dubbo参数,启动qos
   ```
   dubbo:
     application:
       qos-port: 22222
       qos-enable: true
       qos-accept-foreign-ip: true
   ```
   2. k8s集群配置readiness探针
   ```
     livenessProbe:
   	failureThreshold: 20
   	httpGet:
   	  path: /live
   	  port: 22222
   	  scheme: HTTP
   	periodSeconds: 5
   	successThreshold: 1
   	timeoutSeconds: 1
     readinessProbe:
   	failureThreshold: 20
   	httpGet:
   	  path: /ready
   	  port: 22222
   	  scheme: HTTP
   	periodSeconds: 5
   	successThreshold: 1
   	timeoutSeconds: 1
     startupProbe:
   	failureThreshold: 20
   	httpGet:
   	  path: /startup
   	  port: 22222
   	  scheme: HTTP
   	initialDelaySeconds: 30
   	periodSeconds: 5
   	successThreshold: 1
   	timeoutSeconds: 1
   ```
   
   3.容器中,使用命令行测试readiness探针返回值,永远为false
   ```
   curl http://127.0.0.1:22222/live 
   false
   ```
   5.通过跟踪代码,发现DeployerReadinessProbe的frameworkModel.getAllApplicationModels()中,存在一个modelName为"DUBBO_INTERNAL_APPLICATION"的项目,该项目的启动状态恒为false。
   ```
   package org.apache.dubbo.qos.probe.impl;
   
   import org.apache.dubbo.common.extension.Activate;
   import org.apache.dubbo.qos.probe.ReadinessProbe;
   import org.apache.dubbo.rpc.model.ApplicationModel;
   import org.apache.dubbo.rpc.model.FrameworkModel;
   import org.apache.dubbo.rpc.model.ModuleModel;
   
   import java.util.List;
   
   @Activate
   public class DeployerReadinessProbe implements ReadinessProbe {
       private FrameworkModel frameworkModel;
   
       public DeployerReadinessProbe(FrameworkModel frameworkModel) {
           this.frameworkModel = frameworkModel;
       }
   
       @Override
       public boolean check() {
           if (this.frameworkModel == null) {
               this.frameworkModel = FrameworkModel.defaultModel();
           }
           List<ApplicationModel> applicationModels = frameworkModel.getAllApplicationModels();
           for (ApplicationModel applicationModel : applicationModels) {
               for (ModuleModel moduleModel : applicationModel.getModuleModels()) {
                   // bugfix 不判断 DUBBO_INTERNAL_APPLICATION 的 isStarted 状态
                   if ("DUBBO_INTERNAL_APPLICATION".equals(applicationModel.getModelName())) {
                       continue;
                   }
                   if (!moduleModel.getDeployer().isStarted()) {
                       return false;
                   }
               }
           }
           return true;
       }
   
   }
   ```
   目前,项目中是通过跳过该项目状态检测的方法跳过此bug,现求助社区,寻求权威的解决方法:
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] BurningCN commented on issue #9752: dubbo 3.0.6 DeployerReadinessProbe 返回状态无法ready

Posted by GitBox <gi...@apache.org>.
BurningCN commented on issue #9752:
URL: https://github.com/apache/dubbo/issues/9752#issuecomment-1062672566


   看了下代码,的确是这样。
   `ApplicationModule`的`internalModule`是有start逻辑的(`DefaultApplicationDeployer#prepareInternalModule`)。
   `FrameworkModule`的`internalApplicationModule`没有start的相关逻辑,导致状态一直是`pending`,我觉得应该加一下和前面的`internalModule`统一一下。


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] rainwolf01 commented on issue #9752: dubbo 3.0.6 DeployerReadinessProbe 返回状态无法ready

Posted by GitBox <gi...@apache.org>.
rainwolf01 commented on issue #9752:
URL: https://github.com/apache/dubbo/issues/9752#issuecomment-1062660835


   我也遇到了,请求/ready一直false


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] chickenlj closed issue #9752: dubbo 3.0.6 DeployerReadinessProbe 返回状态无法ready

Posted by GitBox <gi...@apache.org>.
chickenlj closed issue #9752:
URL: https://github.com/apache/dubbo/issues/9752


   


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo] rainwolf01 edited a comment on issue #9752: dubbo 3.0.6 DeployerReadinessProbe 返回状态无法ready

Posted by GitBox <gi...@apache.org>.
rainwolf01 edited a comment on issue #9752:
URL: https://github.com/apache/dubbo/issues/9752#issuecomment-1062660835


   `3.0.6` 我也遇到了,请求`/ready`一直`false`


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org