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

Error invoking function if the configured FN_IOFS_DOCKER_PATH is too long #52

Open
ArtunSubasi opened this issue Mar 3, 2019 · 2 comments

Comments

@ArtunSubasi
Copy link

I was receiving the following error while invoking a function via CLI fn invoke: "Error invoking function. status: 502 message: container failed to initialize, please ensure you are using the latest fdk / format and check the logs".

I turns out, it was because of the length of the path specified in the env variable FN_IOFS_DOCKER_PATH. Everything under 74 chars is ok, paths with 75 or more chars do not work.

I'm using a mac, building and running with docker. To reproduce:

docker run -p 8080:8080 \
           -e FN_IOFS_DOCKER_PATH=/aVeryLongPathWithMoreThan74Chars/LongLongLongLongLongLongLongLongLongLongLong \
           -e FN_IOFS_PATH=/iofs \
           -v $PWD/fn/data:/app/data \
           -v /aVeryLongPathWithMoreThan74Chars/LongLongLongLongLongLongLongLongLongLongLong:/iofs \
           -v /var/run/docker.sock:/var/run/docker.sock fnproject/fnserver:0.3.668

Deploying a function and running it using the CLI:

fn invoke app function

Error message:

Error invoking function. status: 502 message: container failed to initialize, please ensure you are using the latest fdk / format and check the logs

The logs contain just the same information.

Client version is latest version: 0.5.59
Server version: 0.3.668

Although I solved my problem by using a shorter path, I wanted to inform you about the issue. You may want to add a validation, better logging or documentation.

@denismakogon
Copy link
Member

Isn't that a docker limitation rather than Fn?

@ArtunSubasi
Copy link
Author

Honestly, I don't know. I don't understand why the path on the host machine matters, since my Mac Majove supports up to 1016 characters in paths. The mounted path within the docker image is always /iofs

What is IOFS anyway? Is there a documentation about IOFS and how it should be configured?

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

2 participants