Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-29698

Job Manager fails with FileAlreadyExistsException if java.io.tmpdir points to a symbolic link

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Blocker
    • Resolution: Duplicate
    • 1.16.0, 1.17.0, 1.15.2
    • None
    • Runtime / RPC
    • None

    Description

      The /tmp directory on my PC is a symbolic link.

      ls -all /
      (result)
      lrwxr-xr-x    1 root  wheel      11  3 25  2019 tmp -> private/tmp
      

      In flink-conf.yaml if I add

      env.java.opts: -Djava.io.tmpdir=/tmp
      

      then job manager fails to start. The exception stack is

      2022-10-20 11:34:34,627 INFO  org.apache.flink.runtime.entrypoint.ClusterEntrypoint        [] - Shutting StandaloneSessionClusterEntrypoint down with application status FAILED. Diagnostics org.apache.flink.runtime.rpc.exceptions.RpcLoaderException: Could not load RpcSystem.
      	at org.apache.flink.runtime.rpc.RpcSystem.load(RpcSystem.java:106)
      	at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServices(ClusterEntrypoint.java:355)
      	at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:277)
      	at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$1(ClusterEntrypoint.java:227)
      	at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28)
      	at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:224)
      	at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:711)
      	at org.apache.flink.runtime.entrypoint.StandaloneSessionClusterEntrypoint.main(StandaloneSessionClusterEntrypoint.java:59)
      Caused by: java.lang.RuntimeException: Could not initialize RPC system.
      	at org.apache.flink.runtime.rpc.akka.AkkaRpcSystemLoader.loadRpcSystem(AkkaRpcSystemLoader.java:85)
      	at org.apache.flink.runtime.rpc.RpcSystem.load(RpcSystem.java:101)
      	... 7 more
      Caused by: java.nio.file.FileAlreadyExistsException: /tmp
      	at sun.nio.fs.UnixException.translateToIOException(UnixException.java:88)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:102)
      	at sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:107)
      	at sun.nio.fs.UnixFileSystemProvider.createDirectory(UnixFileSystemProvider.java:384)
      	at java.nio.file.Files.createDirectory(Files.java:674)
      	at java.nio.file.Files.createAndCheckIsDirectory(Files.java:781)
      	at java.nio.file.Files.createDirectories(Files.java:727)
      	at org.apache.flink.runtime.rpc.akka.AkkaRpcSystemLoader.loadRpcSystem(AkkaRpcSystemLoader.java:58)
      	... 8 more
      

      There are similar issues in PlannerModule class of flink-table-planner-loader module and in CodeGenLoader class of table store.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              TsReaper Caizhi Weng
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: