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 response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 8: operation not permitted: unknown #903

Open
sapentiae opened this issue Jul 22, 2023 · 12 comments

Comments

@sapentiae
Copy link

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 8: operation not permitted: unknown

@m1ntyduck
Copy link

Same issue on Proxmox 7.4-15 using a stndard Ubuntu LXC (22.04)

Wazuh Manager - starts fine

Wazuh Indexer; returns the message:-

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 8: operation not permitted: unknown

@Ben-Higham
Copy link

Ben-Higham commented Jul 24, 2023

Same issue on Proxmox 7.4-15 using a stndard Ubuntu LXC (22.04)

Wazuh Manager - starts fine

Wazuh Indexer; returns the message:-

Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting rlimits for ready process: error setting rlimit type 8: operation not permitted: unknown

Same for me, also in Proxmox 7.4-15 but in Debian 11 standard container.

@Nonesence999
Copy link

Sam issue using Docker on windows whit debian dev env

@Ben-Higham
Copy link

Ben-Higham commented Jul 27, 2023

I found someone getting the same error with Elasticsearch in another docker compose file and their solution worked for me.

In docker-compose.yml comment out the following lines then try compose up:

   # ulimits:
   #   memlock:
   #     soft: -1
   #     hard: -1
   #   nofile:
   #     soft: 65536
   #     hard: 65536

@m1ntyduck
Copy link

Thanks @Ben-Higham this worked for me.

@p1r4t3-s4il0r
Copy link

Hello,
I know this issue is a bit old but I'm facing the same issue using docker rootless.
Have anyone manage to get trough this ?
Thanks

@camorobot
Copy link

Are there any updates? having trouble with the same error.

@ozoumi
Copy link

ozoumi commented May 15, 2024

I found someone getting the same error with Elasticsearch in another docker compose file and their solution worked for me.

In docker-compose.yml comment out the following lines then try compose up:

   # ulimits:
   #   memlock:
   #     soft: -1
   #     hard: -1
   #   nofile:
   #     soft: 65536
   #     hard: 65536

thanks, it worked

@lpaxton-bigwx
Copy link

I found someone getting the same error with Elasticsearch in another docker compose file and their solution worked for me.

In docker-compose.yml comment out the following lines then try compose up:

   # ulimits:
   #   memlock:
   #     soft: -1
   #     hard: -1
   #   nofile:
   #     soft: 65536
   #     hard: 65536

Worked for me on Proxmox 8.2.4 using single node

@jov-one
Copy link

jov-one commented Aug 3, 2024

I had the same problem with Elasticsearch running in LXC on Proxmox and I don't suggest commenting out ulimits for Elasticsearch in docker-compose

If you are encountering issues related to memory locking limits (memlock) when running Elasticsearch (or other memory-intensive applications) inside LXC containers on Proxmox, you can resolve this by setting the memlock limit to unlimited for that LXC. This ensures that your application can lock the required amount of memory and avoid performance issues related to swapping.

To fix this, edit the LXC config file by adding lxc.prlimit.memlock=-1 and reboot the container.

@rallisf1
Copy link

To fix this, edit the LXC config file by adding lxc.prlimit.memlock=-1 and reboot the container.

Also add lxc.prlimit.nofile:655360

@GoGit-IT
Copy link

GoGit-IT commented Nov 6, 2024

Hey
Sure it is great work around but could it be a sort of typo in the initial docker compose it self?
I suspect two "loose" 0 sneak in to it.
However default ulimits must be changed, no matter what without commenting out the ulimits section.
Just for comparison two services from the some compose:

  • Wazuh manager -> 655360...that 0 at the end
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 655360
        hard: 655360
  • Wazuh indexer -> 65536
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 65536
        hard: 65536

Does manager really require 10x more resources?

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