1
votes

I'm using Spring Cloud Netflix Eureka to handle microservices (mcs) routings. One of the mcs's is a Node.js mcs.

I tried using a dependency from npm called eureka-js-client, but it always reports 404. I checked out the netflix cloud documentation and saw that the logs from node.js and saw that the service is trying to register via URL:

POST http://localhost:8761/eureka/v2/apps/{appID}

While the eureka server is located at that port, when I try to ping the URL via postman, I always get 404. I tried to GET /eureka/v2/apps as well, but also get 404. When I go to http://localhost:8761 via browser, I still get the standard eureka dashboard and all of the Spring Boot (eureka client) microservices are registered correctly.

Configuration for the eureka server is pretty simple so far:

# bootstrap.yml
spring:
  application:
    name: router
eureka:
  client:
    register-with-eureka: false
    fetch-registry: false

# application.yml
server:
  port: 8761

Is there a configuration that I need to set up, or did I miss the point completely?

I'm still tingling with eureka, so sorry if the question is too basic.

Thanks in advance!

1
if you have a public github repo I would love to see a link. - Winnemucca

1 Answers

3
votes

it is /eureka/apps not /eureka/v2/apps , if you are using spring-cloud-eureka.

Although in pure eureka github wiki it says the context path has v2, it is for pure eureka. If you use @EnableEurekaServer, which is in Spring Cloud Context, the context path of Eureka is changed.

By the way, the dashboard is in spring-cloud-eureka. There is no such looking dashboard in pure eureka