# Linux cook failure: Error: Failed to initialize libwebsockets

**URL:** <https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996>\
**Category:** Platform & Builds\
**Tags:** unreal-engine, question\
**Created:** [January 26, 2025, 11:50pm UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996 "2025-01-26T23:50:17Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![meoblast001](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@meoblast001](https://forums.unrealengine.com/u/meoblast001)\
**Post date:** [January 26, 2025, 11:50pm UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996/1 "2025-01-26T23:50:17Z")

</div>

Hi. I’ve been getting a failure during builds for Linux (Shipping) on an Editor (5.5.1) running on Linux (Kubuntu 24.10, libwebsockets-dev 4.3.3):

```auto
AutomationTool exiting with ExitCode=25 (Error_UnknownCookFailure)

```

with the following in the cook log

```auto
LogWebSockets: Warning: Lws(Error): OOM allocating 1073741816 fds 
LogWebSockets: Warning: Lws(Error): ZERO RANDOM FD 
LogWebSockets: Error: Failed to initialize libwebsockets

```

This is the only error I could find in the cook log. Any idea what this would be caused by, considering that I have libwebsockets-dev installed?

---

<div class="post-metadata">

**Author:** ![FrostyJas](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/frostyjas/32/1194640_2.png) [@FrostyJas](https://forums.unrealengine.com/u/FrostyJas)\
**Post date:** [January 27, 2025, 5:23am UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996/2 "2025-01-27T05:23:23Z")

</div>

Hi there @meoblast001

Welcome to the Unreal Engine Community Forum! I pulled a thread from another developer having a similar error. See if this helps! [AutomationTool exiting with ExitCode=25 (Error\_UnknownCookFailure)](https://forums.unrealengine.com/t/automationtool-exiting-with-exitcode-25-error-unknowncookfailure/381117)

---

<div class="post-metadata">

**Author:** ![wolfom1996](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@wolfom1996](https://forums.unrealengine.com/u/wolfom1996)\
**Post date:** [February 14, 2025, 10:03pm UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996/3 "2025-02-14T22:03:37Z")

</div>

Hi @meoblast001 ,

I am having the same issue with libwebsockets as well on the same Kubuntu setup!

Have you found out the issue?

It’s pretty annoying that the provided samples cannot be cooked fully…

---

<div class="post-metadata">

**Author:** ![Dynamiquel](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Dynamiquel](https://forums.unrealengine.com/u/Dynamiquel)\
**Post date:** [March 9, 2025, 11:36am UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996/4 "2025-03-09T11:36:59Z")

</div>

I’ve been having the same issue with my Jenkins Docker Agent using UE 5.5.3.  
I’ve done the following and it seems to have helped:

1. In the Jenkins Docker image, add the following step:

```auto
RUN apt-get update && \
    apt-get install -y \
        libssl-dev \
        zlib1g-dev \
        ca-certificates && \
  apt-get clean

```

1. In the Jenkins Docker image, add the following step (I think this is what ended up fixing it. Might want to try this before doing the other steps):

```auto
RUN echo "* soft nofile 1048576" >> /etc/security/limits.conf && \
    echo "* hard nofile 1048576" >> /etc/security/limits.conf

```

1. Disable any plugins that depended on libwebsockets from the uproject file (I don’t think this actually helps as the module still tries to initialise with all dependencies disabled):

```auto
		{
			"Name": "EditorTelemetry",
			"Enabled": false
		},
		{
			"Name": "EditorPerformance",
			"Enabled": false
		},
		{
			"Name": "StudioTelemetry",
			"Enabled": false
		}

```

---

<div class="post-metadata">

**Author:** ![Lesuge](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Lesuge](https://forums.unrealengine.com/u/Lesuge)\
**Post date:** [March 12, 2025, 8:31am UTC](https://forums.unrealengine.com/t/linux-cook-failure-error-failed-to-initialize-libwebsockets/2304996/5 "2025-03-12T08:31:57Z")

</div>

thanks dude!  
this worked for me in cloudinit:

```auto
write_files:
  - path: /etc/security/limits.conf
    permissions: 0644
    owner: root
    content: |
      * soft nofile 32768
      * hard nofile 32768

```
