EldoS | Feel safer!

Software components for data protection, secure storage and transfer

FTP Binding to Port problems?

Also by EldoS: CallbackFilter
A component to monitor and control disk activity, track file and directory operations (create, read, write, rename etc.), alter file data, encrypt files, create virtual files.
Posted: 05/27/2014 14:30:53
by harold smith (Basic support level)
Joined: 05/27/2014
Posts: 3

All I am getting is this error message when starting a Windows Service using the TElSimpleFTPSServer class. But nothing else.

I did have an FTP (FileZilla) running on the port before, so I know it works. FileZilla has been disabled. Running netstat -am reveals nothing is bound to the 21 port

Works fine on my development box, but once in production it keeps erroring out:

Failed to bind server socket
   at SBSimpleFTPSServer.TElSimpleFTPSServer.Start()
   at FTP.FTPService.SetupFTP() in C:\Development\FTPService.cs:line 143
   at FTP.FTPService.PerformTask() in C:\Development\FTPService.cs:line 167
Posted: 05/28/2014 01:21:10
by Vsevolod Ievgiienko (EldoS Corp.)

Thank you for contacting us.

The exception may happen if the previous application that binded that port didn't unbind it properly. In this case it will remain unavailable for some time. You should restart the system and try to bind the port again.
Posted: 05/28/2014 01:28:24
by Eugene Mayevski (EldoS Corp.)

Actually rebooting is not required - the port will be freed after 2 minutes or even less.

Sincerely yours
Eugene Mayevski
Posted: 05/28/2014 12:08:22
by harold smith (Basic support level)
Joined: 05/27/2014
Posts: 3

Thanks guys - rebooted a bunch since now and then with no luck. Is there a means to get more detailed error messages on why it is failing to bind correctly?

Still working perfectly on my dev machine, but production won't bind at all...

I am going to spin up another server to test as well
Posted: 05/28/2014 12:19:26
by Eugene Mayevski (EldoS Corp.)

It can be one of the following:
1) invalid local address to bind. is fine, but it can happen that you specified some other address or accidentally placed a space before or after the characters (the component doesn't trim the passed values).
2) blocked port. It can be blocked by the local firewall or by other application (use netstat from command line to check this).

The exception class has ErrorCode property which you can inspect to find the Winsock error code for the error.

Sincerely yours
Eugene Mayevski
Posted: 05/28/2014 12:41:38
by harold smith (Basic support level)
Joined: 05/27/2014
Posts: 3


Thank you - I am digging into it a bit more. I placed it on another machine and played around with the hosts before reading this and when I landed on it launches fine.

I am hosting this in AWS, so it is sort of goofy how it maps IP addresses. My first attempt was to use the Elastic IP address of the server that I assigned, but for some reason the machine itself isn't really recognizing it.
Posted: 05/28/2014 12:43:38
by Eugene Mayevski (EldoS Corp.)

Unless you know that you must use some specific IP address there's no need to bind the socket to anything but

I assume that your problem is solved now?

Sincerely yours
Eugene Mayevski
Also by EldoS: Callback File System
Create virtual file systems and disks, expose and manage remote data as if they were files on the local disk.



Topic viewed 1375 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!