Skip to content

Error when running code: Must be ran as root #709

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

Open
TheLostProgrammer opened this issue Apr 3, 2025 · 0 comments
Open

Error when running code: Must be ran as root #709

TheLostProgrammer opened this issue Apr 3, 2025 · 0 comments

Comments

@TheLostProgrammer
Copy link

System Information
• Fedora Server 41
• Hosted on Raspberry Pi

Every time I go to run code, it just errors out. I check the logs for the piston container and I get the following:

2025-04-02T08:46:01.888Z [INFO]  job/e67e4393-d5a8-4483-bd65-f84a7bdd1340: Cleaning up job
2025-04-02T08:46:02.067Z [ERROR] job/e67e4393-d5a8-4483-bd65-f84a7bdd1340: Failed to remove the metadata directory of box #1. Error: ENOENT: no such file or directory, stat '/tmp/1-metadata.txt'
2025-04-02T08:46:02.211Z [ERROR] job/e67e4393-d5a8-4483-bd65-f84a7bdd1340: Failed to run isolate --cleanup: Command failed: isolate --cleanup --cg -b1
Must be started as root
 on box #1
stdout:
stderr: Must be started as root

This is the docker-compose for the API:

  api:
    image: ghcr.io/engineer-man/piston
    container_name: piston_api
    restart: always
    privileged: true
    user: root
    ports:
      - "2000:2000"
    volumes:
      - ./data/piston/packages:/piston/packages
    tmpfs:
      - /piston/jobs:exec,uid=1000,gid=1000,mode=711
      - /tmp:exec

Adding command: whoami to the docker-compose, I get the following output:

user@hostname ❯ sudo docker logs fbbf34a5a629
root
root
root
root
root
root

This shows that it is running as root which makes no sense to why it has Must be started as root.

Entering the isolate command within the container doesn't have any problem:

user@hostname ❯ sudo docker exec -it 46413f33d176 bash
root@46413f33d176:/piston_api# isolate --init
/var/local/lib/isolate/0
root@46413f33d176:/piston_api# isolate --cleanup
root@46413f33d176:/piston_api#
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