Minecraft Server lässt sich nicht starten?
Hallo erstmal,
ab und zu setze ich für paar Kollegen und mich einen Minecraft Server auf. Eigentlich keine große Sache, da ich das schon oft gemacht habe. Seit dem letzten mal startet er aber nicht und gibt folgende Fehlermeldung aus:
[0.055s][warning][os,thread] Failed to start thread - pthread_create failed (EAGAIN) for attributes: stacksize: 1024k, guardsize: 0k, detached.
Error occurred during initialization of VM
java.lang.OutOfMemoryError: unable to create native thread: possibly out of memory or process/resource limits reached
at java.lang.Thread.start0(java.base/Native Method)
at java.lang.Thread.start(java.base/Thread.java:803)
at java.lang.ref.Reference.<clinit>(java.base/Reference.java:303)
Oft macht das den ganzen Server kaput, wonach ich ihn neu aufsetzen muss. Zumindest kann ich das Problem nicht anders lösen.
Ich habe das Problem auf meinem alten V-Server schon gehabt und bei meinem neuen ist es nicht anders, selbst mit einem frischen System.
Die Installation läuft wie folgt:
apt install openjdk-11-jre-headless -y
adduser --disabled-login minecraft
su minecraft
cd
wget https://cdn.getbukkit.org/spigot/spigot-1.16.5.jar
java -Xms4096M -Xmx4096M -jar /home/minecraft/spigot-1.16.5.jar
Auf dem Server läuft Ubuntu 18.04.
Nebenbei läuft nur ein Teamspeak. Ein CSGO Server ist installiert läuft aber nicht.
Komisch finde ich das ich das Problem auf unterschiedlichen Servern bekomme, im Internet dazu aber nicht wirklich etwas finden kann. Was mach ich also falsch?
Danke schonmal für eure Hilfe!
5 Antworten
Hmm, ist das eine 64 Bit Version von Java ?
Weil 32 Bit unterstützt soweit ich weiss, keine 4 GB RAM.. Von daher kommt der Fehler "Out of Memory" von zuviel zugewiesene Speicher...
Weise mal weniger RAM zu...
Du kannst auch insgesamt nicht mehr RAM zuweisen, als die VM hat.. Und Ubuntu braucht auch noch RAM...
Ja, mag sein, aber ist dein installiertes Java eine 64 Bit Version ? Das war die Frage und die ist nicht geklärt...
openjdk version "11.0.9.1" 2020-11-04
OpenJDK Runtime Environment (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04)
OpenJDK 64-Bit Server VM (build 11.0.9.1+1-Ubuntu-0ubuntu1.18.04, mixed mode, sharing)
Nach vielem rumprobieren hat sich nun herausgestellt das Teamspeak das problem ist. Warum auch immer kann beides nicht gleichzeitig laufen. Aber dafür mach ich mal eine neue Frage auf. Danke an alle
possibly out of memory or process/resource limits reached
Möglich, dass für deinen User ein sehr restriktives ulimit gesetzt ist - etwa die Zahl von Threads.
"ulimit -a" sagt dir erstmal mehr.
Und natürlich solltest du mal schauen, was für Prozesse noch herumhängen (top bzw. ps).
Danke für die schnelle Antwort.
Das hier kommt mit ulimit -a raus:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1545449
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62987
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Das schaut erstmal unauffällig aus, obwohl auf einem Server die 1024 File Handles schon mal verbraucht werden können. Da wäre die Frage, ob dir z.B. dein gleichzeitig laufender Teamspeak-Server die Threads o.ä. wegfrisst.
Also top gibt folgendes aus:
8109 root 20 0 1274240 20268 4352 S 1,3 0,2 529:12.56 containerd
1488 teamspe+ 20 0 1617112 29248 4256 S 0,7 0,3 432:50.15 ts3server
16510 root 20 0 38532 3824 3216 R 0,7 0,0 0:00.04 top
163 syslog 20 0 189024 3780 2728 S 0,3 0,0 8:10.31 rsyslogd
10503 root 20 0 97188 6844 5904 S 0,3 0,1 0:00.32 sshd
14058 postfix 20 0 81184 8192 7304 S 0,3 0,1 0:00.22 cleanup
16424 postfix 20 0 81032 6996 6140 S 0,3 0,1 0:00.28 spawn
1 root 20 0 225056 7076 5416 S 0,0 0,1 2:49.77 systemd
76 root 20 0 282948 123600 111260 S 0,0 1,5 59:57.99 systemd-journal
139 root 20 0 42100 2952 2740 S 0,0 0,0 0:02.44 systemd-udevd
141 systemd+ 20 0 71884 3052 2956 S 0,0 0,0 0:02.74 systemd-network
154 message+ 20 0 47728 3244 2920 S 0,0 0,0 0:02.72 dbus-daemon
159 root 20 0 30052 2464 2308 S 0,0 0,0 0:31.11 cron
162 root 20 0 62176 3520 3340 S 0,0 0,0 0:04.09 systemd-logind
191 root 20 0 100972 1788 1720 S 0,0 0,0 0:00.00 saslauthd
193 root 20 0 100972 60 0 S 0,0 0,0 0:00.00 saslauthd
317 root 20 0 443432 19168 19036 S 0,0 0,2 0:02.71 sw-engine-fpm
349 root 20 0 72296 5332 5188 S 0,0 0,1 42:57.94 sshd
360 root 20 0 24184 2176 2104 S 0,0 0,0 0:22.50 xinetd
363 root 20 0 39880 420 0 S 0,0 0,0 0:00.00 sw-cp-serverd
368 sw-cp-s+ 20 0 41260 6308 4848 S 0,0 0,1 0:02.67 sw-cp-serverd
544 root 20 0 146384 9980 8052 S 0,0 0,1 1:48.78 apache2
620 mysql 20 0 715840 100608 6328 S 0,0 1,2 34:40.22 mysqld
725 root 20 0 65436 3924 3424 S 0,0 0,0 8:08.94 master
727 postfix 20 0 81104 6440 5580 S 0,0 0,1 4:22.94 qmgr
994 postfix 20 0 81200 7212 6900 S 0,0 0,1 0:01.05 tlsmgr
8189 root 20 0 1426100 21224 2780 S 0,0 0,3 7:27.52 dockerd
10416 minecra+ 20 0 7756024 2,878g 28304 S 0,0 36,0 2:45.81 java
10521 root 20 0 21500 5080 3308 S 0,0 0,1 0:00.06 bash
10560 root 20 0 50968 3448 3052 S 0,0 0,0 0:00.01 su
10561 minecra+ 20 0 21552 5176 3396 S 0,0 0,1 0:00.09 bash
12526 root 20 0 14688 2304 2168 S 0,0 0,0 0:00.00 agetty
12529 root 20 0 13016 1936 1808 S 0,0 0,0 0:00.00 agetty
14537 root 20 0 50980 3508 3104 S 0,0 0,0 0:00.01 su
14540 root 20 0 20204 3916 3436 S 0,0 0,0 0:00.09 bash
15048 postfix 20 0 81064 8092 7128 S 0,0 0,1 0:00.01 trivial-rewrite
16464 root 20 0 72296 5644 4916 S 0,0 0,1 0:00.00 sshd
16484 postfix 20 0 81032 7024 6168 S 0,0 0,1 0:00.07 spawn
16518 root 20 0 72296 5780 5052 S 0,0 0,1 0:00.01 sshd
16520 popuser 20 0 81032 888 32 S 0,0 0,0 0:00.00 spawn
19847 root 20 0 30312 2992 2456 S 0,0 0,0 0:00.00 screen
19848 root 20 0 21516 5196 3400 S 0,0 0,1 0:00.04 bash
22493 www-data 20 0 145880 3808 1880 S 0,0 0,0 0:00.68 apache2
22494 www-data 20 0 2074328 7792 4912 S 0,0 0,1 0:00.09 apache2
22522 www-data 20 0 2074236 8812 5560 S 0,0 0,1 0:00.11 apache2
27149 postfix 20 0 81044 6616 5772 S 0,0 0,1 0:08.85 pickup
und ps das hier:
PID TTY TIME CMD
10521 pts/3 00:00:00 bash
10560 pts/3 00:00:00 su
14537 pts/3 00:00:00 su
14540 pts/3 00:00:00 bash
16599 pts/3 00:00:00 ps
Denkbar wäre auch, dass du in Limits der Threads pro Prozess läufst.
cat /proc/sys/kernel/threads-max
Darüber hab ich mich auch gewundert. Eigentlich sollte er garnicht laufen. Ich habe die Konsole wo er lief beendet und erreichbar ist er auch nicht
Hab ihn gekillt. Java konnte ich jetzt auch instalieren. Ich versuchs jetzt nochmal mit dem Minecraft Server
Geht immer noch nicht
Loading libraries, please wait...
[19:16:14] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[19:16:14] [main/INFO]: Found new data pack file/bukkit, loading it automatically
[19:16:15] [main/INFO]: Reloading ResourceManager: Default, bukkit
[19:16:17] [Worker-Main-4/INFO]: Loaded 7 recipes
[19:16:21] [main/INFO]: [STDERR]: java.lang.OutOfMemoryError: unable to create new native thread
[19:16:21] [main/INFO]: [STDERR]: at java.lang.Thread.start0(Native Method)
[19:16:21] [main/INFO]: [STDERR]: at java.lang.Thread.start(Thread.java:717)
[19:16:21] [main/INFO]: [STDERR]: at net.minecraft.server.v1_16_R3.MinecraftServer.a(MinecraftServer.java:173)
[19:16:21] [main/INFO]: [STDERR]: at net.minecraft.server.v1_16_R3.Main.main(Main.java:168)
[19:16:21] [main/INFO]: [STDERR]: at org.bukkit.craftbukkit.Main.main(Main.java:202)
Hm. Hast du die ulimits als root oder als minecraft gemacht? Diese Limits sind pro User.
Hab ich garnicht drauf geachtet. Hier auf jeden fall nochmal als minecraft
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 1545449
max locked memory (kbytes, -l) 65536
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 62987
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited
Interessant. Macht es einen Unterschied, wenn du testweise(!) den Server unter root betreibst?
Leider nein. Ich hab nochmal alle minecraft Prozesse beendet und nochmal versucht das ganze zu starten. Da kam jetzt folgendes raus:
Loading libraries, please wait...
[19:20:43] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[19:20:43] [main/INFO]: Found new data pack file/bukkit, loading it automatically
[19:20:44] [main/INFO]: Reloading ResourceManager: Default, bukkit
[19:20:46] [Worker-Main-4/INFO]: Loaded 7 recipes
[19:20:43] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', servicesHost='https://api.minecraftservices.com', name='PROD'
[19:20:43] [main/INFO]: Found new data pack file/bukkit, loading it automatically
[19:20:44] [main/INFO]: Reloading ResourceManager: Default, bukkit
[19:20:46] [Worker-Main-4/INFO]: Loaded 7 recipes
[19:20:50] [Server thread/INFO]: Starting minecraft server version 1.16.5
[19:20:50] [Server thread/INFO]: Loading properties
[19:20:51] [Server thread/INFO]: This server is running CraftBukkit version 2991-Spigot-018b9a0-f3f3094 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)
[19:20:51] [Server thread/INFO]: Server Ping Player Sample Count: 12
[19:20:51] [Server thread/INFO]: Using 4 threads for Netty based IO
[19:20:51] [Server thread/INFO]: Debug logging is disabled
[19:20:51] [Server thread/INFO]: Default game type: SURVIVAL
[19:20:51] [Server thread/INFO]: Generating keypair
[19:20:52] [Server thread/INFO]: Starting Minecraft server on absturzelite.de:25565
[19:20:52] [Server thread/INFO]: Using epoll channel type
[19:20:52] [Server thread/ERROR]: Failed to submit a listener notification task. Event loop shut down?
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) ~[?:1.8.0_275]
at java.lang.Thread.start(Thread.java:717) ~[?:1.8.0_275]
at io.netty.util.concurrent.GlobalEventExecutor.startThread(GlobalEventExecutor.java:237) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.GlobalEventExecutor.execute(GlobalEventExecutor.java:213) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.DefaultPromise.safeExecute(DefaultPromise.java:764) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:432) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.DefaultPromise.setFailure(DefaultPromise.java:112) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at
war zu lang, hier gehts weiter:
io.netty.channel.DefaultChannelPromise.setFailure(DefaultChannelPromise.java:89) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:327) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:282) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:246) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.ServerConnection.a(ServerConnection.java:81) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:175) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]
[19:20:52] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.OutOfMemoryError: unable to create new native thread
at java.lang.Thread.start0(Native Method) ~[?:1.8.0_275]
at java.lang.Thread.start(Thread.java:717) ~[?:1.8.0_275]
at io.netty.util.internal.ObjectCleaner.register(ObjectCleaner.java:122) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.FastThreadLocal.registerCleaner(FastThreadLocal.java:158) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.util.concurrent.FastThreadLocal.get(FastThreadLocal.java:144) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.channel.DefaultChannelPipeline.generateName(DefaultChannelPipeline.java:416) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.channel.DefaultChannelPipeline.filterName(DefaultChannelPipeline.java:300) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:210) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:409) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.channel.DefaultChannelPipeline.addLast(DefaultChannelPipeline.java:396) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.ServerBootstrap.init(ServerBootstrap.java:169) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.initAndRegister(AbstractBootstrap.java:321) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.doBind(AbstractBootstrap.java:282) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at io.netty.bootstrap.AbstractBootstrap.bind(AbstractBootstrap.java:246) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.ServerConnection.a(ServerConnection.java:81) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:175) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:809) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$0(MinecraftServer.java:164) ~[spigot-1.16.5.jar:2991-Spigot-018b9a0-f3f3094]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_275]
[19:20:52] [Server thread/ERROR]: This crash report has been saved to: /home/minecraft/./crash-reports/crash-2021-01-19_19.20.52-server.txt
[19:20:52] [Server thread/INFO]: Stopping server
[19:20:52] [Server thread/INFO]: Saving players
[19:20:53] [Server thread/INFO]: Saving worlds
Das ist offenkundig ein virtueller Server...an der Stelle würde ich mal schauen, ob das ein Problem der Virtualisierungslösung ist. Oder ein Spezifikum des MC-Servers, aber da weiß ich nix dazu.
Ich werd mal recherchieren. Dann trotzdem vielen Danke für deine Hilfe
Vielleicht probierst du es mal mit Java 8 und nicht 11. Soweit ich weiß ist das die Version die auch normalerweise beim Minecraft-Client mitgeliefert wird.
Danke erstmal für die schnelle Antwort.
Wenn ich Java 8 installiere kommt das hier:
dpkg: Fehler beim Bearbeiten des Paketes openjdk-8-jre:amd64 (--configure):
Abhängigkeitsprobleme - verbleibt unkonfiguriert
Fehler traten auf beim Bearbeiten von:
ca-certificates
ca-certificates-java
openjdk-8-jre-headless:amd64
openjdk-8-jdk-headless:amd64
openjdk-8-jdk:amd64
openjdk-8-jre:amd64
Und den Befehl java –version findet er nicht.
Setze xms viel geringer an
Dein v Server hat sicher maximal 8gb und wird dynamisch zugewiesen
Du hast bestimmt in dem Moment weniger verfügbar.
Dein Ram steigt nach und nach an wenn er sich füllt
Check das Mal mit htop
Wie seh ich das? Oben der Balken zeigt immer /8GB an und geht eigentlich nie über 1GB.
Mh kommt auf die Art der Virtualisierung an Versuch es doch Mal mit Xms 1024 die Parameter Xms ist der minimal zugesicherte Speicher Xmx ist der maximal zugesicherte.
Welchen Holster und welchen Server hast du denn?
Strato Linux V10-8. Davor hatte ich den V20. Da wars genau so
könnte am Virtuozzo container liegen, der ist nicht seh großzügig und kann ehr restriktiv eingestellt werden.
vserver sind einfach nicht für sowas ausgelegt
wir können das ja mal auf einem hetzner cloud server testen, ansonsten empfehle ich eher sowas:
- Intel Core i7-4770
- 4x RAM 8192 MB DDR3
- 2x HDD SATA 2,0 TB Enterprise
28,00 €monatlich inkl. Mehrwertsteuer, Keine Setupgebühr.
Ich hab schon diverse Ramzuweisungen probiert. Hilft alles nichts. Der Server hat btw 8 GB und läuft auf 64 bit