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 2022/09/06 00:22:41 UTC

[GitHub] [apisix-docker] cnn007 commented on issue #347: help: 使用example项目创建的服务,启动后 apisix_log/error.log 一直warn

cnn007 commented on issue #347:
URL: https://github.com/apache/apisix-docker/issues/347#issuecomment-1237542525

   > 
   
   部署在一个ECS上,
   ![image](https://user-images.githubusercontent.com/13449400/188522827-d0470114-33f6-4ad4-bbb4-cddfd8ca1780.png)
   
   1.docker-compose.yml
   `
   version: "3"
   
   services:
     apisix-dashboard:
       image: apache/apisix-dashboard:2.13-alpine
       restart: always
       volumes:
       - ./dashboard_conf/conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml
       ports:
       - "9000:9000"
       environment:
         - TZ=Asia/Shanghai
       networks:
         apisix:
   
     apisix:
       image: apache/apisix:2.15.0-alpine
       restart: always
       volumes:
         - ./apisix_log:/usr/local/apisix/logs
         - ./apisix_conf/config.yaml:/usr/local/apisix/conf/config.yaml:ro
       environment:
         - TZ=Asia/Shanghai
       depends_on:
         - etcd
       ##network_mode: host
       ports:
         - "80:9080/tcp"
         - "9091:9091/tcp"
         - "443:9443/tcp"
         - "9092:9092/tcp"
       networks:
         apisix:
   
     etcd:
       image: bitnami/etcd:3.4.15
       restart: always
       volumes:
         - etcd_data:/bitnami/etcd
       environment:
         ETCD_ENABLE_V2: "true"
         ALLOW_NONE_AUTHENTICATION: "yes"
         ETCD_ADVERTISE_CLIENT_URLS: "http://0.0.0.0:2379"
         ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
         TZ: "Asia/Shanghai"
       ports:
         - "2379:2379/tcp"
       networks:
         apisix:
   
     web2:
       image: nginx:1.19.0-alpine
       restart: always
       volumes:
         - ./upstream/web2.conf:/etc/nginx/nginx.conf
       ports:
         - "9082:80/tcp"
       environment:
         - NGINX_PORT=80
         - TZ=Asia/Shanghai
       networks:
         apisix:
   
     prometheus:
       image: prom/prometheus:v2.25.0
       restart: always
       volumes:
         - ./prometheus_conf/prometheus.yml:/etc/prometheus/prometheus.yml
       environment:
         - TZ=Asia/Shanghai
       ports:
         - "9090:9090"
       networks:
         apisix:
   
     grafana:
       image: grafana/grafana:7.3.7
       restart: always
       ports:
         - "3000:3000"
       volumes:
         - "./grafana_conf/provisioning:/etc/grafana/provisioning"
         - "./grafana_conf/dashboards:/var/lib/grafana/dashboards"
         - "./grafana_conf/config/grafana.ini:/etc/grafana/grafana.ini"
       environment:
         - TZ=Asia/Shanghai
       networks:
         apisix:
   
   networks:
     apisix:
       driver: bridge
   
   volumes:
     etcd_data:
       driver: local
   `
   
   2.apisix_config/config.yml
   `
   apisix:
     node_listen: 9080              # APISIX listening port
     enable_ipv6: false
   
     allow_admin:                  # http://nginx.org/en/docs/http/ngx_http_access_module.html#allow
       - 0.0.0.0/0              # We need to restrict ip access rules for security. 0.0.0.0/0 is for test.
   
     admin_key:
       - name: "admin"
         #key: edd1c9f034335f136f87ad84b625c8f1
         key: Wxcm@2022!
         role: admin                 # admin: manage all configuration data
                                     # viewer: only can view configuration data
       - name: "viewer"
         key: viewer123!
         role: viewer
   
     enable_control: true
     control:
       ip: "0.0.0.0"
       port: 9092
   
   etcd:
     host:                           # it's possible to define multiple etcd hosts addresses of the same etcd cluster.
       - "http://etcd:2379"     # multiple etcd address
     prefix: "/apisix"               # apisix configurations prefix
     timeout: 30                     # 30 seconds
   
   plugin_attr:
     prometheus:
       export_addr:
         ip: "0.0.0.0"
         port: 9091
   `
   3.warn信息 error.log
   `
   2022/09/06 08:18:09 [warn] 45#45: *1123430 [lua] v3.lua:213: _request_uri(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.27.0.4, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
   2022/09/06 08:18:54 [warn] 45#45: *1123430 [lua] v3.lua:213: _request_uri(): http://etcd:2379: failed to parse domain: failed to parse domain. Retrying, client: 172.27.0.4, server: , request: "GET /apisix/prometheus/metrics HTTP/1.1", host: "apisix:9091"
   `
   


-- 
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