Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-187764

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • 1.16 Pre-release 2
    • None
    • Unconfirmed
    • Networking

      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 

            Unassigned Unassigned
            itzg Geoff Bourne
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: