AUTOMATIC1111 / stable-diffusion-webui

Stable Diffusion web UI
GNU Affero General Public License v3.0
141.72k stars 26.77k forks source link

[Bug]: OSError: Cannot find empty port in range: 7860-7860. You can specify a different port by setting the GRADIO_SERVER_PORT environment variable or passing the `server_port` parameter to `launch()` #16543

Open phucbienvan opened 1 week ago

phucbienvan commented 1 week ago

Checklist

What happened?

OSError: Cannot find empty port in range: 7860-7860. You can specify a different port by setting the GRADIO_SERVER_PORT environment variable or passing the server_port parameter to launch()

Steps to reproduce the problem

I encountered this error when starting Stable Diffusion WebUI. with the arguments: --api --listen --cors-allow-origins '*' --port=7860 --no-gradio-queue --skip-torch-cuda-test --nowebui.

What should have happened?

If I restart the Stable Diffusion WebUI, it works fine. However, since it's currently running in a production environment, I can't keep restarting it like that. Can you tell me why?

What browsers do you use to access the UI ?

No response

Sysinfo

I am running on an EC2 Linux environment.

Console logs

OSError: Cannot find empty port in range: 7860-7860. You can specify a different port by setting the GRADIO_SERVER_PORT environment variable or passing the `server_port` parameter to `launch()`

Additional information

No response

missionfloyd commented 1 week ago

Is something else using 7860? Try a different port.

phucbienvan commented 1 week ago

Is something else using 7860? Try a different port.

hi @missionfloyd No, I tried switching to port 55555 and encountered this error: Cannot find empty port in range: 55555-55555