If you want to use a certain port to run some application on your Unix/Linux based system such as macOS but you get "Address/Port already in use" error and you don't have access to stop the service then you can kill this process as follows,
- Open Terminal.
- Run the command with the port used : example : lsof -i : <port_number>.
- You will get an output with ProcessID - PID if some process is running on it..
- Now kill the process by running the following command : kill -9 <PID> (example : kill -9 4133)..
- Now try to run the server you would not get BindException exception..
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
java 4133 code2care 13u IPv6 0x335aaef2sdf 0t0 TCP *:a39c892 (LISTEN)

Know all services running on ports macOS
To know which services are running on which port you can do a port scan on a Mac device as follows:
- Open Network Utility (using Spotlight Search)
- Go to Post Scan tab
- If the services are running on localhost Enter IP as localhost or 127.0.0.1
- You can run the test for all ports or certain range say 80 to 10000
Port Scan has started…
Port Scanning host: 127.0.0.1
Open TCP Port: 80 http
Open TCP Port: 88 kerberos
Open TCP Port: 443 https
Open TCP Port: 631 ipp
Open TCP Port: 3306 mysql
Port Scan has completed…
More Posts related to HowTos,
- Merge multiple zip files without unzipping (extracting)
- BSNL Broadband upgrades speed to minimum 2MBps for all users 512Kbps 1Mbps
- Static IP MTNL available at Rs. 200 per month
- Gmail Unable to upload because it is a folder or a package (like an application bundle or RTFD document)
- How to rerun last command in Zsh shell
- [Error] There was an error connecting to the apple id server
- Command to get count of only directories [macOS/Linux/Unix]
- Turn off Focus Mode on Mac
- Fix NVIDIA GeForce Experience ERROR CODE 0x0003
- How to submit website to dmoz directory
- How to stop or quit cat command?
- How to display only IP address using Terminal command
- Command: How to scp a file to remote server location?
- How to add Widgets to MacBook Desktop
- [IRCTC] Indian railways official eRail API 1.1 for developers to get train info
- [Fix] Steam: Friends Network Unreachable Error
- How to replace &nbsp; with space
- How to change font, apply bold or italic styles, font size in Windows Notepad
- SQL: Check if table exists
- How to identify the version of IntelliJ
- How to fix: Please check your network connection (Retry)
- Top 10 emerging breakthrough trending technologies
- 100+ SEO Tips to improve your website search ranking
- How to enable line numbers in IntelliJ
- How to write hello world different languages syntax
More Posts: