pawarJayesh8511 opened a new issue #4920:
URL: https://github.com/apache/apisix/issues/4920
### Issue description
I have configured the eureka registry service. Details as follows:
Step 1: Configured route as follows:
{
"key":"apisix/routes/811",
"createdIndex":2133,
"modifiedIndex":2359,
"value":{
"update_time":1630219113,
"id":"811",
"priority":0,
"uri":"/api/eurekaRegistry",
"create_time":1630208406,
"upstream":{
"discovery_type":"eureka",
"scheme":"http",
"service_name":"microservice1",
"hash_on":"vars",
"type":"roundrobin",
"pass_host":"pass"
},
"status":1
}
}
Step 2: Followed the steps in https://apisix.apache.org/docs/apisix/discovery
But, not sure what do you mean by "How convert Eureka's
instance data to APISIX's node?"
i.e where to execute it? how to execute it? Or where and
how to configure it? Documentation is not very clear about this step.
Step 3: Executed this "curl http://127.0.0.1:9090/v1/discovery/eureka/dump"
Response:
{
"config":{
"weight":100,
"timeout":{
"read":5000,
"connect":2000,
"send":2000
},
"fetch_interval":30,
"prefix":"\/eureka\/",
"host":[
"http:\/\/xxx.xxx.xxx.1:8761"
]
},
"services":{
"MICRO-SERVICE1":[
{
"weight":100,
"port":9282,
"metadata":{
"management.port":"9282"
},
"host":"xxx.xxx.xx.1"
}
]
}
}
Step 4: My eureka and upstream service with name "MICRO-SERVICE1" both are
working fine.
But, when I tried to call the actual endpoint i.e "curl
http://127.0.0.1:9080/api/eurekaRegistry"
I am getting following error:
<html>
<head><title>503 Service Temporarily Unavailable</title></head>
<body>
<center><h1>503 Service Temporarily Unavailable</h1></center>
<hr><center>openresty</center>
</body>
</html>
Step 5: Upstream service is up and running:
curl http://xxx.xxx.xx.1:9282/api/eurekaRegistry
Output : "This endpoint is for eureka registry. version 1"
Step 6: Loggers:
error.log:
2021/08/29 19:47:05 [error] 6062#6062: *33409 [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"
access.log
127.0.0.1 - - [29/Aug/2021:19:47:05 +0530] 127.0.0.1:9080 "GET
/api/eurekaRegistry HTTP/1.1" 503 194 0.000 "-" "curl/7.68.0" - - -
"http://127.0.0.1:9080"
127.0.0.1 - - [29/Aug/2021:19:51:28 +0530] 127.0.0.1:9080 "GET
/api/eurekaRegistry HTTP/1.1" 503 194 0.000 "-" "curl/7.68.0" - - -
"http://127.0.0.1:9080"
I tried to stop and start APISIX multiple times. I am still getting the same
error. i.e upstream is not getting called via apisix.
could you please let me know what is the solution for this issue?
### Environment
apisix version (cmd: apisix version): 2.8
OS (cmd: uname -a): Linux my-machine 5.11.0-27-generic
conf: removed user resty and add server header. #29~20.04.1-Ubuntu SMP Wed
Aug 11 15:58:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
OpenResty / Nginx version (cmd: nginx -V or openresty -V): nginx version:
openresty/1.19.9.1
etcd version, if have (cmd: run curl http://127.0.0.1:9090/v1/server_info to
get the info from server-info API): 3.4.0
apisix-dashboard version, if have: 2.7
luarocks version, if the issue is about installation (cmd: luarocks
--version): 3.4.0
### Steps to reproduce
Followed the steps in https://apisix.apache.org/docs/apisix/discovery
But, not sure what do you mean by "How convert Eureka's
instance data to APISIX's node?"
i.e where to execute it? how to execute it? Or where and
how to configure it? Documentation is not very clear about this step.
### Actual result
"curl http://127.0.0.1:9080/api/eurekaRegistry"
I am getting following error:
<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
error.log:
2021/08/29 19:47:05 [error] 6062#6062: *33409 [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"
access.log
127.0.0.1 - - [29/Aug/2021:19:47:05 +0530] 127.0.0.1:9080 "GET
/api/eurekaRegistry HTTP/1.1" 503 194 0.000 "-" "curl/7.68.0" - - -
"http://127.0.0.1:9080"
127.0.0.1 - - [29/Aug/2021:19:51:28 +0530] 127.0.0.1:9080 "GET
/api/eurekaRegistry HTTP/1.1" 503 194 0.000 "-" "curl/7.68.0" - - -
"http://127.0.0.1:9080"
### Expected result
"curl http://127.0.0.1:9080/api/eurekaRegistry"
Output: "This endpoint is for eureka registry. version 1"
i.e APISIX should detect the eureka service and give the result.
--
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]