Код: Выделить всё
http://192.168.3.177:8761/eureka
Проблем http://localhost:8761/eureka and fails with a Connection refused error.
However, if I run the Eureka client on the same machine as the Eureka server, it works correctly.
Eureka Client Configuration:
Here is the configuration in Application.properties клиента Eureka:
Код: Выделить всё
eureka.client.service-url.default-zone=http://192.168.3.177:8761/eureka
Код: Выделить всё
@SpringBootApplication
@EnableFeignClients("com.samsan.currencyconversionservice")
@EnableDiscoveryClient
public class CurrencyConversionServiceApplication {
public static void main(String[] args) {
SpringApplication.run(CurrencyConversionServiceApplication.class, args);
}
}
Код: Выделить всё
@Component
@FeignClient(name="currency-exchange-service")
@RibbonClient(name="currency-exchange-service")
public interface CurrencyExchangeService {
@GetMapping("/currency-exchange/from/{from}/to/{to}")
public CurrencyConversionBean getExchangeValue(@PathVariable("from") String from, @PathVariable("to") String to);
}
Почему клиент Eureka игнорирует настроенный IP -адрес сервера и дефолтирование Localhost: 8761/Eureka ?
Как я могу сделать клиент Eureka правильно подключаться к серверу Eureka, работающему на другой машине?>
Подробнее здесь: https://stackoverflow.com/questions/581 ... -server-ip