You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/08/29 14:29:44 UTC
[GitHub] [apisix] pawarJayesh8511 opened a new issue #4920: bug: eureka registry integration with apisix is not calling upstream
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] tzssangglass commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908049440
try to modify the service_name `microservice1` to `MICROSERVICE1 ` in route.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4920:
URL: https://github.com/apache/apisix/issues/4920
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander closed issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
spacewander closed issue #4920:
URL: https://github.com/apache/apisix/issues/4920
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
pawarJayesh8511 commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908029173
Can anyone help to resolve this issue as soon as possible?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
pawarJayesh8511 commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-909435465
Okay. Prefect. Thanks a lot. It worked. It seems APISIX is checking server_name as case sensitive characters.
Anyway, it worked. Thanks again for the help!
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
pawarJayesh8511 commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-909435465
Okay. Prefect. Thanks a lot. It worked. It seems APISIX is checking server_name as case sensitive characters.
Anyway, it worked. Thanks again for the help!
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] spacewander commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
spacewander commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908006974
You configure service name to "microservice1", but it is "MICRO-SERVICE1" in the eureka.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 commented on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
pawarJayesh8511 commented on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908040886
@spacewander : can you please help me out here?
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [apisix] pawarJayesh8511 edited a comment on issue #4920: bug: eureka registry integration with apisix is not calling upstream
Posted by GitBox <gi...@apache.org>.
pawarJayesh8511 edited a comment on issue #4920:
URL: https://github.com/apache/apisix/issues/4920#issuecomment-908040886
@spacewander : can you please help me out here? I am still facing the same issue.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org