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

When I used the new version 0.68 and the 0.20 sandbox, I still encountered workflow errors: error: operation not permitted #4576

Closed
4 tasks done
xiaoxiongxyy opened this issue May 22, 2024 · 6 comments
Assignees
Labels
🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff.

Comments

@xiaoxiongxyy
Copy link

Self Checks

  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • I confirm that I am using English to submit this report (我已阅读并同意 Language Policy).
  • Please do not modify this template :) and fill in all the required fields.

Dify version

0.68

Cloud or Self Hosted

Self Hosted (Docker)

Steps to reproduce

image simple code: def main(arg1): print(arg1)

✔️ Expected Behavior

no error

❌ Actual Behavior

panic

Copy link

dosubot bot commented May 22, 2024

Hello @xiaoxiongxyy! I'm Dosu, a bot here to help you squash bugs, answer questions, and guide you on becoming a contributor. While you wait for a human maintainer, I'm here to assist. I'll take a look at your issue and get back to you shortly!

@xiaoxiongxyy
Copy link
Author

my test code:
def main(arg1):
print(arg1)

@dosubot dosubot bot added 🌊 feat:workflow Workflow related stuff. 🐞 bug Something isn't working labels May 22, 2024
@WillWillWong
Copy link

def main(arg1):
return {'result': str(arg1)}
你可以尝试一下这个代码

Copy link

dosubot bot commented May 23, 2024

To resolve the "error: operation not permitted" issue when using Dify version 0.68 in a self-hosted Docker environment, follow these steps:

  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:
    Ensure your user has the necessary permissions to run Docker commands:

    sudo usermod -aG docker $USER
    
  3. Clone Dify Repository:
    Clone the Dify source code to your local machine:

    git clone https://github.com/langgenius/dify.git
    
  4. Navigate to Docker Directory:
    Navigate to the docker directory in the Dify source code:

    cd dify/docker
    
  5. Review and Modify Docker Compose Configuration:
    Ensure the docker-compose.yaml file is correctly configured, especially the volume mounts and network settings:

    services:
      db:
        image: postgres:15-alpine
        volumes:
          - ./volumes/db/data:/var/lib/postgresql/data
      redis:
        image: redis:6-alpine
        volumes:
          - ./volumes/redis/data:/data
      sandbox:
        image: langgenius/dify-sandbox:0.2.0
        volumes:
          - ./volumes/sandbox/dependencies:/dependencies
    
  6. Start Dify:
    Start Dify using Docker Compose:

    docker compose up -d
    
  7. Check Container Status:
    Verify that all containers are running successfully:

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

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

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

    docker run --cap-add=SYS_ADMIN --security-opt seccomp=unconfined <image_name>
    

Ensure you have the necessary permissions and that your Docker setup meets the prerequisites as outlined in the documentation. If the issue persists, consult your system administrator or refer to Docker's documentation for further troubleshooting.

Details

Sources


About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.

Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.

To continue the conversation, mention @dosu.

@junonya
Copy link

junonya commented May 25, 2024

@xiaoxiongxyy
It looks like you don't have enough permissions on the Dify server. Try changing the Dify server permissions using the chomod command.

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Jun 25, 2024
@crazywoola
Copy link
Member

See this #4993 for updates

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 bug Something isn't working 🌊 feat:workflow Workflow related stuff.
Projects
None yet
Development

No branches or pull requests

5 participants