I am sending an FTP request using Jmeter
. I just set the IP address and the jmeter
in default send the file on port 21 and the server does not accept the file. But I want the process be passive which means the client negotiate with the server and after assigning a port number the file be sent on that.
How should I set it in Jmeter
?
Also I have read this post which says the default mode is passive but it is not true for my case.
Asked
Active
Viewed 884 times
1
-
So, you want to get the port number first, and then pass it on the request. Am I correct? – NaveenKumar Namachivayam Apr 29 '17 at 17:10
1 Answers
0
JMeter establishes connection with the FTP server on port 21 (command channel). If your server is listening on the different port - use
Port Number
input to configure it.JMeter is configured to use local passive mode as it evidenced by the next line:
ftp.enterLocalPassiveMode();// should probably come from the setup dialog
in the FTPSampler source code
FTP server should tell JMeter a higher port for the data channel for file transfer
Assuming you
- Provide path to existing local file
- Tick
put(STOR)
box - If your file is not text-based tick
Use Binary mode
- Provide correct destination and credentials
you should be able to upload the file successfully. If you experience problems - implement the upload request using JSR223 Sampler and Apache Commons Net FTP libraries and enable debug logging to see where exactly your problem is.
References:
- Net/FrequentlyAskedQuestions
- Load Testing FTP and SFTP Servers Using JMeter
- File Transfer Protocol specification
If you are not able to establish the connection with the FTP server on port 21 - you won't be able to proceed.