скорее всего java не может использовать привелигерованные порты
решение какое-то для Linux нашел тут:
http://wiki.alfresco.com/wiki/Troubleshooting
как это реализовать на FreeBSD? (где переназначить порты в програме я знаю)SMB/CIFS server uses ports 137, 138 and 139, the FTP server defaults to using port 21. All of these ports are in the privileged socket range, so if you use these directly you will be required to run Tomcat or JBoss from a privileged account.
You can run SMB/CIFS on non privileged ports on unix provided you redirect privileged ports to the unprivileged ones.
Firstly ensure alfresco is using unprivilged ports:
* Edit $ALFRESCO_HOME/tomcat/webapps/alfresco/WEB-INF/classes/alfresco/file-servers.xml
* and uncomment
<tcpipSMB port="1445" platforms="linux,solaris,macosx"/>
<netBIOSSMB sessionPort="1139" namePort="1137" datagramPort="1138" platforms="linux,solaris,macosx"/>
* Ensure you add the following to your IP tables to redirect the standard ports to the ones above:
#!/bin/sh
#
# Setup ip-tables to redirect standard SMB/CIFS ports to unprivileged ones
# This needs to be run by root. For security reasons ensure this script is writeable by root only
# Add this script in under /etc/init.d/ somewhere
#
iptables -t nat -A PREROUTING -p tcp --dport 137 -j REDIRECT --to-port 1137
iptables -t nat -A PREROUTING -p tcp --dport 138 -j REDIRECT --to-port 1138
iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-port 1139
iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-port 1445
* and make sure these are applied each time you reboot your server.
The FTP server can be configured to use a non-privileged port (see File Server Subsystem) but the SMB/CIFS server requires the specific ports to be used.
BindException: Address already in use
This indicates that an existing SMB/CIFS or FTP server is already running on the system.
If you are running Alfresco on Windows then it is recommended to use the Win32 NetBIOS interface so that the Alfresco file server can run alongside the existing Windows file server.
If you are running Alfresco on Linux, Mac OSX, Solaris or other Un*x like operating system you will need to determine what is using the SMB/CIFS or FTP ports. For FTP you can configure the Alfresco FTP server to use a different port. For SMB/CIFS you will need try the following possibilities :-
* disable the other SMB/CIFS server
* disable NetBIOS on the other SMB/CIFS server and configure the Alfresco SMB/CIFS server to use NetBIOS (using <netBIOSSMB/>).
* disable native SMB (port 445) on the other SMB/CIFS server and configure the Alfresco SMB/CIFS server to use native SMB (using <tcpipSMB/>)
* configure the two SMB/CIFS servers to use different network adapters if available
HostAnnouncer error : java.io.IOException Invalid argument
The default file-servers.xml configuration file uses a network broadcast mask of 255.255.255.255 which does not work in some network configurations.
Change the <broadcast> setting in the file-servers.xml file to the broadcast mask for your subnet.
хотябы как сделать аналог этой команды для ipfw???
Код: Выделить всё
iptables -t nat -A PREROUTING -p tcp --dport 137 -j REDIRECT --to-port 1137
iptables -t nat -A PREROUTING -p tcp --dport 138 -j REDIRECT --to-port 1138
iptables -t nat -A PREROUTING -p tcp --dport 139 -j REDIRECT --to-port 1139
iptables -t nat -A PREROUTING -p tcp --dport 445 -j REDIRECT --to-port 1445