invoke:
invoke executes the dubbo method
Some dubbo version parameter objects need to specify the class in json, and specify the parameter type. If it is not passed in, the call will fail. For related questions, please refer to this why the higher version of dubbo is not friendly to telnet support.
比如有接口com.jianhao84.service.TestService.test(Person person),Person对象有name和age属性: 情况1:dubbo2.5.3版本,传入以下json字符串就行 {"name":"QQQ","age":18} 情况2:dubbo2.x.x(其他高版本,我也没所有版本都测试,反正就这两种参数方式自己试)需要在json中指定class路径.假设Person类的完整包路径为:com.jianhao84.bean.Person,就需要传入以下json才行 {"name":"QQQ","age":18,"class":"com.jianhao84.bean.Person"}
background:
Request to call dubbo interface
The development and testing environment is normal , and the deployment line call interface appears Caution: request is not finished yet. Maybe there is a difference in environment configuration. The problem may not be in the code. It may be a network problem.
Processing route:
Check the server log and pay attention to the location of the log (Extension: What types of logs are stored in the Tomcat log file)
Test whether the remote server can be accessed:
telnet ip port
If the test passes, ls view the list of dubbo interfaces
invoke executes the Dubbo method (curl command can be used to splice the request data to test the front-end request interface)
invoke com.xxx.XxxService.xxxMethod({"key" : "value"})
The interface is invoked successfully, and there is response data (contradictory point: the invoke interface is successful but the front-end interface access fails, follow-up contact the network team to investigate and increase the routing problem to solve )
route add -net 10.XXX.XXX.XXX netmask 255.255.255.0 gw 192.XXX.XXX.XXX
Processing conclusion:
- Add routing configuration
- Migrateable code Put the dubbo interface processing logic in other servers that can be called normally. Not tested, it should be feasible