Caizhi Weng created FLINK-29698:
-----------------------------------
Summary: Job Manager fails with FileAlreadyExistsException if
java.io.tmpdir points to a symbolic link
Key: FLINK-29698
URL: https://issues.apache.org/jira/browse/FLINK-29698
Project: Flink
Issue Type: Bug
Components: Runtime / RPC
Affects Versions: 1.15.2, 1.16.0
Reporter: Caizhi Weng
The {{/tmp}} directory on my PC is a symbolic link.
{code}
ls -all /
(result)
lrwxr-xr-x 1 root wheel 11 3 25 2019 tmp -> private/tmp
{code}
In {{flink-conf.yaml}} if I add
{code}
env.java.opts: -Djava.io.tmpdir=/tmp
{code}
then job manager fails to start. The exception stack is
{code}
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
{code}
There are similar issues in {{PlannerModule}} class of
{{flink-table-planner-loader}} module and in {{CodeGenLoader}} class of table
store.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)