For some reason Im getting a 400 back when registering with a Eureka on Amazon. At first I thought it had to do with the known issue with eureka js client, however, after apply the fixes for that issue it works locally, but not when datacenter object is Amazon. It seems to fetch the metadata from amazon, applies it to the eureka-js-client config object using local, then make the POST request, but it seems to respond with 400 status.
Here is my config object:
// eureka server host / port
Error: eureka registration FAILED: status: 400 body: [object Object]
at Request.self.callback (/usr/app/node_modules/request/request.js:186:22)
at nextTask (/usr/app/node_modules/async/dist/async.js:5195:29)
at apply (/usr/app/node_modules/async/dist/async.js:41:25)
at Request._callback (/usr/app/node_modules/eureka-js-client/lib/EurekaClient.js:570:9)
Answered this in the GitHub issue as well, but putting it here for posterity =).
For Amazon datacenters (and the newer eureka JSON format), I think you'll need to pass a different value for
@class. Try using:
If you still get a bad request, sometimes it helps to make the request manually to the service (since that's all this client does), if you have Postman or a similar tool, that would work. You can also set
NODE_DEBUG=request to see what's happening at the request level in the client.