I am new to FileZilla Server so please apologize if my question is out of subject here.
I would like to write a small Windows script that do the following tasks :
1. change the listening ports in the "FileZilla Server.xml" configuration file
2. execute "FileZilla server.exe" /reload-config to change the port without stopping and running the server
Before coding, I tried to change manually the port in configuration file (say "21" to "1000") and execute /reload-config.
The settings in the administration interface shows the new port number "1000", which is correct, but I cannot connect to the server on this new port.
The server is still listening to the port "21". When I execute netstat -an to see the open ports, I don't see the new port "1000".
If I input the port number "1000" directly into the admin interface, the socket is correctly created and the port "1000" is shown as opened in netstat.
Do you have any idea on that inconsistent behaviour ? Do I have to shutdown and restart the server to change the port ?
Thank you for your help !
Fabien
Reload-config does not support the change of listening port
Moderator: Project members
Re: Reload-config does not support the change of listening port
The /reload-config switch is meant to be non-destructive (not interrupting connections and transfers). However, changing the listening port is a destructive action, it kills any connections active at this time. If you really need to change the listening port from the command line, the best would be to restart the service via net.exe (or sc.exe):
net stop "FileZilla Server"
net start "FileZilla Server"
The above examples assume you're using the default service names.
net stop "FileZilla Server"
net start "FileZilla Server"
The above examples assume you're using the default service names.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org
Re: Reload-config does not support the change of listening port
Changing the listening port should not be disruptive. It certainly does not affect already accepted connections.
Re: Reload-config does not support the change of listening port
Thank you for your explanations. I have some questions :
1. I understand why changing the port must be a non disruptive action when there is at least one connection alive with the server, but does this have a meaning if nobody is connected to the server when the port must be changed? (even though a computer could ask for a connection while the first socket is closing)
2. Assuming that /reload-config must be non disruptive, why the server couldn't handle the change of the port in the configuration file by keeping the already accepted connections alive with the old port, but still open the new port for the future connections?
At the moment, change the value and execute /reload-config leads to a difference between the port number displayed in the settings page ("1000" for example) and the real port used for new connections (still 21, the older one). I find that difference confusing.
3. You recommend me to properly stop and restart the service after changing the port in the configuration file, wouldn't be this action as disruptive as well?
Thank you and sorry for the bad english!
1. I understand why changing the port must be a non disruptive action when there is at least one connection alive with the server, but does this have a meaning if nobody is connected to the server when the port must be changed? (even though a computer could ask for a connection while the first socket is closing)
2. Assuming that /reload-config must be non disruptive, why the server couldn't handle the change of the port in the configuration file by keeping the already accepted connections alive with the old port, but still open the new port for the future connections?
At the moment, change the value and execute /reload-config leads to a difference between the port number displayed in the settings page ("1000" for example) and the real port used for new connections (still 21, the older one). I find that difference confusing.
3. You recommend me to properly stop and restart the service after changing the port in the configuration file, wouldn't be this action as disruptive as well?
Thank you and sorry for the bad english!
Last edited by fric on 2010-04-21 22:11, edited 1 time in total.
Re: Reload-config does not support the change of listening port
I have tested it and it seems there's a problem.
1. If changed in the GUI FZ Server correctly starts listening on the new port. Old connections are retained on the old port. Old port is dropped when the last old connection is closed.
2. BUT: If changed directly in the XML and called with /reload-config, FZ Server fails to recognize the new port and does not start listening on it (though it is reflected in the GUI). Only a server restart helps, currently.
1. If changed in the GUI FZ Server correctly starts listening on the new port. Old connections are retained on the old port. Old port is dropped when the last old connection is closed.
2. BUT: If changed directly in the XML and called with /reload-config, FZ Server fails to recognize the new port and does not start listening on it (though it is reflected in the GUI). Only a server restart helps, currently.
No support requests over PM! You will NOT get any reply!!!
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org
FTP connection problems? Please read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
FileZilla Pro support: https://customerforum.fileZilla-project.org
Re: Reload-config does not support the change of listening port
Yes, that's it.
Re: Reload-config does not support the change of listening port
Bug report ticket created : #5328
Don't hesitate to contact me if I can help with the bug correction.
Fabien
Don't hesitate to contact me if I can help with the bug correction.
Fabien