text-generation-webui icon indicating copy to clipboard operation
text-generation-webui copied to clipboard

API port in use

Open HappyCatKitten opened this issue 1 year ago • 2 comments

Describe the bug

When I activate API in interface mode and click restart, i get port in use.

I have ensured the port (5000) is not in use before I run this config but still get it

Is there an existing issue for this?

  • [X] I have searched the existing issues

Reproduction

Clicking API in interface mode, then restart

Screenshot

image

Logs

To create a public link, set `share=True` in `launch()`.
Closing server running on port: 7860
Loading the extension "gallery"... Ok.
Starting streaming server at ws://127.0.0.1:5005/api/v1/stream
Exception in thread Thread-3 (_run_server):
Traceback (most recent call last):
  File "/home/monster/Desktop/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
    self.run()
  File "/home/monster/Desktop/oobabooga_linux/installer_files/env/lib/python3.10/threading.py", line 953, in run
    self._target(*self._args, **self._kwargs)
  File "/home/monster/Desktop/oobabooga_linux/text-generation-webui/extensions/api/blocking_api.py", line 72, in _run_server
    server = ThreadingHTTPServer((address, port), Handler)
  File "/home/monster/Desktop/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 452, in __init__
    self.server_bind()
  File "/home/monster/Desktop/oobabooga_linux/installer_files/env/lib/python3.10/http/server.py", line 137, in server_bind
    socketserver.TCPServer.server_bind(self)
  File "/home/monster/Desktop/oobabooga_linux/installer_files/env/lib/python3.10/socketserver.py", line 466, in server_bind
    self.socket.bind(self.server_address)
OSError: [Errno 98] Address already in use
Running on local URL:  http://127.0.0.1:7860

System Info

Linux, ubunutu 20.0

HappyCatKitten avatar May 02 '23 08:05 HappyCatKitten

I reported the same in issue #1632

dblacknc avatar May 03 '23 02:05 dblacknc

maybe it's a gradio's bug, sd meet such bug before https://github.com/gradio-app/gradio/issues/2980

exoticknight avatar May 04 '23 09:05 exoticknight

i hit this error by having both --api and --listen in my start string

nutheory avatar May 19 '23 15:05 nutheory

This issue has been closed due to inactivity for 6 weeks. If you believe it is still relevant, please leave a comment below. You can tag a developer in your comment.

github-actions[bot] avatar Aug 25 '23 23:08 github-actions[bot]

running into this issue aswell

Aspark01 avatar Sep 22 '23 05:09 Aspark01

running into this issue aswell

Same, this is one of the several issues with the recent updates. It seems gradio does not release all ports. gradio version is 3.33.1 so it must be a new issue distinct from https://github.com/oobabooga/text-generation-webui/issues/1407

jsboige avatar Sep 26 '23 15:09 jsboige