You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 8, 2025. It is now read-only.
Memory allocation failed - OS: Ubuntu 18.04.2 LTS on Windows 10 #256
@incube8r So the problem is that Microsoft WSL implementation of Linux API incomplete.
You can try to avoid this issue by recompiling Unit with disabled memfd_create() syscall: ./configure --cc-opt='-DNXT_HAVE_MEMFD_CREATE=0'
$ ./configure java --module=java8
configuring Java module
checking for java executable found /usr/bin/java
openjdk version "1.8.0_212"
OpenJDK Runtime Environment (build 1.8.0_212-8u212-b03-0ubuntu1.18.04.1-b03)
OpenJDK 64-Bit Server VM (build 25.212-b03, mixed mode)
checking java.home /usr/lib/jvm/java-8-openjdk-amd64/jre
adjust java.home /usr/lib/jvm/java-8-openjdk-amd64
checking library path /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64/server
checking for JNI ... found
+ Java module: java8.unit.so
Then
make
Then when I do
$ curl -X PUT [email protected] '127.0.0.1:8443/config/'
{
"error": "Invalid configuration.",
"detail": "The module to run \"java 8\" is not found among the available application modules."
}
Activity
VBart commentedon May 28, 2019
Thank you for the report. Could you please check, what's in the
unit.log?incube8r commentedon May 29, 2019
@VBart after the curl put the log appends this:
2019/05/29 13:42:01 [alert] 33#33 *4 memfd_create(/unit.33.fb8f291) failed (38: Function not implemented)VBart commentedon May 29, 2019
@incube8r So the problem is that Microsoft WSL implementation of Linux API incomplete.
You can try to avoid this issue by recompiling Unit with disabled
memfd_create()syscall:./configure --cc-opt='-DNXT_HAVE_MEMFD_CREATE=0'incube8r commentedon May 29, 2019
I did:
Then
makeThen when I do
I won't run java
What could be missing here?
mar0x commentedon May 29, 2019
Please provide all commands you are using to configure/make/run unit.
If you running unit from packages, it is better to use pre-built java module.
VBart commentedon May 29, 2019
@incube8r You have to
make installyour module into the modules directory. You can check the modules directory path by runningunitd --helpcommand.incube8r commentedon May 29, 2019
@VBart thanks, I can confirm here that using the
./configure --cc-opt='-DNXT_HAVE_MEMFD_CREATE=0'I was able to run a Java web app with NGINX on Ubuntu 18.04 on Windows 10