Share this article
Improve this guide
OSError [Errno 48] Address Already in Use: 3 Ways to Fix
Manually specify the port in order to fix this error message
3 min. read
Updated onOctober 4, 2024
updated onOctober 4, 2024
Share this article
Improve this guide
Read our disclosure page to find out how can you help Windows Report sustain the editorial teamRead more
You get theoserror: [errno 48] address already in use, also known asPythonsocket error 48,when aprocessattempts to bind itself to a busy port.
This error is somewhat different thanPython runtime errorthat we covered earlier, so let’s see how we can fix it.
What is socket error 48 address already in use?
How do I fix oserror: [errno 48] address already in use?
1. Specify an unused port number for the process
After running the abovecommand, confirm if oserror: [errno 48] address already in use error is gone.
2. Free up the port
Remember that you should change the(Port Number)in thecommandto the actual port number.
After entering the lastcommandabove, theprocesswill be created on the free port. This method has proven to repair oserror: [errno 48] address already in use error.
3. Restart Raspberry Pi
As mentioned at the beginning of this troubleshooting guide, theprocessmay already be bound to port 800 (the default port) if you ran it before.
You can easily clear theoserror: [errno 48] address already in useby specifying an unused port or freeing up the port that theprocessis bound to.
By following any of the above-written methods, you should be able to fix the Python socket error 48. Python is prone to errors, and we already coveredPermissionError: [Errno 13] permission deniedin one of our older guides.
We also have a new guide onCannot open shared object no such file or directoryerror, so you might be interested in checking it out.
However, we would appreciate it if you let us know which method worked best for you by leaving us a message in the comments section below.
More about the topics:Error Code,ports
Milan Stanojevic
Windows Toubleshooting Expert
Milan has been enthusiastic about technology ever since his childhood days, and this led him to take interest in all PC-related technologies. He’s a PC enthusiast and he spends most of his time learning about computers and technology.
Before joining WindowsReport, he worked as a front-end web developer. Now, he’s one of the Troubleshooting experts in our worldwide team, specializing in Windows errors & software issues.
User forum
0 messages
Sort by:LatestOldestMost Votes
Comment*
Name*
Email*
Commenting as.Not you?
Save information for future comments
Comment
Δ
Milan Stanojevic
Windows Toubleshooting Expert
Before joining WindowsReport, he worked as a front-end web developer. Now, he’s specialized in Windows errors & software issues.