Reputation: 604
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.
Upvotes: 1
Views: 997
Reputation: 168197
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
put(STOR)
boxUse Binary mode
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:
If you are not able to establish the connection with the FTP server on port 21 - you won't be able to proceed.
Upvotes: 0