Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sock Bind error in with Python in local - Mac with Rancher #1610

Open
jmalbarran opened this issue Dec 22, 2024 · 0 comments
Open

Sock Bind error in with Python in local - Mac with Rancher #1610

jmalbarran opened this issue Dec 22, 2024 · 0 comments

Comments

@jmalbarran
Copy link

I'm testing Apache Functions and I'm trying to test my function locally

For this, I have started the local server with

fn start --log-level DEBUG --port 8080

and I'm trying to create, deploy and invoke a test function with

fn use context default
fn update context registry mylocalregistry

fn -v init --runtime python fn-local

cd fn-local

fn -v deploy --create-app --app app-local --local
fn invoke app-local fn-local

But the invocation (last line) fails with Error invoking function. status: 502 message: Container failed to initialize, please ensure you are using the latest fdk and check the logs

In the server logs I see that the problem is a python socket creation

...
time="2024-12-21T19:48:40Z" level=debug msg="  File \"/python/fdk/__init__.py\", line 62, in start\n" app_id=01JFN9NJFZNG8G00GZJ0000001 container_id=01JFNC7J7ZNG8G00GZJ0000003 fn_id=01JFNC6GG1NG8G00GZJ0000001 image="mylocalregistry/fn-local:0.0.2" tag=stderr
time="2024-12-21T19:48:40Z" level=debug msg="    sock.bind(phony_socket_path)\n" app_id=01JFN9NJFZNG8G00GZJ0000001 container_id=01JFNC7J7ZNG8G00GZJ0000003 fn_id=01JFNC6GG1NG8G00GZJ0000001 image="mylocalregistry/fn-local:0.0.2" tag=stderr
time="2024-12-21T19:48:40Z" level=debug msg="PermissionError: [Errno 1] Operation not permitted\n" app_id=01JFN9NJFZNG8G00GZJ0000001 container_id=01JFNC7J7ZNG8G00GZJ0000003 fn_id=01JFNC6GG1NG8G00GZJ0000001 image="mylocalregistry/fn-local:0.0.2" tag=stderr
time="2024-12-21T19:48:40Z" level=info msg="hot function terminated" app_id=01JFN9NJFZNG8G00GZJ0000001 container_id=01JFNC7J7ZNG8G00GZJ0000003 cpus= error="container exit code 1" fn_id=01JFNC6GG1NG8G00GZJ0000001 idle_timeout=30 image="mylocalregistry/fn-local:0.0.2" memory=256

...

I have already tried to run the starting with root sudo fn start with no change

I'm using Mac Sequioa with Rancher

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant