HSF接口 报错问题排查--阿里大牛的技术功底。。。开眼了。。。

对着背影说爱祢 提交于 2020-04-17 21:28:43

遇到一个诡异的问题:

注意这个方法:我在mz-sys中定义了这个方法:请注意是参数是大Long 不是小long;

/**
     * hsf 勿动接口,交易结算都在用
     * 根据ID查询
     *
     * @param promotionId 参数
     *
     *                    hsf这个接口有问题
     * @return ResultData<PromotionChannelDTO>
     */
    ResultData<PromotionChannelDTO> getPromotionChannelById(Long promotionId);

这个 hsf方法,对方在调用的时候,有时候是好的,有时候有问题,非常奇怪;

我的解决方法:

(1)首先去代码里面看看是不是有个这个方法,确实有,也部署到服务器上了,二方包版本也正确。

 

(2) 于是我把mz-sys的 日常机器和 天启机器全部下掉了;

方法参考:删除日常和天启机器

新上了两台机器,但是还是不行,一会儿 有错,一会儿 没错,

(3) 后来使用了 jad 发现 这个类的参数跟以前比不同了

jad 是个反编译软件 参考:jad使用

jad的安装:jad安装

具体为:选择管理员==>

 

2、管理员这里选择 组管理员==>

 

 3、进来之后就可以执行:

(a) curl -L http://start.alibaba-inc.com/install.sh | sh

然后:as.sh

(b)然后执行: jad jad org.apache.log4j.Logger 就能看到结果了

4、然后再执行: 

jad cn.damai.mz.server.sys.api.service.PromotionChannelServerService

结果就出来了:

这是我的执行记录:

[admin@mz-sys100081123153.eu95sqa /home/admin]
$curl -L http://start.alibaba-inc.com/install.sh | sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   278  100   278    0     0   3074      0 --:--:-- --:--:-- --:--:--  3123
100   978  100   978    0     0   5194      0 --:--:-- --:--:-- --:--:--  5194
downloading... ./as.sh.142150
Arthas install successed.

[admin@mz-sys100081123153.eu95sqa /home/admin]
$./as.sh
Arthas script version: 3.0.2-20190403
Try out Arthas online: http://start.alibaba-inc.com/arthas/web-console
[INFO] JAVA_HOME: /opt/taobao/install/ajdk-8.3.6_fp5-b21


Found existing java process, please choose one and hit RETURN.
  [1]: 1685 ./lib/rbc-deamon.jar
* [2]: 114825 com.taobao.pandora.boot.loader.SarLauncher
updating version 3.1.7 ...
######################################################################## 100.0%
Archive:  /tmp/temp_3.1.7_142300/arthas-3.1.7-bin.zip
  inflating: /tmp/temp_3.1.7_142300/as-service.bat
  inflating: /tmp/temp_3.1.7_142300/arthas-core.jar
  inflating: /tmp/temp_3.1.7_142300/as.sh
  inflating: /tmp/temp_3.1.7_142300/arthas-boot.jar
  inflating: /tmp/temp_3.1.7_142300/arthas-agent.jar
  inflating: /tmp/temp_3.1.7_142300/arthas-spy.jar
  inflating: /tmp/temp_3.1.7_142300/install-local.sh
  inflating: /tmp/temp_3.1.7_142300/arthas-demo.jar
  inflating: /tmp/temp_3.1.7_142300/as.bat
  inflating: /tmp/temp_3.1.7_142300/arthas-client.jar
   creating: /tmp/temp_3.1.7_142300/async-profiler/
  inflating: /tmp/temp_3.1.7_142300/async-profiler/libasyncProfiler-linux-x64.so
  inflating: /tmp/temp_3.1.7_142300/async-profiler/libasyncProfiler-mac-x64.so
update completed.
Calculating attach execution time...
Attaching to 114825 using version 3.1.7...

real  0m0.626s
user  0m0.255s
sys 0m0.028s
Attach success.
Connecting to arthas server... current timestamp is 1585140785
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
  ,---.  ,------. ,--------.,--.  ,--.  ,---.   ,---.
 /  O  \ |  .--. ''--.  .--'|  '--'  | /  O  \ '   .-'
|  .-.  ||  '--'.'   |  |   |  .--.  ||  .-.  |`.  `-.
|  | |  ||  |\  \    |  |   |  |  |  ||  | |  |.-'    |
`--' `--'`--' '--'   `--'   `--'  `--'`--' `--'`-----'


wiki      https://alibaba.github.io/arthas
tutorials https://alibaba.github.io/arthas/arthas-tutorials
version   3.1.7
pid       114825
time      2020-03-25 20:53:05

[arthas@114825]$ jad jad org.apache.log4j.Logger
No class found for: jad
Affect(row-cnt:0) cost in 276 ms.
[arthas@114825]$ jad org.apache.log4j.Logger

 Found more than one class for: org.apache.log4j.Logger, Please use jad -c <hashcode> org.apache.log4j.Logger
 HASHCODE  CLASSLOADER
 1d3ac898  +-pandolet's ModuleClassLoader
 5ef5c734  +-monitor's ModuleClassLoader
 312aa7c   +-com.taobao.pandora.boot.loader.LaunchedURLClassLoader@312aa7c
             +-sun.misc.Launcher$AppClassLoader@18b4aac2
               +-sun.misc.Launcher$ExtClassLoader@47f37ef1
 5674e1f2  +-pandora-framework's ModuleClassLoader
 1c852c0f  +-java.net.URLClassLoader@1c852c0f
             +-sun.misc.Launcher$ExtClassLoader@47f37ef1
 1e8ce150  +-pandora-qos-service's ModuleClassLoader
 ccb4b1b   +-scm2's ModuleClassLoader
 10ded6a9  +-unitrouter's ModuleClassLoader
 363042d7  +-eagleeye-core's ModuleClassLoader

Affect(row-cnt:0) cost in 56 ms.
[arthas@114825]$ jad cn.damai.mz.server.sys.api.service.PromotionChannelServerService

ClassLoader:
+-com.taobao.pandora.boot.loader.LaunchedURLClassLoader@312aa7c
  +-sun.misc.Launcher$AppClassLoader@18b4aac2
    +-sun.misc.Launcher$ExtClassLoader@47f37ef1

Location:
/home/admin/mz-sys/target/mz-sys/BOOT-INF/classes/

/*
 * Decompiled with CFR.
 *
 * Could not load the following classes:
 *  cn.damai.mz.common.domain.ResultData
 *  cn.damai.mz.common.domain.ResultPager
 *  cn.damai.mz.server.sys.api.dto.PromotionChannelDTO
 *  cn.damai.mz.server.sys.api.dto.PromotionChannelTreeDTO
 *  cn.damai.mz.server.sys.api.param.PromotionChannelApiParam
 */
package cn.damai.mz.server.sys.api.service;

import cn.damai.mz.common.domain.ResultData;
import cn.damai.mz.common.domain.ResultPager;
import cn.damai.mz.server.sys.api.dto.PromotionChannelDTO;
import cn.damai.mz.server.sys.api.dto.PromotionChannelTreeDTO;
import cn.damai.mz.server.sys.api.param.PromotionChannelApiParam;
import java.util.List;
import java.util.Map;

public interface PromotionChannelServerService {
    public ResultPager<PromotionChannelDTO> list(PromotionChannelApiParam var1);

    public ResultData<Integer> save(PromotionChannelDTO var1);

    public ResultData<Integer> update(PromotionChannelDTO var1);

    public ResultData<PromotionChannelDTO> getPromotionChannelById(long var1);

    public ResultData<List<PromotionChannelDTO>> getPromotionChannelByName(String var1, Long var2);

    public ResultPager<PromotionChannelDTO> listChannelGroupInfo(PromotionChannelApiParam var1);

    public ResultData<List<PromotionChannelTreeDTO>> listChannelTree(PromotionChannelApiParam var1);

    public ResultPager<PromotionChannelDTO> listPromoteChannel(PromotionChannelApiParam var1);

    public ResultData<List<PromotionChannelDTO>> listAll(PromotionChannelApiParam var1);

    public ResultData<Long> delete(Long var1, Long var2, Long var3);

    public ResultPager<PromotionChannelDTO> listChannelFuzzy(PromotionChannelApiParam var1);

    public ResultData<List<PromotionChannelDTO>> getPromotionChannelByIds(List<Long> var1);

    public Map<Long, String> listPromotionChannelNameByIds(List<Long> var1);

    public boolean checkDuplicate(String var1, Long var2);

    public ResultData<Boolean> turnOrOffChannel(PromotionChannelDTO var1);
}

Affect(row-cnt:1) cost in 1211 ms.
[arthas@114825]$

 

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!