Skip to content
Advertisement

access jmeter.log file when lunching test from jenkins jmeter.log (Permission denied) java.io.FileNotFoundException: error

when using jmeter from linux command line it works perfectly. with this command, inside jmeter/bin folder:

JavaScript

it creats testres.jtl file.

but i have problem when trying to lunch this command from jenkins:

i have created new project and added: add build step–> Execute Shell inside shell is:

JavaScript

but when lunching inside console output is errors:

JavaScript

this is my part from log4j2.xml

JavaScript

i just moved this project on linux, before was on Win and there wasn’t this error.

what can be reason and how can i fix it.

Advertisement

Answer

I can see 2 options:

  1. Give the jenkins user (or whatever account Jenkins is running with) ownership to /opt/jmeter folder using chown command like:

    JavaScript
  2. Configure JMeter to store logs into location where Jenkins has write access too, i.e. /tmp, change this line:

    JavaScript

    to this one

    JavaScript

    See How to Configure JMeter Logging article for more details.

User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement