[Linux-HA] SOLVED --- RE: FTP resource cannot start because of
'idle' client
Andrew Beekhof
beekhof at gmail.com
Mon Jan 29 02:53:35 MST 2007
On 1/26/07, Fajar Priyanto <fajarpri at cbn.net.id> wrote:
> On Wednesday 24 January 2007 22:07, Lawrence Yann wrote:
> > Hello Fajar,
> >
> > Weird one that huh...
> >
> > I presume you are migrating an IP address across during fail-over. How
> > can the client 'connect' and therefore tie up the port if there is no
> > ftp service active to accept the request. Are you sure that thee isn't
> > another ftp server active at the time?
> >
> > Another suggestion may be to but a firewall rule to block ports 20 and
> > 21. As part of your ftp resource script, you could put an iptables
> > command in to open up those ports after the ftp server is up.
> >
> > I'm sure that there is probably a HA way to sort this out, but as a
> > novice, that's what I'd be looking into.
>
> Hi Lawrence and all,
> I will be going to the client in a short moment, and when doing the final
> testing in the office I encounter this problem again. Looks like the ftp
> client (mine is gFTP, and possibly others too) "maintain" the session to port
> tcp 21 in the Virtual IP, that makes pure-ftpd fails to bind to the port.
> Like I mention before, this can be proof by: service pure-ftpd status and
> there is already a client connected. In /var/log/messages there is no entry
> about pure-ftpd successfully stated as it should. But using ps aux, we can
> see that the pure-ftpd is actually started (the connecting client's session
> is visible too)
>
> The workaround:
> Well...., I told myself, what if we modify /etc/init.d/pure-ftpd script so
> that when it was told to 'start', it will stop first then start. And it
> works! :) By stopping it first, it clears all ftp session, therefore it then
> can start smoothly.
>
> This is the modification (only 1 line):
>
> case "$1" in
> start)
> stop <----- add this :)
> start
while technically legal (in that starting something thats already
started will still succeed), this is unlikely to be a good idea.
> ;;
> stop)
> stop
> ;;
> restart)
> stop
> start
> ;;
> reload)
> echo -n $"Reloading $prog: "
>
> Hopefully this experience will be of benefit for all later.
> Linux HA is the best.
> --
> Fajar Priyanto | Reg'd Linux User #327841 | Linux tutorial
> http://linux2.arinet.org
> 8:37am up 0:50, 2.6.16.13-4-default GNU/Linux
> Let's use OpenOffice. http://www.openoffice.org
>
>
> _______________________________________________
> Linux-HA mailing list
> Linux-HA at lists.linux-ha.org
> http://lists.linux-ha.org/mailman/listinfo/linux-ha
> See also: http://linux-ha.org/ReportingProblems
>
>
>
More information about the Linux-HA
mailing list