langgenius / dify

Dify is an open-source LLM app development platform. Dify's intuitive interface combines AI workflow, RAG pipeline, agent capabilities, model management, observability features and more, letting you quickly go from prototype to production.
https://dify.ai
Other
51.82k stars 7.51k forks source link

The Template Transform node has error : operation not permitted #10585

Open kkjinping opened 4 days ago

kkjinping commented 4 days ago

Self Checks

Dify version

0.11.1

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

  1. equals string has error
    {% if text == '1' %}
    1
    {% endif %}
  2. join is ok, but join(',') has error
    {{text | join(','}}
  3. replace has error, the example from dify doc
    {{ item.content | replace('\n', '\n\n') }}

    1731398471116 1731398475410

✔️ Expected Behavior

no error

❌ Actual Behavior

No response

dosubot[bot] commented 4 days ago

I found a similar issue related to the "operation not permitted" error in Dify, which might be relevant to your situation. The issue was discussed in this thread, where users encountered workflow errors in a self-hosted Docker environment. The suggested solution involves checking Docker and Docker Compose versions, setting proper permissions, and reviewing Docker Compose configurations [1].

Here are some steps you can try to resolve the issue:

  1. Check Docker and Docker Compose Versions: Ensure you have Docker 19.03 or later and Docker Compose 1.25.1 or later installed.

    docker --version
    docker-compose --version
  2. Set Proper Permissions: Make sure your user has the necessary permissions to run Docker commands.

    sudo usermod -aG docker $USER
  3. Review and Modify Docker Compose Configuration: Ensure the docker-compose.yaml file is correctly configured, especially the volume mounts and network settings.

  4. Check Container Status: Verify that all containers are running successfully.

    docker compose ps
  5. Review Docker Logs: Check the Docker container logs for any additional insights into the permission issue.

    docker logs <container_name>
  6. SELinux/AppArmor Policies: If SELinux or AppArmor is active, adjust the policies to allow the needed operations.

  7. Docker Security Options: Consider Docker's security options like --cap-add or --privileged to grant additional permissions, but use them cautiously.

These steps should help address the "operation not permitted" error. If the issue persists, further investigation into the specific error messages or logs generated by the Template Transform node might be necessary.

To continue talking to Dosu, mention @dosu.

crazywoola commented 4 days ago

Thanks for reporting this issue, we will take a look at this later.