wz510172336 opened a new issue #372: 我的服务模块连接不上alpha集群,以至于在全局事务时用restemplete 访问不了模块url URL: https://github.com/apache/servicecomb-pack/issues/372 报这个错误: 2019-01-03 06:48:01.006 ERROR 40 --- [nio-8080-exec-1] o.a.s.s.o.transaction.SagaStartAspect : Transaction 8018b128-a32b-4e08-befb-6c31c1262d0a failed. is org.springframework.web.client.ResourceAccessException: I/O error on POST request for "http://account-service.servicecomb.io:8080/account/128/4": Connection refused (Connection refused); nested exception is java.net.ConnectException: Connection refused (Connection refused)] with root cause java.net.ConnectException: Connection refused (Connection refused 我代码是这样的: @RestController @Slf4j public class MerchantAccountController { @Autowired private RestTemplate restTemplate; @Value("${account-service.service.address:http://account-service.servicecomb.io:8080}") private String accoountUrl; @Value("${businesses-service.service.address:http://businesses-service.servicecomb.io:8080}") private String businessesUrl; @SagaStart @PostMapping("/num/caculate/{num1}/{num2}") public void numCaculate(@PathVariable Integer num1, @PathVariable Integer num2) { log.info("saga事务start"); //全局事务 restTemplate.postForEntity(accoountUrl+"/account/{num1}/{num2}",null,String.class,num1,num2); restTemplate.postForEntity(businessesUrl+"/merchant/{num1}/{num2}",null,String.class,num1,num2); log.info("saga事务结束"); } }
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services