-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
debug mode is ok,run mode error (调试模式运行正常,运行模式报错) #146
Comments
ref: #137 Or give the complete reproduction steps. |
1.The operating system is centos7. Running in debug mode, everything works fine. "java -jar -DAPISIX_LISTEN_ADDRESS=unix:/tmp/runner.sock -DAPISIX_CONF_EXPIRE_TIME=3600 /home/apisix-java-plugin-runner.jar" "ext-plugin: 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: 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 |
Please see reply |
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 In run mode, APISIX will generate the sock file under |
”/usr/local/apisix/conf“ When called via APISIX program an error is displayed: |
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: |
我跟你有同样的问题?当时我用完整的java路径还是报同样的错误,你是在修改了java执行路径之后就解决问题了吗? |
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
The text was updated successfully, but these errors were encountered: