> Trying to setup a socket handler running on the port 25 (inbound SMTP).
> This process runs fine under Windows. After porting the Jython code
> to a Linux, I get the following error message at the start-up of the
> File "/opt/jython/Lib/socket.py", line 795, in listen
> raise _map_exception(jlx)
> socket.error: (98, 'Address already in use')
> Looks like a previously running code left the port open. Any hints
> how to fix this error in the socket handler or how to reset the port?
You can see what ports are open, and the state they are in, by using
netstat: I think the flags you need on Linux are
netstat -f inet
On windows, use "netstat -ano".
That should tell you if the port is already open by some other process, what
that process ID is, and whether it is in a CLOSE state, etc.
If the port is not actually open from another process, is it possible that
this is a permissions problem?
I think you need to be running as root to open ports < 1024 on linux.