插件启动服务端消费端正常,浏览器报错如下:
HTTP Status 500 - Request processing failed; nested exception is com.alibaba.dubbo.rpc.RpcException: Failed to invoke the method queryNow in the service com.taotao.service.TestService. Tried 3 times of the providers 192.168.0.101:20880 from the registry 192.168.25.128:2181 on the consumer 192.168.0.101 using the dubbo version 2.5.3. Last error is: Invoke remote method timeout. method: queryNow, provider: dubbo://192.168.0.101:20880/com.taotao.service.TestService?anyhost=true&application=taotao-manager-web&check=false&dubbo=2.5.3&interface=com.taotao.service.TestService&methods=queryNow&pid=2352&revision=0.0.1-SNAPSHOT&side=consumer×tamp=1541930359643, cause: Waiting server-side response timeout. start time: 2018-11-11 17:59:32.747, end time: 2018-11-11 17:59:33.749, client elapsed: 1 ms, server elapsed: 1001 ms, timeout: 1000 ms, request: Request [id=2, version=2.0.0, twoway=true, event=false, broken=false, data=RpcInvocation [methodName=queryNow, parameterTypes=[], arguments=[], attachments={path=com.taotao.service.TestService, interface=com.taotao.service.TestService, version=0.0.0}]], channel: /192.168.0.101:58405 -> /192.168.0.101:20880
接口如下:
public interface TestMapper{
pubilc String queryNow();
}
实现如下:
select NOW()
表现层如下
@Controller
public class TestController {
@Autowired
private TestService testservice;
/**
* 测试dubbo配置是否正常
* @return
*/
@RequestMapping("/test/queryNow")
@ResponseBody
public String queryNow(){
return testservice.queryNow();
}
}
dubbo配置都是复制学习资料,查了很多遍肯定没问题。timeout已经设置过,无论设多长时间就报多长时间的错。没用