Open channer99 opened 7 months ago
Hi, @channer99 , can you pleasee send the following in correct format :
complete
steps to reproduce the issue.Please format the configs and logs using backticks(`)
@sheharyaar
route config is
{
"uri": "/test*",
"name": "test",
"methods": [
"GET",
"POST",
"PUT",
"DELETE",
"PATCH",
"OPTIONS"
],
"plugins": {
"ext-plugin-pre-req": {
"_meta": {
"disable": false
},
"allow_degradation": false,
"conf": [
{
"name": "Test_filter",
"value": "{\"rejected_body2\":\"failed\",\"rejected_code2\":\"403\"}"
}
]
},
},
"upstream_id": "473424305712006806",
"status": 1
}`
apisix config.yaml
apisix:
node_listen:
- port: 80
ssl:
enable: false
deployment:
role: traditional
role_traditional:
config_provider: etcd
admin:
allow_admin:
- all
admin_listen:
port: 9180
admin_key:
- name: admin
key: edd1c9f034335f136f87ad84b625c8f1 # using fixed API token has security risk, please update it when you deploy to production environment
role: admin
etcd:
host:
- "http://xxx.xx.xxx.xxx:2379"
nginx_config:
enable_cpu_affinity: |
true;
http_configuration_snippet: |
client_body_buffer_size 10m;
proxy_max_temp_file_size 0;
http_server_configuration_snippet: |
merge_slashes off;
proxy_ignore_client_abort on;
ext-plugin:
cmd: ['java', '-jar', '-Xmx1g', '-Xms1g', '/usr/local/apisix/test_filter.jar']
attached test.xlsx is 30MB excel.
my request code(java spring) is
String filePath = "/Users/aaaa/Desktop/test.xlsx";
Path path = Paths.get(filePath);
byte[] fileData = null;
try {
fileData = Files.readAllBytes(path);
} catch (IOException e) {
e.printStackTrace();
}
String url2 = "/test";
HttpHeaders headers2 = new HttpHeaders();
headers2.setContentType(MediaType.MULTIPART_FORM_DATA);
headers2.set("boundary", "----WebKitFormBoundarykMBT8G8fZJ6YOU6X");
MultiValueMap<String, Object> body = new LinkedMultiValueMap<>();
body.add("file", new HttpEntity<>(fileData, getMultipartFileHeaders(path.getFileName().toString())));
HttpEntity<MultiValueMap<String, Object>> entity2 = new HttpEntity<>(body, headers2);
RestTemplate restTemplate2 = new RestTemplate();
restTemplate2.setRequestFactory(new HttpComponentsClientHttpRequestFactory());
ResponseEntity<String> response2 = restTemplate2.exchange("http://{gw}" + url2, HttpMethod.POST,
entity2, String.class);
If you refer to the above, you will be able to reproduce it easily. 503 occurs before ext filter logic is performed.
pls check @sheharyaar
Ok, I will check and update you soon. I cannot find the attached xls, I will create a dummy xls for this.
Ok, I will check and update you soon. I cannot find the attached xls, I will create a dummy xls for this.
@sheharyaar It seems to be a file size issue. When I reduced the size of the same xlsx file to 10mb, the call was successful. Is it not possible to call large files larger than 10MB in apisix?
Ca you check the timeout for this error?? Maybe try setting larger timeout : https://apisix.apache.org/docs/apisix/admin-api/
increased all timeout(connect, read, send), but it doesn't work
Description
apisix-java-plugin-runner version is 0.4.0
request Content-Type: multipart/form-data; boundary=----WebKitFormBoundaryedcKdnGDWD6rJDcu
payload is ------WebKitFormBoundaryedcKdnGDWD6rJDcu Content-Disposition: form-data; name="file"; filename="test.xlsx" Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet
------WebKitFormBoundaryedcKdnGDWD6rJDcu Content-Disposition: form-data; name="age"
20 ------WebKitFormBoundaryedcKdnGDWD6rJDcu--
but ext 503 error occured..
error.log is below.. is that library issue?
pls check this log
Environment
apisix version
): 3.4.1uname -a
):openresty -V
ornginx -V
):curl http://127.0.0.1:9090/v1/server_info
):luarocks --version
):