Skip to content

help request: Decoupled deployment mode DP module cannot get the latest routing and upstream information #9049

Description

@sggene

Description

At present, I have tried to deploy in docker-compose and helm chart mode, but there are problems with routing failure and upstream address failure to update;

Next, I will describe how the docker-compose deployment method replicates the problem, as well as the entire attachment information of my docker-compose.

1.git clone https://github.com/apache/apisix-docker.git

2.Modify the configuration and change it to Decoupled mode. See the attachment (including certificate file)

3.Authorization log related files

`chmod 777 apisix_cp_log/ apisix_dp_log/  certs/ -R`

4.Start Service 
`docker-compose -p docker-api up -d`

5.Create route
---
curl -X PUT http://127.0.0.1:9180/apisix/admin/routes/1     -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1' -i -d '
{
    "methods": ["GET"],
    "uri": "/web1",
    "upstream": {
        "type": "roundrobin",
        "nodes": {
            "web1:80": 1
        }
    }
}'
---
6.Request DP service, return 404

[root@master01 example]# curl http://127.0.0.1:9080/web1
{"error_msg":"404 Route Not Found"}
7.Confirm that the route write succeeded
![image](https://user-images.githubusercontent.com/57084209/224220993-e8727c19-dc5c-49a7-bf54-104e26cfd148.png)
8.Restart DP service
`docker restart docker-apisix_apisix-dp_1 `
9.Request again to return to normal.
[root@master01 example]# curl http://127.0.0.1:9080/web1
hello web1

So far, if the DP service is not restarted, the routing cannot take effect

I don't know whether there is a problem with my configuration. I have studied this problem for a long time and still haven't made any progress
example.zip
;

Environment

  • APISIX version (run apisix version): 3.2.0
  • Operating system (run uname -a): Linux master01 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
  • OpenResty / Nginx version (run openresty -V or nginx -V): nginx version: openresty/1.21.4.1
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info): {"hostname":"162d98767e64","id":"8cd6dc41-d64f-4d5d-ad0f-46a4ec423bf0","boot_time":1678421364,"etcd_version":"unknown","version":"3.2.0"}
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

Status
✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions