pawarJayesh8511 commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908040273
I have corrected the name to be same as "microservice1" in both eureka and
route as follows, but still not working.
------------------------------------------------------------------------------------------
Route:
"modifiedIndex": 2911,
"value": {
"priority": 0,
"status": 1,
"id": "811",
"uri": "/api/eurekaRegistry",
"create_time": 1630208406,
"update_time": 1630300553,
"upstream": {
"discovery_type": "eureka",
"service_name": "microservice1",
"type": "roundrobin",
"hash_on": "vars",
"pass_host": "pass",
"scheme": "http"
}
},
"createdIndex": 2133,
"key": "/apisix/routes/811"
},
------------------------------------------------------------------------------------------
Eureka service name
curl http://127.0.0.1:9090/v1/discovery/eureka/dump
Output:
{
"config":{
"timeout":{
"send":2000,
"read":5000,
"connect":2000
},
"host":[
"http:\/\/192.168.56.1:8761"
],
"prefix":"\/eureka\/",
"weight":100,
"fetch_interval":30
},
"services":{
"MICROSERVICE1":[
{
"metadata":{
"management.port":"9282"
},
"weight":100,
"host":"xxx.xxx.xx.1",
"port":9282
}
]
}
}
------------------------------------------------------------------------------------------
Upstream is giving output:
curl http://xxx.xxx.xx.1:9282/api/eurekaRegistry
Output:
This endpoint is for eureka registry. version 1
------------------------------------------------------------------------------------------
APISIX Gateway error:
curl http://127.0.0.1:9080/api/eurekaRegistry
Output:
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>openresty</center>
</body>
</html>
------------------------------------------------------------------------------------------
error.log:
------------------------------------------------------------------------------------------
2021/08/30 10:48:03 [error] 4241#4241: *207987 [lua] init.lua:507:
http_access_phase(): failed to set upstream: no valid upstream node: nil,
client: 127.0.0.1, server: _, request: "GET /api/eurekaRegistry HTTP/1.1",
host: "127.0.0.1:9080"
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]