In my Python socket program, I sometimes need to interrupt it with Ctrl-C. When I do this, it does close the connection using socket.close().

However, when I try to reopen it I have to wait what seems like a minute before I can connect again. How does one correctly close a socket? Or is this intended?

MohitGhodasara's user avatar

asked Dec 16, 2010 at 22:24

skylerl's user avatar

Yes, this is intended. Here you can read a detailed explanation. It is possible to override this behavior by setting the SO_REUSEADDR option on a socket. For example:

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

eoirqgfoqkrognoqwfr's user avatar

answered Dec 16, 2010 at 22:33

Bartosz's user avatar

BartoszBartosz

6,0633 gold badges27 silver badges17 bronze badges

7

$ ps -fA | grep python
501 81211 12368   0  10:11PM ttys000    0:03.12  
python -m SimpleHTTPServer

$ kill 81211

phoenix's user avatar

phoenix

8,1886 gold badges39 silver badges45 bronze badges

answered Jun 13, 2016 at 13:58

ayoub laaziz's user avatar

ayoub laazizayoub laaziz

1,1969 silver badges12 bronze badges

3

This happens because you trying to run service at the same port and there is an already running application.
it can happen because your service is not stopped in the process stack. you just have to kill those processes.

There is no need to install anything here is the one line command to kill all running python processes.

for Linux based OS:

Bash:

kill -9 $(ps -A | grep python | awk '{print $1}')

Fish:

kill -9 (ps -A | grep python | awk '{print $1}')

answered Jan 25, 2019 at 9:57

MohitGhodasara's user avatar

MohitGhodasaraMohitGhodasara

2,4021 gold badge23 silver badges29 bronze badges

0

If you use a TCPServer, UDPServer or their subclasses in the socketserver module, you can set this class variable (before instantiating a server):

socketserver.TCPServer.allow_reuse_address = True

(via SocketServer.ThreadingTCPServer – Cannot bind to address after program restart )

This causes the init (constructor) to:

 if self.allow_reuse_address:
     self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

ntc2's user avatar

ntc2

11.2k7 gold badges53 silver badges70 bronze badges

answered Aug 27, 2014 at 14:17

dirkk0's user avatar

dirkk0dirkk0

2,47028 silver badges34 bronze badges

1

A simple solution that worked for me is to close the Terminal and restart it.

answered Jul 15, 2018 at 11:57

Siddharth Sethia's user avatar

0

Nothing worked for me except running a subprocess with this command, before calling HTTPServer(('', 443), myHandler):

kill -9 $(lsof -ti tcp:443)

Of course this is only for linux-like OS!

Areza's user avatar

Areza

5,6727 gold badges49 silver badges80 bronze badges

answered May 22, 2017 at 10:50

Mirko's user avatar

MirkoMirko

7559 silver badges13 bronze badges

For Linux,

ps aux | grep python

This will show you the error. The process number (eg.35225) containing your python file is the error.

Now,

sudo kill -9 35225

This will kill the error process and your problem will be solved.

Prajwal Kulkarni's user avatar

answered Oct 28, 2021 at 15:25

Tribhuwan Bhatta's user avatar

First of all find the python process ID using this command

ps -fA | grep python

You will get a pid number by naming of your python process on second column

Then kill the process using this command

kill -9 pid

answered Apr 28, 2020 at 11:27

Abdul Basit's user avatar

Abdul BasitAbdul Basit

97313 silver badges14 bronze badges

run the command

fuser -k (port_number_you_are _trying_to_access)/TCP

example for flask: fuser -k 5000/tcp

Also, remember this error arises when you interput by ctrl+z. so to terminate use ctrl+c

mischva11's user avatar

mischva11

2,8263 gold badges18 silver badges34 bronze badges

answered Mar 4, 2020 at 12:39

Manoj Kumar M's user avatar

1

Do nothing just wait for a couple of minutes and it will get resolved. It happens due to the slow termination of some processes, and that’s why it’s not even showing in the running processes list.

answered Nov 13, 2021 at 11:22

Shoaib Alam's user avatar

1

I faced similar error at odoo server and resolved that with these simple following steps:

  1. Paste following code in terminal

    ps -fA | grep python

You will get a pid number. Now copy the pid number from second column of terminal output.

  1. Then write as below

    kill -9 pid

The terminal will restart and then the command

flask run

Will work fine!
Thank you

answered Jun 2, 2021 at 6:37

Abdul Hameed's user avatar

Abdul HameedAbdul Hameed

1,03513 silver badges17 bronze badges

I had the same problem (Err98 Address already in use) on a Raspberry Pi running python for a EV charging manager for a Tesla Wall Connector. The software had previously been fine but it stopped interrogating the solar inverter one day and I spent days thinking it was something I’d done in python. Turns out the root cause was the Wifi modem assigning a new dynamic IP to the solar inverter as as result of introducing a new smart TV into my home. I changed the python code to reflect the new IP address that I found from the wifi modem and bingo, the issue was fixed.

answered May 31, 2021 at 22:50

Bernie Grealy's user avatar

The cleanest way to make the socket immediately reusable is to follow the recommendation to first shutdown the client end (socket) of a connection, and make sure the server’s end shuts down last (through exception handling if needed).

This might well mean that the server end runs forever.

This is not a problem if that “forever” loop pauses execution, e.g. read from socket.

How you “break” that “forever” loop is up to you as server admin, as long as there are no clients (apart from obvious system level exceptions)

answered Jul 10, 2022 at 17:48

Ate Somebits's user avatar

I tried the following code to settle the issue:

sudo lsof -t -i tcp:8000 | xargs kill -9

answered Dec 6, 2022 at 23:38

Jalil Nourmohammadi Khiarak's user avatar

in Terminal

Check PID of program:

$ netstat -tulpn

# output:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
                   
#...
udp        0      0 127.0.0.1:20001         0.0.0.0:*                           2859/python 

in this case port: 20001, so PID is 2859

terminate this port:

$ kill -9 2859

answered yesterday

Zrn-dev's user avatar

sudo pkill -9 python

try this command

answered May 27, 2021 at 12:17

Sahil Rajput's user avatar

1

In my Python socket program, I sometimes need to interrupt it with Ctrl-C. When I do this, it does close the connection using socket.close().

However, when I try to reopen it I have to wait what seems like a minute before I can connect again. How does one correctly close a socket? Or is this intended?

MohitGhodasara's user avatar

asked Dec 16, 2010 at 22:24

skylerl's user avatar

Yes, this is intended. Here you can read a detailed explanation. It is possible to override this behavior by setting the SO_REUSEADDR option on a socket. For example:

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

eoirqgfoqkrognoqwfr's user avatar

answered Dec 16, 2010 at 22:33

Bartosz's user avatar

BartoszBartosz

6,0633 gold badges27 silver badges17 bronze badges

7

$ ps -fA | grep python
501 81211 12368   0  10:11PM ttys000    0:03.12  
python -m SimpleHTTPServer

$ kill 81211

phoenix's user avatar

phoenix

8,1886 gold badges39 silver badges45 bronze badges

answered Jun 13, 2016 at 13:58

ayoub laaziz's user avatar

ayoub laazizayoub laaziz

1,1969 silver badges12 bronze badges

3

This happens because you trying to run service at the same port and there is an already running application.
it can happen because your service is not stopped in the process stack. you just have to kill those processes.

There is no need to install anything here is the one line command to kill all running python processes.

for Linux based OS:

Bash:

kill -9 $(ps -A | grep python | awk '{print $1}')

Fish:

kill -9 (ps -A | grep python | awk '{print $1}')

answered Jan 25, 2019 at 9:57

MohitGhodasara's user avatar

MohitGhodasaraMohitGhodasara

2,4021 gold badge23 silver badges29 bronze badges

0

If you use a TCPServer, UDPServer or their subclasses in the socketserver module, you can set this class variable (before instantiating a server):

socketserver.TCPServer.allow_reuse_address = True

(via SocketServer.ThreadingTCPServer – Cannot bind to address after program restart )

This causes the init (constructor) to:

 if self.allow_reuse_address:
     self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

ntc2's user avatar

ntc2

11.2k7 gold badges53 silver badges70 bronze badges

answered Aug 27, 2014 at 14:17

dirkk0's user avatar

dirkk0dirkk0

2,47028 silver badges34 bronze badges

1

A simple solution that worked for me is to close the Terminal and restart it.

answered Jul 15, 2018 at 11:57

Siddharth Sethia's user avatar

0

Nothing worked for me except running a subprocess with this command, before calling HTTPServer(('', 443), myHandler):

kill -9 $(lsof -ti tcp:443)

Of course this is only for linux-like OS!

Areza's user avatar

Areza

5,6727 gold badges49 silver badges80 bronze badges

answered May 22, 2017 at 10:50

Mirko's user avatar

MirkoMirko

7559 silver badges13 bronze badges

For Linux,

ps aux | grep python

This will show you the error. The process number (eg.35225) containing your python file is the error.

Now,

sudo kill -9 35225

This will kill the error process and your problem will be solved.

Prajwal Kulkarni's user avatar

answered Oct 28, 2021 at 15:25

Tribhuwan Bhatta's user avatar

First of all find the python process ID using this command

ps -fA | grep python

You will get a pid number by naming of your python process on second column

Then kill the process using this command

kill -9 pid

answered Apr 28, 2020 at 11:27

Abdul Basit's user avatar

Abdul BasitAbdul Basit

97313 silver badges14 bronze badges

run the command

fuser -k (port_number_you_are _trying_to_access)/TCP

example for flask: fuser -k 5000/tcp

Also, remember this error arises when you interput by ctrl+z. so to terminate use ctrl+c

mischva11's user avatar

mischva11

2,8263 gold badges18 silver badges34 bronze badges

answered Mar 4, 2020 at 12:39

Manoj Kumar M's user avatar

1

Do nothing just wait for a couple of minutes and it will get resolved. It happens due to the slow termination of some processes, and that’s why it’s not even showing in the running processes list.

answered Nov 13, 2021 at 11:22

Shoaib Alam's user avatar

1

I faced similar error at odoo server and resolved that with these simple following steps:

  1. Paste following code in terminal

    ps -fA | grep python

You will get a pid number. Now copy the pid number from second column of terminal output.

  1. Then write as below

    kill -9 pid

The terminal will restart and then the command

flask run

Will work fine!
Thank you

answered Jun 2, 2021 at 6:37

Abdul Hameed's user avatar

Abdul HameedAbdul Hameed

1,03513 silver badges17 bronze badges

I had the same problem (Err98 Address already in use) on a Raspberry Pi running python for a EV charging manager for a Tesla Wall Connector. The software had previously been fine but it stopped interrogating the solar inverter one day and I spent days thinking it was something I’d done in python. Turns out the root cause was the Wifi modem assigning a new dynamic IP to the solar inverter as as result of introducing a new smart TV into my home. I changed the python code to reflect the new IP address that I found from the wifi modem and bingo, the issue was fixed.

answered May 31, 2021 at 22:50

Bernie Grealy's user avatar

The cleanest way to make the socket immediately reusable is to follow the recommendation to first shutdown the client end (socket) of a connection, and make sure the server’s end shuts down last (through exception handling if needed).

This might well mean that the server end runs forever.

This is not a problem if that “forever” loop pauses execution, e.g. read from socket.

How you “break” that “forever” loop is up to you as server admin, as long as there are no clients (apart from obvious system level exceptions)

answered Jul 10, 2022 at 17:48

Ate Somebits's user avatar

I tried the following code to settle the issue:

sudo lsof -t -i tcp:8000 | xargs kill -9

answered Dec 6, 2022 at 23:38

Jalil Nourmohammadi Khiarak's user avatar

in Terminal

Check PID of program:

$ netstat -tulpn

# output:

(Not all processes could be identified, non-owned process info
 will not be shown, you would have to be root to see it all.)
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
                   
#...
udp        0      0 127.0.0.1:20001         0.0.0.0:*                           2859/python 

in this case port: 20001, so PID is 2859

terminate this port:

$ kill -9 2859

answered yesterday

Zrn-dev's user avatar

sudo pkill -9 python

try this command

answered May 27, 2021 at 12:17

Sahil Rajput's user avatar

1

OS error 98 address already in use is a network-related error message that occurs when you’re using a Python-based application. This article will teach you why it happened and different ways to fix your application.Fix the oserror errno address already in use

You can apply what you’ll learn to other applications that show similar errors during connection. With that said, launch your computer, and let’s get you connected.

Contents

  • Why Does Oserror Errno 98 Address Already in Use Occurs ?
    • – Another Application Is Using the Port Number
    • – An Instance of the Program Is Running in the Background
  • How To Fix an Address That’s in Use?
    • – Reuse the Address
    • – Kill the Process
    • – Kill Instances of Odoo and Restart
    • – Restart Raspberry Pi
    • – Move “app.run” Into an “If” Statement
    • – Expose a Free Port Number for Docker
    • – Use an Unused Port in Colab
    • – Kill Port 80 on Windows
    • – Update Port Number for Django
  • Conclusion
  • References

Why Does Oserror Errno 98 Address Already in Use Occurs ?

The oserror errno 98 occurs because another application on your system is using the port number that the current application wants to use. Or, an instance of the same program is using the same port, and it’s running as a background process.

– Another Application Is Using the Port Number

Different applications on your computer can use the same port number, either by configuration or by design. The former means you edited the application configuration to use a specific port number.

While the latter means, the application developer hard-coded the port number into the application. In both cases, if the application is active and running, no other application can use the same port number.Causes of oserror errno address already in use

For example, MySQL database uses port 3306. So, when MySQL is running, other applications can’t use port 3306 on your system. This includes another version of MySQL on your computer. All attempts to start these applications using port 3306 will result in an error.

The same applies to other port numbers, and it varies depending on the application.

– An Instance of the Program Is Running in the Background

Instances of the same program running in the background of your computer will use the same port number. With this, your computer will not allow you to start an active version of that application on the same port. Such is the case of MySQL as detailed in the previous section, and it’s the same for most network applications.

How To Fix an Address That’s in Use?

You can fix an address that’s in use by killing the instances of Odoo and restarting your application. Moreover, you can also opt for reusing the address from the start. If nothing else works, killing the process is left as the last option.

More solutions to fix an address that’s in use include:

  • Restart Raspberry Pi
  • Move “app.run” into an “if” statement
  • Expose a free port number for Docker
  • Use an unused port in Colab
  • Kill port 80 on Windows
  • Update port number for Django

– Reuse the Address

The reuse of an address is a fix if you have a Python socket program that won’t start immediately after shutdown. In your code, use the following after you’ve created the socket and not after calling the “bind()” function:

sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)

– Kill the Process

When you kill a running process using a port number, you can solve the oserror: [errno 98] address already in use Windows error. The same works for a Linux machine, and we’ll explain how you can do that as well. There are two ways to kill a process on Windows, you can use the Task Manager or the command prompt. The following is how you do it with the Task Manager:Solutions for oserror errno address already in use

  1. Identify the problematic process.
  2. Launch the Task Manager on your computer (Ctrl + Shift + esc).
  3. Locate the application from the “Processes”.
  4. Right-click on it and click “End task”
  5. Launch the application that’s showing the “address in use” error, and the error should not appear.

If that does not work, you can use the following process with the Windows command prompt:

  1. Launch the command prompt as an administrator.
  2. Execute the following command and replace XXXX with the target port number: “netstat -ano|findstr “PID :XXXX”
  3. Identify the PID from the output of the previous step.
  4. Kill the process using the following: “taskkill /PID XXXX /f”. Where “XXXX” is the PID.

For Linux, use the following:

  1. Open your terminal
  2. Type and execute the following command: netstat -tulpn
  3. Identify the port, the processes, and their identification number.
  4. Type and execute the following command: kill -9 PID. Where PID is the process ID.

– Kill Instances of Odoo and Restart

You can kill instances of Odoo running in the background to solve oserror: (errno 98) address already in use Odoo 14 error. Now, open your terminal and do the following:

  1. Type the following command, and press the enter key on your keyboard: ps aux | grep odoo
  2. Use the following if you have Odoo nine and eight: ps aux | grep openerp
  3. Identify all the Odoo instances running in the background.
  4. Execute the following and replace PID with the PID of the Odoo instance that’s running in the background: sudo kill -9 PID
  5. Enter your root password and proceed.
  6. Repeat the previous step for every Odoo instance that’s running in the background.
  7. Restart Odoo.

– Restart Raspberry Pi

You can restart Raspberry Pi to solve the oserror errno 98 address already in use Raspberry Pi error message. If you’re accessing Raspberry Pi from a Graphical User Interface (GUI), do the following to shut it down:

  1. Locate the top-left corner and click on the Raspberry menu.
  2. Click on “Logout” and click on “Reboot” to restart Raspberry Pi

If you prefer the terminal, type “sudo shutdown -r” to restart your Raspberry Pi. After the restart, you’ll start afresh and the error will not occur again.

– Move “app.run” Into an “If” Statement

The conditional execution of “app.run” will solve the oserror: [errno 98] address already in use gunicorn error. This will be the case if you’re running your application with Gunicorn and not a Flask server. Now, locate “app.run” in your code and update to the following, what follows is how the code works.

if __name__ == ‘__main__’:

app.run()

The previous code works because, behind the scenes, Gunicorn will bind the address before importing your application. The latter calls “app.run” and when this happens, “app.run” will try to start its server, but Gunicorn is already using that address. The previous code allows Python to run your application without the “address in use” error.

– Expose a Free Port Number for Docker

You can expose a free port number to fix the oserror: (errno 98) address already in use Docker error. To do this, you can use any of the following on your terminal to expose a port before running your Docker Container.More solutions for oserror errno address already in use

The purpose of these commands is to determine the port that’ll allow you to run your Docker container without an error.

  1. ss tnlp
  2. netstat tnlp
  3. lsof -i -P -sTCP:LISTEN
  4. lsof -P -i:80

The first command, “ss tnlp” will print the TCP sockets, numeric port number, listening sockets, and the process that’s using the socket. The same applies to “netstat tnlp”, although netstat is not officially developed, but it’s an option for you.

The third command will list the network files, port numbers, and listening TCP protocols. Finally, the last command will check if port 80 is free.

– Use an Unused Port in Colab

You can use an unused port to solve oserror: [errno 98] address already in use Colab error. With this, you can do your Netron visualization without the “address in use” error. To get started, do the following in the code of your Netron notebook:

  1. Import the “portpicker” library.
  2. Use the following to access an unused port: port = portpicker.pick_unused_port().

– Kill Port 80 on Windows

The termination of port 80 on your Windows machine will solve the oserror: [errno 98] address already in use port 80 error. To get started, do the following:

  1. Open the command prompt as an administrator (it’s the “Terminal” in Windows 11).
  2. Type the following on the command without quotes: “netstat -a -o -n”
  3. Look for a process that’s using port 80 in the “Local Address” list and note the PID.
  4. Type taskkill /f /PID XXXX (where “XXXX” is the process identification, for example, 2987).
  5. Press the enter key on your keyboard.
  6. Restart the application that’s throwing the “address in use” error.

– Update Port Number for Django

To solve the oserror errno 98 address already in use Django error, you can update the port number before you start the server. For example, if you’re starting the server on port 8000, change it to port 8001.

Conclusion

This article explained why an address is in use and how to fix it in different Python applications. The following are the key points from our discussion:

  • A conflict in the port number leads to the “address is already in use” error in Python applications.
  • Two instances of the same Python network application cannot use the same address.
  • To solve the “address is already in use” error, you can kill the processes using a specific port number.

With everything that we’ve detailed in this article, you can use your Python applications without an address error. Bookmark our article and come back to it the next time you want to fix the error.

References

  • https://dev.mysql.com/doc/mysql-port-reference/en/mysql-ports-reference-tables.html#mysql-client-server-ports
  • https://hea-www.cfa.harvard.edu/~fine/Tech/addrinuse.html
  • Author
  • Recent Posts

Position is Everything

Your Go-To Resource for Learn & Build: CSS,JavaScript,HTML,PHP,C++ and MYSQL. Meet The Team

Position is Everything

If you’ve ever encountered the Socket.error: [Errno 98] Address already in use error while working with sockets in Python, you know it can be a frustrating issue to debug. This guide will provide valuable and relevant information to help developers understand the cause of this error and offer step-by-step solutions to resolve it.

Table of Contents

  • Understanding the Error
  • Step-by-Step Solutions
  • Solution 1: Reuse Address Option
  • Solution 2: Find and Kill the Blocking Process
  • Solution 3: Wait for the Socket to be Released
  • FAQ Section
  • Related Links

Understanding the Error

Before diving into the solutions, it’s essential to understand what causes the Socket.error: [Errno 98] Address already in use error. This error occurs when a socket is bound to an address (typically an IP and port combination) that’s already in use by another process. This prevents the socket from being created, as the address is already taken.

The most common reason for this error is that a previous instance of your application is still running and has not released the address. It’s also possible that another unrelated application is using the same address.

Step-by-Step Solutions

Solution 1: Reuse Address Option

One way to resolve this error is to set the SO_REUSEADDR socket option. This option allows multiple sockets to bind to the same address, provided they all have the SO_REUSEADDR option set. It can be useful in situations where sockets are frequently created and destroyed, like in a development environment.

To set the SO_REUSEADDR option in Python, do the following:

import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
sock.bind(('0.0.0.0', 8080))

Keep in mind that using the SO_REUSEADDR option can lead to issues in production environments, as it could allow malicious clients to bind to the same address as your server. It’s crucial to ensure your server is properly secured if you choose to use this option.

Solution 2: Find and Kill the Blocking Process

Another way to resolve this error is to find the process that’s blocking the address and terminate it. You can use the lsof (list open files) command to find the process that’s using the address your socket is trying to bind to.

Run the following command in your terminal:

lsof -i :8080

Replace 8080 with the port number you are trying to bind to. This command will show you the process ID (PID) of the process using the port. Once you have the PID, you can kill the process with the kill command:

kill <PID>

Replace <PID> with the process ID you found earlier.

Solution 3: Wait for the Socket to be Released

In some cases, the address may be temporarily unavailable due to the TIME_WAIT state. This state occurs after a socket has been closed, and the operating system is waiting to ensure that any remaining data is transmitted properly.

If you’ve recently stopped your application and are trying to restart it, you may encounter the Socket.error: [Errno 98] Address already in use error due to the TIME_WAIT state. In this case, waiting for a few minutes before restarting your application should resolve the issue.

FAQ Section

Q1: How do I check if a specific port is in use?

You can use the lsof command followed by the -i flag and the port number to check if a specific port is in use. For example, to check if port 8080 is in use, run the following command in your terminal:

lsof -i :8080

Q2: Can I bind multiple sockets to the same address?

Yes, you can bind multiple sockets to the same address by setting the SO_REUSEADDR socket option for each socket. However, this can lead to security issues in production environments, so be cautious when using this option.

Q3: How long does the TIME_WAIT state last?

The TIME_WAIT state typically lasts for about 2 minutes but can vary depending on the operating system and its configuration.

Q4: What other socket options should I be aware of?

Some other socket options you may find useful are SO_KEEPALIVE, which enables sending keep-alive messages on a connection, and SO_LINGER, which controls the action taken when unsent data is queued on a socket, and the socket is closed. You can find more information about socket options in the Python socket documentation.

Q5: What can I do to prevent this error from occurring in the future?

To prevent this error from occurring in the future, ensure that you properly close your sockets when your application is terminated. You can also implement error handling and logging in your application to better understand and address issues as they arise.

  1. Python Socket Programming
  2. Understanding the Errno 98 Error
  3. Python Socket Documentation

I’m currently attempting to setup a SiriServer (that’s beside the point) on Xubuntu 12.10 x64, when I run the server python returns error

socket.error: [Errno 98] Address already in use.

The server by default is attempting to run on port 443, which unfortunetly is required in order for this application to work.

To double check if anything is running on port 443, I execute the following:

lsof -i :443

There’s no results, unless I have something like Chrome or Firefox open, which I end up closing. Here’s the full return from attempting to run the server application.

dustin@dustin-xubuntu:~/Applications/SiriServer$ sudo python siriServer.py
CRITICAL load_plugins Failed loading plugin due to missing module: 'Wordnik library not found. Please install wordnik library! e.g. sudo easy_install wordnik'
INFO <module> Starting Server
Traceback (most recent call last):
  File "siriServer.py", line 493, in <module>
    server = SiriServer('', options.port)
  File "siriServer.py", line 425, in __init__
    self.bind((host, port))
  File "/usr/lib/python2.7/asyncore.py", line 342, in bind
    return self.socket.bind(addr)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 98] Address already in use

I’m stuck on what to do, as this is the last part of setting up this application. Any help is appreciated.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *