Jenkins Artifactory plugin gives an unexpected character when trying to load large artifacts

I am using the Jenkins Artifactory plugin. Artifactory is installed next to the Nginx server. Sometimes Jenkins returns a boot error:

[main] ERROR org.jfrog.build.extractor.maven.BuildInfoClientBuilder - Failed while reading the response from: PUT https://XXXX.XXX/XX-XXXXXXX-XXX/com/XXXX/XXXX/xxxxxxxx/xxxxxxx-api/1.0.0-SNAPSHOT/xxxxxxx-api-1.0.0-SNAPSHOT-jar-with-dependencies.jar;build.timestamp=1457104033410;build.name=xxxxxxx-build;build.number=75 HTTP/1.1 org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') 

This error occurs only when the file is larger than a certain size.

0
source share
1 answer

This issue is a Nginx issue. When I try to use the "PUT" action from other software (for example: DNC), I have a Nginx error message, not an Artifactory. This is why Artifactory cannot understand this.

 PUT https://XXXX.XXX/XX-XXXXXXX-XXX/com/XXXX/XXXX/xxxxxxxx/xxxxxxx-api/1.0.0-SNAPSHOT/xxxxxxx-api-1.0.0-SNAPSHOT-jar-with-dependencies.jar;build.timestamp=1457104033410;build.name=xxxxxxx-build;build.number=75 HTTP/1.1 

Result:

 <html> <head><title>413 Request Entity Too Large</title></head> <body bgcolor="white"> <center><h1>413 Request Entity Too Large</h1></center> <hr><center>nginx/1.8.1</center> </body> </html> 

You need to increase client_max_body_size in the Nginx configuration file: /etc/nginx/nginx.conf

 # set client body size to 500M # client_max_body_size 500M; 

500M represents the maximum size of your artifact to be uploaded.

more information here: http://www.cyberciti.biz/faq/linux-unix-bsd-nginx-413-request-entity-too-large/

+2
source

Source: https://habr.com/ru/post/1270301/


All Articles