Conflicts requesting ports from the local port range
An error is generated when the TCPSink, TCPSource, UDPSource, or UDPSink operator of an application specifies the port that Teracloud® Streams is already using, and the application is launched.
22 Aug 2012 12:24:51.050 [41774] ERROR spl_operator M[OperatorThread.cpp:run:76]
- Received exception during execution of operator 'calc_profile_tcp_sink':
'Unable to bind to port '8303': Address already in use.'.
The application can also exhibit any of the following symptoms:
- Fails to launch
- Launches sometimes and fails to launch at other times
- Launches and then fails when a PE is restarted manually
- Launches and then fails after a PE is restarted or relocated by the system
- To show which process is using the port:
> netstat -lnp | grep '8303' Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:8303 0.0.0.0:* LISTEN 30523/streams-pec
- To show the range of IP ports from which the operating system provides port numbers to Teracloud® Streams:
> cat /proc/sys/net/ipv4/ip_local_port_range 8000 61000
- Change the Linux™ ip_local_port_range parameters
to keep the operating system from allocating certain ports to any
process that requests an unspecified port. The following example for
the local port range ensures that only the unused ports in the 32768
to 61000 range are assigned.
ip_local_port_range 32768 61000
- In the application source code, edit the invocations of the TCPSink, TCPSource, UDPSource, and UDPSink operators to keep them from using port numbers that are within the local port range.