Getting bind on address error in serverless
I'm always getting the following error on my serverless container:
What am I doing wrong?
18 Replies
May I know what are you trying to run?
I'm running a custom model using the handler function
What model what function?
Usually you do not need to bind any ports as serverless cant expose ports
i'm not binding any ports, it is the handler that binds the port
Mind showing full log?
it's basically this:
ERROR: [Errno 99] error while attempting to bind on address ('::1', 8000, 0, 0): cannot assign requested address
though it's not full log
and repeating...
I think something is wrong with your code causing it to loop and fail cause one process starts take port then like fails but api is still listning on that port causing issues
is there a way to start the worker without the handler and ssh into it? I’m running it locally (m1) but there might be sth missing for cuda then
Can you share your code?
It sounds like there is something already bound to port 8000. '::1' indicates you are trying to bind to IPV6 localhost. You might get further with '127.0.0.1' or '0.0.0.0'. '0.0.0.0' means "all IPv4 addresses on the local machine." If after that you still get similar message you can change 8000 to another # i.e. 8043. 8000 is the default port so is more suspectable to conflict.
Code is doing something wrong
I ran my code on a scaleway vm with an L4 and it works without problems there. I noticed that when I change my docker command to
it starts up correctly, but doesn't seem to process the queue item. any other arguments I need to pass to the handler in the docker
CMD
section?What are you doing? That is for local testing not to run within Docker
For docker you just call the handler, no args
eg.
Best to use
-u
for unbuffered output as well.so no rp_serve_api?
No thats only for local testing as I mentioned above
None of this stuff:
awesome, seems to work now. thanks for your help!