3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

マインクラフトサーバーで SessionLock$ExceptionWorldConflict エラーが発生したときの対処法

Last updated at Posted at 2021-04-04

環境について

この記事で利用している端末は RaspberryPi 4B 8GB Model でOSは RaspberryPi OS を利用しています。
マインクラフトサーバーソフトウェアは SpigotMCベースの PaperMCを利用しており、SpigotMCと互換性があります。

エラー内容

[23:21:24] [Server thread/ERROR]: Encountered an unexpected exception
java.lang.RuntimeException: net.minecraft.server.v1_16_R3.SessionLock$ExceptionWorldConflict: /home/pi/sv4/./utility_nether/session.lock: already locked (possibly by other Minecraft instance?)
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:361) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:239) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:936) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:174) ~[patched_1.16.5.jar:git-Paper-471]
        at java.lang.Thread.run(Thread.java:834) [?:?]
Caused by: net.minecraft.server.v1_16_R3.SessionLock$ExceptionWorldConflict: /home/pi/sv4/./utility_nether/session.lock: already locked (possibly by other Minecraft instance?)
        at net.minecraft.server.v1_16_R3.SessionLock$ExceptionWorldConflict.a(SourceFile:98) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.SessionLock.a(SourceFile:44) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.Convertable$ConversionSession.<init>(Convertable.java:218) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.Convertable.c(Convertable.java:200) ~[patched_1.16.5.jar:git-Paper-471]
        at net.minecraft.server.v1_16_R3.MinecraftServer.loadWorld(MinecraftServer.java:359) ~[patched_1.16.5.jar:git-Paper-471]

どうやら utility_nether の session.lock が原因らしい。(2023年2月21日追記:session.lockとはマインクラフトサーバーを起動させる際の誤動作を防止するためのファイルらしいです。よう分からん。)

解決法

session.lock を削除してもう一度作り直してあげればいい。

rm -r "マインクラフトサーバーのファイル"/"問題の起きているワールド"/session.lock

この場合は sv4 がマインクラフトサーバーのファイルで utility_nether が問題の起きているワールドなので

rm -r sv4/utility_nether/session.lock

となります。

できた!!と思ったら....

net.minecraft.server.v1_16_R3.SessionLock$ExceptionWorldConflict: /home/pi/sv4/./utility_the_end/session.lock: already locked (possibly by other Minecraft instance?)

今度は utility_nether でも同一のエラーが...
先ほどと同じようにすることで解決しました。

rm -r sv4/utility_the_end/session.lock

質問などございましたら、コメントをしていただければ幸いです。

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?