R
RunPod•4mo ago
jax

ComfyUI Connection refused error

When using comfyUI, the 127.0.0.1:8188 service is started, but when requesting the service, it keeps reporting the error urlopen error [Errno 111] Connection refused, but in other environments, the code works fine.
7 Replies
ashleyk
ashleyk•4mo ago
Please ask in #🎤|general , this is to get support from RunPod and this is not a RunPod issue, its something wrong with your serverless worker. You most likely didn't wait long enough for the service to come up before trying to send requests to it.
ashleyk
ashleyk•4mo ago
GitHub
runpod-worker-a1111/rp_handler.py at main · ashleykleynhans/runpod-...
RunPod Serverless Worker for the Automatic1111 Stable Diffusion API - ashleykleynhans/runpod-worker-a1111
jax
jax•4mo ago
I've waited 10s, and it works fine in other environments, so I'm wondering if runpod has a restriction on opening port services.
ashleyk
ashleyk•4mo ago
There is no restriction, it takes longer than 10s for services to start up sometimes, so use the link I sent to check whether the port is up instead of ignoring the advice.
jax
jax•4mo ago
The code does make a difference, I am starting the port service internally at runpod.serverless.start({"handler": job}), whereas the code you gave, including https://github.com/blib-la/runpod-worker-comfy都是在runpod. serverless.start externally starts the port service
ashleyk
ashleyk•4mo ago
Making assumptions in software development is stupid, you need to check things and not just assume it will come up in 10s. It is stupid to start services inside the handler function, only an idiot will do that. You need to take the time to understand serverless, you are doing it wrong. There are more than enough examples but instead you just choose to not bother to do any research and jump off a cliff and do things wrong.
jax
jax•4mo ago
I was referring to the https://github.com/fofr/cog-comfyui/blob/main/predict.py example from replicate, and was going to do a quick run through to see and merge the setup part of it into the handler function, but ran into this problem.
GitHub
cog-comfyui/predict.py at main · fofr/cog-comfyui
Run ComfyUI with an API. Contribute to fofr/cog-comfyui development by creating an account on GitHub.