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/05/24 02:12:26 UTC

[GitHub] [apisix-java-plugin-runner] licheng541472110 opened a new issue, #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

licheng541472110 opened a new issue, #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146

   1. debug mode is ok (调试模式运行正常) 
   
   `java -jar -DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock -DAPISIX_CONF_EXPIRE_TIME=3600 /path/to/apisix-java-plugin-runner.jar`
   说明:使用这种方式运行是正常的,并且过滤能够生效。
    It is normal to run in this way, and the filtering can take effect.
   
   2.run mode error (运行模式报错)
   `ext-plugin:
     cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/path/to/apisix-runner-bin/apisix-java-plugin-runner.jar']`
   说明:通过APISIX 自身运行的方式报错,查看日志文件如下:
   Report an error through APISIX's own operation, check the log file as follows:
   
   
   `
   java.lang.IllegalStateException: Failed to execute CommandLineRunner
    at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:822) [spring-boot-2.4.5.jar!/:2.4.5]
    at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:803) [spring-boot-2.4.5.jar!/:2.4.5]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:346) [spring-boot-2.4.5.jar!/:2.4.5]
    at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:144) [spring-boot-2.4.5.jar!/:2.4.5]
    at org.apache.apisix.plugin.runner.PluginRunnerApplication.main(PluginRunnerApplication.java:30) [classes!/:0.2.0]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
    at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
    at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
    at java.lang.reflect.Method.invoke(Method.java:566) ~[?:?]
    at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:49) [apisix-java-plugin-runner.jar:0.2.0]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:108) [apisix-java-plugin-runner.jar:0.2.0]
    at org.springframework.boot.loader.Launcher.launch(Launcher.java:58) [apisix-java-plugin-runner.jar:0.2.0]
    at org.springframework.boot.loader.PropertiesLauncher.main(PropertiesLauncher.java:467) [apisix-java-plugin-runner.jar:0.2.0]
   Caused by: io.netty.channel.unix.Errors$NativeIoException: bind(..) failed: No such file or directory`
   
   


-- 
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.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135440508

   ref: #137 
   
   Or give the complete reproduction steps.


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


[GitHub] [apisix-java-plugin-runner] licheng541472110 commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
licheng541472110 commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135454285

   > 参考:#137
   > 
   > 或者给出完整的复制步骤。
   
   Please see reply


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


[GitHub] [apisix-java-plugin-runner] licheng541472110 commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
licheng541472110 commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135587221

   > > "['java', '-jar', '-DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock', '-DAPISIX_CONF_EXPIRE_TIME=3600', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar']"
   > 
   > in run model, no need to set it up like this.
   > 
   > From your description of the reproduction steps, I was unable to reproduce them.
   > 
   > I think you can check if the `.sock` file exists under `apisix/conf/`.
   > 
   > In run mode, APISIX will generate the sock file under `apisix/conf/` and pass the address to the java runner.
   
   ”/usr/local/apisix/conf“
   There is no .sock file in the directory, whether it is related to permissions, the debug mode is started with the java command executed by "root".
   
   
   When called via APISIX program an error is displayed:
   ”2022/05/24 01:33:02 [error] 9728#9746: lua pipe child execvp() failed while executing java -jar ... (2: No such file or directory)“
   
   
   
   


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


[GitHub] [apisix-java-plugin-runner] licheng541472110 commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
licheng541472110 commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135448886

   1.The operating system is centos7. Running in debug mode, everything works fine.
   After compiling the jar file, after running the following command, the configuration and enabling plugin can be used normally.
   
   "java -jar -DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock -DAPISIX_CONF_EXPIRE_TIME=3600 /home/apisix-java-plugin-runner.jar"
   
   "ext-plugin:
     path_for_test: /tmp/runner.sock"
   
   **2.The mode of switching to official operation cannot run successfully**
   
   Modify the configuration file "config.yaml"
   
   The following is the configuration according to the document, which does not work properly
   
   "ext-plugin:
     cmd: ['java', '-jar', '-Xmx4g', '-Xms4g', '/home/apisix-java-plugin-runner.jar'] "
   
   
   Try to modify it to the following parameters, the access route can display the request header, but not the main body.
   
   "['java', '-jar', '-DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock', '-DAPISIX_CONF_EXPIRE_TIME=3600', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar']"
   
   
   According to the document, I have tried many times, but it can only run normally in the debug mode, and it can never be successful in the official running mode.
   
   Can you speak Chinese
   


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


[GitHub] [apisix-java-plugin-runner] licheng541472110 closed issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
licheng541472110 closed issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146


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


[GitHub] [apisix-java-plugin-runner] licheng541472110 commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
licheng541472110 commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135611889

   > > "['java', '-jar', '-DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock', '-DAPISIX_CONF_EXPIRE_TIME=3600', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar']"
   > 
   > in run model, no need to set it up like this.
   > 
   > From your description of the reproduction steps, I was unable to reproduce them.
   > 
   > I think you can check if the `.sock` file exists under `apisix/conf/`.
   > 
   > In run mode, APISIX will generate the sock file under `apisix/conf/` and pass the address to the java runner.
   
   
   Thanks! The problem is solved, jdk is the decompressed version, you need to specify the full path of java.
   
   Modify it to the following configuration:
   
   ext-plugin:
     cmd: ['/home/jdk11/java', '-jar', '-Xmx4g', '-Xms4g', '/home/apisix-java-plugin-runner.jar']
   


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


[GitHub] [apisix-java-plugin-runner] tzssangglass commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by GitBox <gi...@apache.org>.
tzssangglass commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1135573339

   > "['java', '-jar', '-DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock', '-DAPISIX_CONF_EXPIRE_TIME=3600', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar']"
   
   in run model, no need to set it up like this.
   
   From your description of the reproduction steps, I was unable to reproduce them.
   
   I think you can check if the `.sock` file exists under `apisix/conf/`.
   
   In run mode, APISIX will generate the sock file under `apisix/conf/` and pass the address to the java runner.


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


[GitHub] [apisix-java-plugin-runner] caojianfei commented on issue #146: debug mode is ok,run mode error (调试模式运行正常,运行模式报错)

Posted by "caojianfei (via GitHub)" <gi...@apache.org>.
caojianfei commented on issue #146:
URL: https://github.com/apache/apisix-java-plugin-runner/issues/146#issuecomment-1620032841

   > > > "['java', '-jar', '-DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock', '-DAPISIX_CONF_EXPIRE_TIME=3600', '-Xmx4g', '-Xms4g', '/usr/local/apisix-runner-bin/apisix-java-plugin-runner.jar']"
   > > 
   > > 
   > > in run model, no need to set it up like this.
   > > From your description of the reproduction steps, I was unable to reproduce them.
   > > I think you can check if the `.sock` file exists under `apisix/conf/`.
   > > In run mode, APISIX will generate the sock file under `apisix/conf/` and pass the address to the java runner.
   > 
   > Thanks! The problem is solved, jdk is the decompressed version, you need to specify the full path of java.
   > 
   > Modify it to the following configuration:
   > 
   > ext-plugin: cmd: ['/home/jdk11/java', '-jar', '-Xmx4g', '-Xms4g', '/home/apisix-java-plugin-runner.jar']
   
   我跟你有同样的问题?当时我用完整的java路径还是报同样的错误,你是在修改了java执行路径之后就解决问题了吗?


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