Recently, I had an issue where a service would not start because there was a conflict on the port that it was trying to use. This command made it easy to identify which service was already using the port:
netstat -lnptu
Here is the explanation of each argument:
-l = Show only listening sockets. (These are omitted by default.)
-n = Show numerical addresses instead of trying to determine symbolic host, port or user names.
-p = Show the PID and name of the program to which each socket belongs.
-t = tcp
-u = udp
Sources:
http://www.techrepublic.com/blog/security/list-open-ports-and-listening-services/443