Symptoms
When trying to start Tomcat for a user an error like the following may occur
Error: Not enough free ports (wanted 2) Failed to allocate ports!
Description
This indicates a system kernel level setting of net.ipv4.ip_local_port_range is incorrectly set.
Workaround
This setting can be set to "32768 60999" by doing the following.
Making the change immediately
modify /etc/sysctl.conf
add the following line
net.ipv4.ip_local_port_range = 32768 60999
then run
sysctl -w net.ipv4.ip_local_port_range="32768 60999"
sysctl -p