You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ftpserver-users@mina.apache.org by "Philistine, Ralph J" <Ra...@Navistar.com> on 2008/02/12 18:24:29 UTC
firewall issue???
I have been working with Apache FTPServer since July. Once getting it
to work on my PC I installed it on my UNIX system here at our home
office. It works without fail in that environment. However, I then
deployed it to our production server which is behind a firewall but the
same o/s, aix. It lets me log in but it breaks down when I try to port
a file to it. The exception is as follows:
org.apache.ftpserver.IODataConnectionFactory createDataSocket
WARNING: FtpDataConnection.getDataSocket()
java.net.SocketException: Connection timed out:could be due to invalid
address
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
at java.net.Socket.connect(Socket.java:478)
at java.net.Socket.connect(Socket.java:428)
at java.net.Socket.<init>(Socket.java:335)
at java.net.Socket.<init>(Socket.java:237)
at
org.apache.ftpserver.IODataConnectionFactory.createDataSocket(IODataConn
ectionFactory.java:267)
at
org.apache.ftpserver.IODataConnectionFactory.openConnection(IODataConnec
tionFactory.java:234)
at org.apache.ftpserver.command.STOR.execute(STOR.java:136)
at
org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHand
ler.java:200)
at
org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpPr
otocolHandler.java:126)
at
org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceive
d(MinaFtpProtocolHandler.java:109)
at
org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageR
eceived(AbstractIoFilterChain.java:569)
at
org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR
eceived(AbstractIoFilterChain.java(Inlined Compiled Code))
at
org.apache.mina.common.support.AbstractIoFilterChain.access$1200(Abstrac
tIoFilterChain.java(Inlined Compiled Code))
at
org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess
ageReceived(AbstractIoFilterChain.java(Inlined Compiled Code))
at
org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilt
er.java(Compiled Code))
at
org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.
run(ExecutorFilter.java(Compiled Code))
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.run
Worker(ThreadPoolExecutor.java:987)
at
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
.run(ThreadPoolExecutor.java:528)
at java.lang.Thread.run(Thread.java:568)
The problem occurs regardless of whether I use pasv mode or active mode
and it happens in the IODataConnectionFactory class when a new Socket
object is being initialized on line 268 (dataSoc = new Socket(address,
port, localAddr, localPort);
Do I need to implement a code change to fix my problem or is there a
setting that I am missing in the ftpd.properties file?
Any insight you can provide would be most appreciated.
Regards,
Ralph Philistine
CONFIDENTIALITY NOTICE: This e-mail, and any attachments
and/or documents linked to this email, are intended for the
addressee and may contain information that is privileged,
confidential, proprietary, or otherwise protected by law. Any
dissemination, distribution, or copying is prohibited. This
notice serves as a confidentiality marking for the purpose of
any confidentiality or nondisclosure agreement. If you have
received this communication in error, please contact the
original sender.
Re: firewall issue???
Posted by Niklas Gustavsson <ni...@protocol7.com>.
Hey Ralph
This is probably due to the firewall blocking the data socket.
FtpServer will try to open a socket on a random port, something
firewalls usually don't like. You can fix this by opening up one or
more allowed ports in the firewall and configure on what ports
FtpServer should attempt to open active data connections
Another solution would be to use a passive connection, this is usually
recommended anyways.
Feel free to get back here if you need further assistance. I should
really document this answer as its a FAQ.
/niklas
On Feb 12, 2008 6:24 PM, Philistine, Ralph J
<Ra...@navistar.com> wrote:
> I have been working with Apache FTPServer since July. Once getting it
> to work on my PC I installed it on my UNIX system here at our home
> office. It works without fail in that environment. However, I then
> deployed it to our production server which is behind a firewall but the
> same o/s, aix. It lets me log in but it breaks down when I try to port
> a file to it. The exception is as follows:
>
>
>
> org.apache.ftpserver.IODataConnectionFactory createDataSocket
>
> WARNING: FtpDataConnection.getDataSocket()
>
> java.net.SocketException: Connection timed out:could be due to invalid
> address
>
> at java.net.PlainSocketImpl.socketConnect(Native Method)
>
> at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:336)
>
> at
> java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:201)
>
> at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:188)
>
> at java.net.Socket.connect(Socket.java:478)
>
> at java.net.Socket.connect(Socket.java:428)
>
> at java.net.Socket.<init>(Socket.java:335)
>
> at java.net.Socket.<init>(Socket.java:237)
>
> at
> org.apache.ftpserver.IODataConnectionFactory.createDataSocket(IODataConn
> ectionFactory.java:267)
>
> at
> org.apache.ftpserver.IODataConnectionFactory.openConnection(IODataConnec
> tionFactory.java:234)
>
> at org.apache.ftpserver.command.STOR.execute(STOR.java:136)
>
> at
> org.apache.ftpserver.listener.FtpProtocolHandler.service(FtpProtocolHand
> ler.java:200)
>
> at
> org.apache.ftpserver.listener.FtpProtocolHandler.onRequestReceived(FtpPr
> otocolHandler.java:126)
>
> at
> org.apache.ftpserver.listener.mina.MinaFtpProtocolHandler.messageReceive
> d(MinaFtpProtocolHandler.java:109)
>
> at
> org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageR
> eceived(AbstractIoFilterChain.java:569)
>
> at
> org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageR
>
> eceived(AbstractIoFilterChain.java(Inlined Compiled Code))
>
> at
> org.apache.mina.common.support.AbstractIoFilterChain.access$1200(Abstrac
> tIoFilterChain.java(Inlined Compiled Code))
>
> at
> org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.mess
>
> ageReceived(AbstractIoFilterChain.java(Inlined Compiled Code))
>
> at
> org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilt
> er.java(Compiled Code))
>
> at
> org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.
>
> run(ExecutorFilter.java(Compiled Code))
>
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.run
>
> Worker(ThreadPoolExecutor.java:987)
>
> at
> edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker
> .run(ThreadPoolExecutor.java:528)
>
> at java.lang.Thread.run(Thread.java:568)
>
>
>
> The problem occurs regardless of whether I use pasv mode or active mode
> and it happens in the IODataConnectionFactory class when a new Socket
> object is being initialized on line 268 (dataSoc = new Socket(address,
> port, localAddr, localPort);
>
>
>
> Do I need to implement a code change to fix my problem or is there a
> setting that I am missing in the ftpd.properties file?
>
>
>
> Any insight you can provide would be most appreciated.
>
>
>
> Regards,
>
>
>
> Ralph Philistine
>
>
>
>
>
>
>
> CONFIDENTIALITY NOTICE: This e-mail, and any attachments
> and/or documents linked to this email, are intended for the
> addressee and may contain information that is privileged,
> confidential, proprietary, or otherwise protected by law. Any
> dissemination, distribution, or copying is prohibited. This
> notice serves as a confidentiality marking for the purpose of
> any confidentiality or nondisclosure agreement. If you have
> received this communication in error, please contact the
> original sender.