apache / apisix

The Cloud-Native API Gateway
https://apisix.apache.org/blog/
Apache License 2.0
14.51k stars 2.52k forks source link

help request: configuring requires restarted apisix docker container #10097

Open qinyiying opened 1 year ago

qinyiying commented 1 year ago

Description

I depoly apisix whih docker. there is something strange When I add an route and upstream It must restart apisix process to make it take effect。 I use apisix-dashboard to create route and upstream.

config like :

route define as below:

uri: /* name: wlsq-web methods:


upstream define as below: nodes:

Environment

Revolyssup commented 1 year ago

@qinyiying Can you provide the docker compose that you used? Are there any error logs in the container?

qinyiying commented 1 year ago

my compose.yml this is production environment so contain many ports. I make it as server load balancer.

version: "3"

services:
  apisix-dashboard:
    image: apache/apisix-dashboard:3.0.1-alpine
    restart: unless-stopped
    container_name: dashboard
    volumes:
    - /data/apisix/example/dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
    - /etc/localtime:/etc/localtime:ro
    - /data/apisix/cert.d/:/usr/local/apisix-dashboard/cert.d/:ro
    ports:
    - "9000:9000"
    ulimits:
      nproc: 65535
      nofile:
       soft: 65535
       hard: 65535
    extra_hosts:
      - "etcd1:10.133.109.160"
      - "etcd2:10.133.109.164"
      - "etcd3:10.133.109.201"
      - "etcd4:10.133.109.228"
      - "etcd5:10.133.109.227"
    networks:
      apisix:

  apisix:
    image: apache/apisix:3.2.2-debian
    restart: unless-stopped
    container_name: apisix
    volumes:
      - /data/apisix/example/apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml
      - /data/apisix/cert.d/:/usr/local/apisix/cert.d/:ro
      - /etc/localtime:/etc/localtime:ro
    ports:
      - "80:80/tcp"
      - "443:443/tcp"
      - "4443:4443/tcp"
      - "5100:5100/tcp"
      - "5443:5443/tcp"
      - "6443:6443/tcp"
      - "60006:60006/tcp"
      - "8553:8553/tcp"
      - "8999:8999/tcp"
      - "6224:6224/tcp"
      - "9663:9663/tcp"
      - "18888:18888/tcp"
      - "8091:8091/tcp"
      - "8095:8095/tcp"
      - "8089:8089/tcp"
      - "8021:8021/tcp"
      - "8022:8022/tcp"
      - "8905:8905/tcp"
      - "8020:8020/tcp"
      - "8024:8024/tcp"
      - "8903:8903/tcp"
      - "8224:8224/tcp"
      - "9180:9180/tcp"
      - "127.0.0.1:9092:9092/tcp"   
    extra_hosts:
      - "etcd1:10.133.109.160"
      - "etcd2:10.133.109.164"
      - "etcd3:10.133.109.201"
      - "etcd4:10.133.109.228"
      - "etcd5:10.133.109.227"
    ulimits:
      nproc: 65535
      nofile:
       soft: 65535
       hard: 65535
    user: root
    networks:
      apisix:

networks:
  apisix:
    driver: bridge
    name: apisix_network

And there is no log with error or warn Last 100 lines log of docker apisix: access.log.txt

And here is my apisix config.yaml config.txt

And there is my dashboard conf.yaml conf.txt

And there is my etcd operation log etcd.log

my etcd start systemd script etcd_systemd.log

monkeyDluffy6017 commented 11 months ago

@qinyiying Is this problem fixed?

nthsky commented 8 months ago

I have the same problem. It must restart apisix container to make configs take affect. Apisix version: 3.2.2-debian Dashboard version: 3.0.0-alpine etcd version: 3.5.10