Reload-config does not support the change of listening port

Need help with FileZilla Server? Something does not work as expected? In this forum you may find an answer.

Moderator: Project members

Post Reply
Message
Author
fric
500 Command not understood
Posts: 4
Joined: 2010-04-21 17:04
Location: France

Reload-config does not support the change of listening port

#1 Post by fric » 2010-04-21 17:26

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

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Reload-config does not support the change of listening port

#2 Post by boco » 2010-04-21 18:33

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.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

User avatar
botg
Site Admin
Posts: 33053
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Reload-config does not support the change of listening port

#3 Post by botg » 2010-04-21 21:17

Changing the listening port should not be disruptive. It certainly does not affect already accepted connections.

fric
500 Command not understood
Posts: 4
Joined: 2010-04-21 17:04
Location: France

Re: Reload-config does not support the change of listening port

#4 Post by fric » 2010-04-21 21:55

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!
Last edited by fric on 2010-04-21 22:11, edited 1 time in total.

User avatar
boco
Contributor
Posts: 25189
Joined: 2006-05-01 03:28
Location: Germany

Re: Reload-config does not support the change of listening port

#5 Post by boco » 2010-04-21 22:07

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.
### BEGIN SIGNATURE BLOCK ###
No support requests per PM! You will NOT get any reply!!!
FTP connection problems? Do yourself a favor and read Network Configuration.
FileZilla connection test: https://filezilla-project.org/conntest.php
### END SIGNATURE BLOCK ###

fric
500 Command not understood
Posts: 4
Joined: 2010-04-21 17:04
Location: France

Re: Reload-config does not support the change of listening port

#6 Post by fric » 2010-04-21 22:13

Yes, that's it.

User avatar
botg
Site Admin
Posts: 33053
Joined: 2004-02-23 20:49
First name: Tim
Last name: Kosse
Contact:

Re: Reload-config does not support the change of listening port

#7 Post by botg » 2010-04-22 06:03

It's a bug.

fric
500 Command not understood
Posts: 4
Joined: 2010-04-21 17:04
Location: France

Re: Reload-config does not support the change of listening port

#8 Post by fric » 2010-04-22 08:17

Bug report ticket created : #5328
Don't hesitate to contact me if I can help with the bug correction.

Fabien

Post Reply