You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "guoshupei (via GitHub)" <gi...@apache.org> on 2023/02/06 10:12:12 UTC

[GitHub] [linkis] guoshupei opened a new issue, #4153: [Bug] Linkis gateway throw 500 Server Error

guoshupei opened a new issue, #4153:
URL: https://github.com/apache/linkis/issues/4153

   ### Search before asking
   
   - [X] I searched the [issues](https://github.com/apache/linkis/issues) and found no similar issues.
   
   
   ### Linkis Component
   
   linkis-spring-cloud-services
   
   ### Steps to reproduce
   
   error log: 500 Server Error for HTTP POST "/api/rest_j/v1/entrance/submit" java.util.NoSuchElementException: None.get
   
   ![image](https://user-images.githubusercontent.com/29919212/216944410-e8e5e2aa-9f10-446a-a8a3-816814797503.png)
   
   
   ### Expected behavior
   
   no error
   
   ### Your environment
   
   <!-- Please describe the linkis version you are using and basic environment information -->
   <!-- 请描述您使用的linkis版本和基本环境信息 -->
   - Linkis version used: 1.3.2
   
   
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] Yes I am willing to submit a PR!


-- 
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@linkis.apache.org.apache.org

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


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


[GitHub] [linkis] guoshupei commented on issue #4153: [Bug] Linkis gateway throw 500 Server Error

Posted by "guoshupei (via GitHub)" <gi...@apache.org>.
guoshupei commented on issue #4153:
URL: https://github.com/apache/linkis/issues/4153#issuecomment-1418844487

   The root cause is that the ribbon's ServerList is not refreshed in time
   
   First,  you can add default handling of `super.choose(serviceInstance.getApplicationName, hint)`
   
   ```
         override def choose(serviceId: String, hint: Any): client.ServiceInstance = {
           if (isMergeModuleInstance(serviceId)) {
             val serviceInstance = getServiceInstance(serviceId)
             logger.info("redirect to " + serviceInstance)
             val lb = this.getLoadBalancer(serviceInstance.getApplicationName)
             val serverOption =
               lb.getAllServers.asScala.find(_.getHostPort == serviceInstance.getInstance)
             if (serverOption.isDefined) {
               val server = serverOption.get
               new RibbonLoadBalancerClient.RibbonServer(
                 serviceId,
                 server,
                 isSecure(server, serviceId),
                 serverIntrospectorFun(serviceId).getMetadata(server)
               )
             } else {
               logger.warn("RibbonLoadBalancer not have Server, execute default super choose method" + serviceInstance)
               super.choose(serviceInstance.getApplicationName, hint)
             }
           } else super.choose(serviceId, hint)
         }
   ```
   
   Second, you can shorten the refresh time in `application-linkis.yml`, default 30s
   
   ```
   ribbon:
     ServerListRefreshInterval: 10000
       
   ```


-- 
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@linkis.apache.org

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


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


[GitHub] [linkis] github-actions[bot] commented on issue #4153: [Bug] Linkis gateway throw 500 Server Error

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #4153:
URL: https://github.com/apache/linkis/issues/4153#issuecomment-1418832059

   ## :blush:  Welcome to the Apache Linkis community!!
   We are glad that you are contributing by opening this issue.
   
   Please make sure to include all the relevant context.
   We will be here shortly.
   
   If you are interested in contributing to our website project, please let us know!
   You can check out our contributing guide on
    :point_right:  [How to Participate in Project Contribution](https://linkis.apache.org/community/how-to-contribute).
   
   
   ### Community
   
   |WeChat Assistant|WeChat Public Account|
   |-|-|
   |<img src="https://linkis.apache.org/Images/wedatasphere_contact_01.png" width="128"/>|<img src="https://linkis.apache.org/Images/gzh_01.png" width="128"/>|
   
   
   ### Mailing Lists
   |Name|Description|Subscribe|Unsubscribe|Archive|
   |:-----|:--------|:------|:-------|:-----|
   | [dev@linkis.apache.org](mailto:dev@linkis.apache.org) | community activity information | [subscribe](mailto:dev-subscribe@linkis.apache.org) | [unsubscribe](mailto:dev-unsubscribe@linkis.apache.org) | [archive](http://mail-archives.apache.org/mod_mbox/linkis-dev) |


-- 
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@linkis.apache.org

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


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


[GitHub] [linkis] casionone closed issue #4153: [Bug] Linkis gateway throw 500 Server Error

Posted by "casionone (via GitHub)" <gi...@apache.org>.
casionone closed issue #4153: [Bug] Linkis gateway throw 500 Server Error
URL: https://github.com/apache/linkis/issues/4153


-- 
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@linkis.apache.org

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


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