Facing issues while creating a route to consul #9759
Unanswered
suniljangir-datdyn
asked this question in
Q&A
Replies: 1 comment
-
@suniljangir-datdyn Can you try using a separate port? apisix/conf/config-default.yaml Line 620 in f2337f2 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have successfully set up APISIX in Docker, along with Consul.
To integrate Consul with APISIX, I followed the instructions provided in this article: (https://apisix.apache.org/blog/2022/02/25/consul-api-gateway/).
So far, I have achieved the following:
Everything appears to be functioning correctly up to this point.
However, I encountered an issue when attempting to create a route and enable Consul, following the instructions provided in the article, I sent the following request:
curl http://127.0.0.1:9080/apisix/admin/routes -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -X POST -d '
{
"uri": "/consul/*",
"upstream": {
"service_name": "http://consul-server1:8500/v1/kv/upstreams/webpages/",
"type": "roundrobin",
"discovery_type": "consul_kv"
}
}'
Unfortunately, my route was not created, and I received a 404 response with the error message: "404 Route Not Found."
I have attached the Consul configuration from apisix_conf/config.yml and the docker-compose file for reference. (file extension is changed to .txt as I can't upload YML files here directly.)
If anyone encountered the same, please have a look and suggest how can I solve this.
P.S. - I've tried service_name as "upstreams", "upstreams/webpages" and "webpages" as some websites had stated that you just need to put the service name only, instead of the URL. But nothing changed.
config.yaml.txt
docker-compose.yml_temp1.txt
docker-compose.yml_temp.txt
Beta Was this translation helpful? Give feedback.
All reactions