You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/03/30 06:13:40 UTC

[GitHub] [servicecomb-java-chassis] tiwin-lm opened a new issue #1676: microservice response data have a parameter can'n return to client

tiwin-lm opened a new issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676
 
 
   当前我这有个微服务,在端侧请求后返回给端侧的数据中,有一个字段总是丢失,端侧解析后缺一个字段,我尝试通过ip地址直接访问,不走cse的话,返回结果就是正常的,取出服务实例后契约文件也可有这个字段,我用postman测试,用域名访问的话,也是有一样的问题,用ip地址访问就没有问题。返回的就是一个json串,端侧解析这个json串就没有这个字段.
   `public class UserStoryInfo {
       private String topicId;
   
       private int storyType;
   
       private String aesKey;
   
       private String contents;
   
       private String location;
   
       private String deviceName;
   
       private long createTime;
   
       private List<OutputFileInfo> outputFileInfoList;
   
       private List<String> groupIdList;
   
       private int privatePolicy;
   
       private String accountId;
   
       private int remindTag;
   
       private int publishType;
   
       private int viewTimes;
   `
   `public class OutputFileInfo extends OutputFile {
       private int contentIndex;
   
       private String notes;
   
       private OutputFile thumbOutputFile;`
   当前UserStoryInfo就是返回体中的data, 现在就是notes这个字段总是显示不出来。
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605806569
 
 
   `用域名访问的话,也是有一样的问题,用ip地址访问就没有问题`  这个现象很奇怪, 感觉域名和IP不应该有任何差别。 
   
   `端侧解析后缺一个字段` , 这个`端侧`是指什么? 是不是和域名一样,在进入服务之前,还会经过其他处理, 比如 Edge Service? 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] heyile commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
heyile commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605828138
 
 
   > 配置
   
   edge 已经丢失了,这个挺明显的。参考宝哥的建议可以先排查下,很多情况你们能给出demo,问题大部分都自己解决了。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605813605
 
 
   @heyile 
   我理解这个肯定不是共性问题,其他服务肯定没有这样的问题,其实就想问下,这种问题,一般是什么原因导致的,契约文件也配置了,通过ip地址访问返回结果也没有问题,但是通过域名访问,会经过cse,edge,返回结果在edge中解析,字段就已经丢失了

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] tiwin-lm closed issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
tiwin-lm closed issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605811674
 
 
   用域名访问的话,也是有一样的问题,用ip地址访问就没有问题 这个现象很奇怪, 感觉域名和IP不应该有任何差别。
   
   端侧解析后缺一个字段 , 这个端侧是指什么? 是不是和域名一样,在进入服务之前,还会经过其他处理, 比如 Edge Service?
   
   -----yes, 会经过CSE, edge,但是我们在edge中也打log跟踪了,发现在到edge的时候就已经丢失了

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] heyile commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
heyile commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605828419
 
 
   > 用域名访问的话,也是有一样的问题,用ip地址访问就没有问题 这个现象很奇怪, 感觉域名和IP不应该有任何差别。
   > 
   > 端侧解析后缺一个字段 , 这个端侧是指什么? 是不是和域名一样,在进入服务之前,还会经过其他处理, 比如 Edge Service?
   > 
   > -----yes, 会经过CSE, edge,但是我们在edge中也打log跟踪了,发现在到edge的时候就已经丢失了
   
   edge 已经丢失了,这个挺明显的。参考宝哥的建议可以先排查下,很多情况你们能给出demo,问题大部分都自己解决了。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] heyile removed a comment on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
heyile removed a comment on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605828138
 
 
   > 配置
   
   edge 已经丢失了,这个挺明显的。参考宝哥的建议可以先排查下,很多情况你们能给出demo,问题大部分都自己解决了。

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
tiwin-lm commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-610733098
 
 
   问题已经解决,是一个微服务有三个契约文件,存在覆盖情况

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] heyile commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
heyile commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605810194
 
 
   我再本地调用,没有复现问题, 能给一个demo 吗?
   
   ```java
   public class Person {
   
     private String name;
   
     private List<UserInfo> infos;
   }
   
   public class UserInfo extends BaseUserInfo {
     private int axAge;
   
     private String notes;
   }
   
     @RequestMapping(path = "/sayGG", method = RequestMethod.POST)
     public Person sayGG(@RequestParam(name = "name", defaultValue = "test") String name) {
       List<UserInfo> userInfos = new ArrayList<>();
       userInfos.add(new UserInfo().setAxAge(34).setNotes("notes---RKD"));
       Person person = new Person(name, userInfos);
       return person;
     }
       Person sayGG =
           restTemplate.postForObject("cse://springmvc/springmvchello/sayGG?name=renkedong", null, Person.class);
       System.out.println(sayGG);
   
   // 结果如下:
   Person{name='renkedong', infos=[UserInfo{axAge=34, notes='notes---RKD'}]}
   
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [servicecomb-java-chassis] liubao68 commented on issue #1676: microservice response data have a parameter can'n return to client

Posted by GitBox <gi...@apache.org>.
liubao68 commented on issue #1676: microservice response data have a parameter can'n return to client
URL: https://github.com/apache/servicecomb-java-chassis/issues/1676#issuecomment-605824458
 
 
   有可能是在 edge service 丢失的。 你在 edge 中打印日志,是在什么环节? 你可以在 edge 调试下 DefaultHttpClientFilter 的 afterReceiveResponse 方法, 看看是不是 extractResponse的时候丢失的。 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services