How to overcome the save: couldnot find backup file error in jmeter - jmeter

I have jmx file that I have saved in a folder in downloads, I have opened it on JMeter did some changes and when I click on save I get a error in log viewer panel as:
ERROR o.a.j.g.a.Save: Could not backup file! Backup directory does not exist, is not a directory or could not be created! <C:\Program Files\apache-jmeter-5.4.3\backups>
How to overcome this error?

JMeter's default backup directory is backups located inside JMeter Home, in order to be able to get benefits from backups you need to have write access to this folder.
So either make sure that the user has write permissions to C:\Program Files\apache-jmeter-5.4.3\backups
or change the backup folder location to the folder where your user has write access (normally it's home folder) by adding the next line to user.properties file:
jmeter.gui.action.save.backup_directory=C:/Users/your-user-name-here/jmeter/backups
JMeter restart will be required to pick the property up.
More information:
Configuring JMeter
JMX Backup configuration
Apache JMeter Properties Customization Guide

Related

Writer initialization failed.Error opening output file.The system cannot find the path specified

In informatica pc I got an error like Writer initialization failed.Error opening output file.The system cannot find the path specified.
Even I checked the directories and file names but what exactly confused.
It's exactly as it says: the Writer failed to initialize, as it was not able to locate the path and file specified.
Note that PowerCenter Workflows and Mappings are executed on the Server. So while you develop on your local laptop (for example) and place a file in C:\Temp folder, and you are able to see the file, once you run the process, it will be executed on the Server. And the Server will not refer your laptop. It will look for C:\Temp location on its local disk. And if that's a unix box, there won't even be a C: path!
Hence, the process will fail with exactly the message you've seen: initialization failed, error opening output file. You need to place the file in the location accessible by Server.
In case of Writer, you name target location where the file will be created - make sure the user used by PowerCenter does have the write access.

Where to place Jmeter test and resource files on remote server?

I have set up Jmeter on a server for remote testing but I, however, do not know how/where to configure jmeter-server to look for the .jmx file constituting my test plan.
I have replaced the file paths tothe resource file (i.e. the various CSV files I referenced locally) in the jmx file.
I'm working with Jmeter version 5.4.1 and also used this guide in setting up the server.
The .jmx script is being transferred automatically from the master to the slave machine(s), you don't need to worry about it. The only thing to remember is that if you're using any JMeter Plugins - you need to install them on the slave machine(s)
If you use relative paths to CSV files - on the slave they will be relative to the folder where you launch jmeter-server script from. Normally people launch JMeter from "bin" folder so it makes sense to use file paths relative to JMeter's "bin" folder.
Another approach is to use "central" location for the test data like Redis Data Set or HTTP Simple Table Server, this way you won't have to copy the test data to the slaves.

Source path in SSH SFTP sampler when directory listing configure is used

My scenario is Upload more than one file to the remote(SFTP) server. For this i am using SFTP sampler to connect to server and directory listing config to put more than file
Here what i should give in Source path of SSH SFTP sampler.
if i keep sorce path as empty gets file not found exception
Thanks in Advance.
As per Introducing the Directory Listing Config Plugin on JMeter article you need to use the following pattern:
Source Directory Destination variable name
For example if you have the following Directory Listing Config setup:
You should go for the following pattern:
/tmp/somefolder${currentFile}
Remember that you can always use Debug Sampler to see which variables are generated:

run.as option does not work other than Nifi user

I want to run my NiFi application using ec2-user rather than default nifi user. I changed run.as=ec2-user in bootstrap.conf but it did not worked .It is not allowing me to start Nifi application getting following error while staring nifi service.
./nifi.sh start
nifi.sh: JAVA_HOME not set; results may vary
Java home:
NiFi home: /opt/nifi/current
Bootstrap Config File: /opt/nifi/current/conf/bootstrap.conf
User Runnug Nifi Application : sudo -u ec2-user
Error: Could not find or load main class org.apache.nifi.bootstrap.RunNiFi
Any pointer to this issue?
This is most likely a file permission problem, which is not covered by installing the service with nifi.sh install. A summary of the required permissions includes:
Read access to the entire distribution in the NIFI_HOME directory
Write access to the NIFI_HOME directory itself - NiFi will create a number of directories and files at runtime including logs, work, state, and various repositories.
Write access to the bin directory
Write access to the conf directory
Write access to the lib directory, and to all of the files in the lib directory
It is certainly possible to narrow the permissions by creating the working directories manually, and by adjusting NiFi's settings to rearrange the directory layout. But the permissions above should get you started.

Jmeter no longer loads txt file from directory

I have Jmeter installed with homebrew. I have a text plan that has been working fine and which I saved before rebooting. Upon rebooting my machine and reloading the test plan, I keep getting "File not found exceptions" even though everything is in the same location and nothing about the test plan has changed.
How do I make jmeter go to a specific directory and look for a file? Help.
Your text file should be in the same directory from where you have launched your JMeter.
Given you installed via Homebrew JMeter's working directory depends on where you launch JMeter from. You can check it in i.e. jmeter.log file
2016/05/09 06:40:50 INFO - jmeter.JMeter: user.dir =/private/tmp
2016/05/09 06:40:50 INFO - jmeter.JMeter: PWD =/private/tmp
So you have 3 options:
Start Jmeter from the folder where files live
Move files to the folder where JMeter is running from now
The best one: use full paths instead of relative. Actually this is what is recommended in Performance testing: Upload and Download Scenarios with Apache JMeter article.

Resources