mojira.dev
MC-187764

IOException: No such file or directory during sun.nio.ch.FileKey.create

When running the server jar in a Windows Docker Desktop container where the working directory is mounted from a Windows host directory, the following IOException occurs near startup:

[01:30:25] [main/ERROR]: Unable to bootstrap registry 'minecraft:chunk_generator_type'                                                                                                                      [01:30:25] [main/ERROR]: Registry 'minecraft:chunk_generator_type' was empty after loading                                                                                                                  [01:30:26] [main/INFO]: Environment: authHost='https://authserver.mojang.com', accountsHost='https://api.mojang.com', sessionHost='https://sessionserver.mojang.com', name='PROD'                           Exception in thread "main" [01:30:27] [main/INFO]: [STDERR]: java.lang.Error: java.io.IOException: No such file or directory                                                                                [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileKey.create(FileKey.java:46)                                                                                                                       [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.SharedFileLockTable.(FileLockTable.java:120)                                                                                                    [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileLockTable.newSharedFileLockTable(FileLockTable.java:47)                                                                                           [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileChannelImpl.fileLockTable(FileChannelImpl.java:1039)                                                                                              [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:1106)                                                                                                    [01:30:27] [main/INFO]: [STDERR]:       at java.nio.channels.FileChannel.tryLock(FileChannel.java:1155)                                                                                                     [01:30:27] [main/INFO]: [STDERR]:       at acs.a(SourceFile:24)                                                                                                                                             [01:30:27] [main/INFO]: [STDERR]:       at cye$a.(SourceFile:196)                                                                                                                                     [01:30:27] [main/INFO]: [STDERR]:       at cye.c(SourceFile:185)                                                                                                                                            [01:30:27] [main/INFO]: [STDERR]:       at net.minecraft.server.MinecraftServer.main(SourceFile:940)                                                                                                        [01:30:27] [main/INFO]: [STDERR]: Caused by: java.io.IOException: No such file or directory                                                                                                                 [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileKey.init(Native Method)                                                                                                                           [01:30:27] [main/INFO]: [STDERR]:       at sun.nio.ch.FileKey.create(FileKey.java:44)                                                                                                                       [01:30:27] [main/INFO]: [STDERR]:       ... 9 more

The mount point (retrieved from /proc/mounts)Β of the working directory, /data , shows the options:

C:\134 /data 9p rw,dirsync,noatime,aname=drvfs;path=C:\;uid=0;gid=0;metadata;symlinkroot=/mnt/host,mmap,access=client,msize=65536,trans=fd,rfd=8,wfd=8 0 0

The issue first appears inΒ 20w14a and still fails with 1.16-pre2. Snapshots before that, such as 20w13b work fine.

The issue can be recreated by running:

docker run --rm -e EULA=TRUE -e VERSION=1.16-pre2 -v ${PWD}\data:/data itzg/minecraft-server

Linked issues

Comments 2

FYI, the first two errors in the output are not relevant for this issue and just provide context relative to the start of the server.

Thank you for your report!
We're tracking this issue in MC-177336, so this ticket is being resolved and linked as a duplicate.

If you would like to add a vote and any extra information to the main ticket it would be appreciated.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
πŸ““ Issue Guidelines – πŸ’¬ Community Support – πŸ“§ Customer Support – ✍️ Feedback and Suggestions – πŸ“– Game Wiki
-- I am a bot. This action was performed automagically! Please report any issues in Discord or Reddit

Geoff Bourne

(Unassigned)

Unconfirmed

Networking

1.16 Pre-release 2

Retrieved