incubator-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Miguel Yepes Moyano <mye...@aplicatec.com>
Subject Problems creating a ftp server: java.net.BindException: Permission denied
Date Tue, 13 Feb 2007 19:03:14 GMT
Hello. I'm newbie in the list, and I have subscribed on it because i
have got a problem: I have created a daemon program using Apache Common
Daemons and launched with jsvc utility, and this one implements a Apache
ftp server. When I launch it using the port 21 i've the following
problem:

[...]
WARN FtpGenerator start - exception thrown
java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:141)
        at
org.apache.ftpserver.socketfactory.FtpSocketFactory.createServerSocket(FtpSocketFactory.java:92)
        at org.apache.ftpserver.FtpServer.start(FtpServer.java:59)
        at
com.aplicatec.alarmserver.ftpgenerator.FtpGenerator.start(FtpGenerator.java:137)
        at
com.aplicatec.alarmserver.server.AlarmServer.start(AlarmServer.java:138)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at
org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:177)
Caused by: com.aplicatec.alarmserver.exception.AlarmServerException:
Exception thrown while starting
        at
com.aplicatec.alarmserver.ftpgenerator.FtpGenerator.start(FtpGenerator.java:142)
        at
com.aplicatec.alarmserver.server.AlarmServer.start(AlarmServer.java:138)
        ... 5 more
Caused by: java.net.BindException: Permission denied
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at java.net.ServerSocket.<init>(ServerSocket.java:141)
        at
org.apache.ftpserver.socketfactory.FtpSocketFactory.createServerSocket(FtpSocketFactory.java:92)
        at org.apache.ftpserver.FtpServer.start(FtpServer.java:59)
        at
com.aplicatec.alarmserver.ftpgenerator.FtpGenerator.start(FtpGenerator.java:137)
        ... 6 more
13/02/2007 19:27:57 26344 jsvc.exec error: Cannot start daemon
13/02/2007 19:27:57 26343 jsvc.exec error: Service exit with a return
value of 5



This problem does not always appear, it occurs only when daemon is
launching using port 21 on Linux (both Ubuntu and Gentoo distribution).
Using ports above 1024, there's no problem. Finally, it runs correctly
on Ms Windows.
I strongly need to launch the daemon with the port configuration option
set to the value 21. Can anybody help me?
Thanks.

Mime
View raw message