apache / apisix-java-plugin-runner

APISIX Plugin Runner in Java
https://apisix.apache.org/
Apache License 2.0
126 stars 95 forks source link

when run java plugin ,show error: Could not resolve placeholder 'socket.file' in value "${socket.file}" #257

Open yaakua opened 11 months ago

yaakua commented 11 months ago

Issue description

image

Environment

use docker-compose start apisix\etcd\dashboard I have build a base docker image from apache/apisix:latest ,the Dockefile is:

docker image tag is 192.168.0.118:5001/yaakua/apisix-jdk11:latest

FROM apache/apisix:latest

ADD openjdk-11.0.2_linux-x64_bin.tar.gz /usr/local/java

ENV JAVA_HOME /usr/local/java/jdk-11.0.2
ENV JRE_HOME $JAVA_HOME/jre
ENV CLASSPATH $JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib:$CLASS_PATH

ENV PATH $JAVA_HOME/bin:$PATH

then build a runtime docker image ,the Dockerfile is:

docker image tag is ccr.ccs.tencentyun.com/mychatdata/gateway:latest

FROM 192.168.0.118:5001/yaakua/apisix-jdk11
LABEL authors="yangkui"
#
#RUN apt-get update && apt-get install -y openjdk-11-jdk

COPY target/mychatdata-gateway-0.0.1-SNAPSHOT.jar /app/apisix/mychatdata-gateway-0.0.1-SNAPSHOT.jar

the docker-compose.yaml is:


version: "3"

services:
  dashboard:
    image: "apache/apisix-dashboard:latest"
    restart: always
    volumes:
      - ./dashboard-conf.yaml:/usr/local/apisix-dashboard/conf/conf.yaml:ro
    depends_on:
      - etcd
    ports:
      - "9100:9100/tcp"
    networks:
      - apisix

  etcd:
    image: bitnami/etcd:3.4.9
    user: root
    restart: always
    volumes:
      - ./etcd_data:/etcd_data
    environment:
      ETCD_DATA_DIR: /etcd_data
      ETCD_ENABLE_V2: "true"
      ALLOW_NONE_AUTHENTICATION: "yes"
      ETCD_ADVERTISE_CLIENT_URLS: "http://etcd:2379"
      ETCD_LISTEN_CLIENT_URLS: "http://0.0.0.0:2379"
    ports:
      - "2379:2379/tcp"
    networks:
      - apisix
  apisix:
    #image: "apache/apisix:latest"
    image: "ccr.ccs.tencentyun.com/mychatdata/gateway:latest"
    restart: always
    volumes:
      - ./apisix-conf.yaml:/usr/local/apisix/conf/config.yaml:ro
    depends_on:
      - etcd
    ports:
      - "9180:9180/tcp"
      - "9080:9080/tcp"
      - "9092:9091/tcp"
      - "9443:9443/tcp"
      - "9090:9090/tcp"
    networks:
      - apisix

networks:
  apisix:
    driver: bridge

apisix-config.yaml

image
yuluo-yx commented 11 months ago

You can determine if this file exists by going into the container