FLINK-12143 we introduced the plugin mechanism. As part of this feature, we now write the FLINK_PLUGINS_DIR environment variable to the Flink Configuration we use for the cluster components. This is problematic, because we also use this Configuration to start new processes (Yarn and Mesos TaskExecutors). If the Configuration contains a configured FLINK_PLUGINS_DIR which differs from the one used by the newly created process, then this leads to problems.
In order to solve this problem, I suggest to not write env variables which are intended for local usage within the started process into the Configuration. Instead we should directly read the environment variable at the required site similar to what we do with the env variable FLINK_LIB_DIR.