tzulitai commented on issue #27: [FLINK-16149][core] Set configurations using StreamExecutionEnvironment#getConfiguration URL: https://github.com/apache/flink-statefun/pull/27#issuecomment-589665067 Example logs: ``` Starting statefun as a console application on host 51250dbef069. 2020-02-21 13:38:34,639 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -------------------------------------------------------------------------------- 2020-02-21 13:38:34,642 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Starting StatefulFunctionsClusterEntryPoint (Version: 1.10.0, Rev:aa4eb8f, Date:07.02.2020 @ 19:18:19 CET) 2020-02-21 13:38:34,642 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - OS current user: root 2020-02-21 13:38:34,643 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Current Hadoop/Kerberos user: <no hadoop dependency found> 2020-02-21 13:38:34,644 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM: OpenJDK 64-Bit Server VM - Oracle Corporation - 1.8/25.242-b08 2020-02-21 13:38:34,644 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Maximum heap size: 1324 MiBytes 2020-02-21 13:38:34,644 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JAVA_HOME: /usr/local/openjdk-8 2020-02-21 13:38:34,645 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - No Hadoop Dependency available 2020-02-21 13:38:34,645 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - JVM Options: 2020-02-21 13:38:34,645 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlog4j.configuration=file:/opt/flink/conf/log4j-console.properties 2020-02-21 13:38:34,645 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Dlogback.configurationFile=file:/opt/flink/conf/logback-console.xml 2020-02-21 13:38:34,646 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Program Arguments: 2020-02-21 13:38:34,646 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - --configDir 2020-02-21 13:38:34,646 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - /opt/flink/conf 2020-02-21 13:38:34,646 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -Djobmanager.rpc.address=master 2020-02-21 13:38:34,647 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Classpath: /opt/flink/lib/log4j-1.2.17.jar:/opt/flink/lib/slf4j-log4j12-1.7.15.jar:/opt/flink/lib/statefun-flink-core.jar:/opt/flink/lib/statefun-flink-distribution.jar:/opt/flink/lib/flink-dist_2.12-1.10.0.jar::: 2020-02-21 13:38:34,647 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - -------------------------------------------------------------------------------- 2020-02-21 13:38:34,650 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Registered UNIX signal handlers for [TERM, HUP, INT] 2020-02-21 13:38:35,008 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: classloader.parent-first-patterns.additional, org.apache.flink.statefun;org.apache.kafka;com.google.protobuf 2020-02-21 13:38:35,008 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: state.backend, rocksdb 2020-02-21 13:38:35,008 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: state.backend.rocksdb.timer-service.factory, ROCKSDB 2020-02-21 13:38:35,009 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: state.checkpoints.dir, file:///checkpoint-dir 2020-02-21 13:38:35,009 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: state.backend.incremental, true 2020-02-21 13:38:35,010 INFO org.apache.flink.configuration.GlobalConfiguration - Loading configuration property: taskmanager.memory.process.size, 4g 2020-02-21 13:38:35,118 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Starting StatefulFunctionsClusterEntryPoint. 2020-02-21 13:38:35,119 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Install default filesystem. 2020-02-21 13:38:35,271 INFO org.apache.flink.core.fs.FileSystem - Hadoop is not in the classpath/dependencies. The extended set of supported File Systems via Hadoop is not available. 2020-02-21 13:38:35,315 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Install security context. 2020-02-21 13:38:35,341 INFO org.apache.flink.runtime.security.modules.HadoopModuleFactory - Cannot create Hadoop Security Module because Hadoop cannot be found in the Classpath. 2020-02-21 13:38:35,372 INFO org.apache.flink.runtime.security.modules.JaasModule - Jaas file will be created as /tmp/jaas-3284484390599399241.conf. 2020-02-21 13:38:35,383 INFO org.apache.flink.runtime.security.SecurityUtils - Cannot install HadoopSecurityContext because Hadoop cannot be found in the Classpath. 2020-02-21 13:38:35,386 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Initializing cluster services. 2020-02-21 13:38:35,450 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils - Trying to start actor system at master:6123 2020-02-21 13:38:37,254 INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started 2020-02-21 13:38:37,336 INFO akka.remote.Remoting - Starting remoting 2020-02-21 13:38:37,827 INFO akka.remote.Remoting - Remoting started; listening on addresses :[akka.tcp://flink@master:6123] 2020-02-21 13:38:38,038 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils - Actor system started at akka.tcp://flink@master:6123 2020-02-21 13:38:38,084 INFO org.apache.flink.configuration.Configuration - Config uses fallback configuration key 'jobmanager.rpc.address' instead of key 'rest.address' 2020-02-21 13:38:38,106 INFO org.apache.flink.runtime.blob.BlobServer - Created BLOB server storage directory /tmp/blobStore-37a545e1-7157-4a42-82ea-b7aad4a5dc2d 2020-02-21 13:38:38,114 INFO org.apache.flink.runtime.blob.BlobServer - Started BLOB server at 0.0.0.0:37805 - max concurrent requests: 50 - max backlog: 1000 2020-02-21 13:38:38,163 INFO org.apache.flink.runtime.metrics.MetricRegistryImpl - No metrics reporter configured, no metrics will be exposed/reported. 2020-02-21 13:38:38,172 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils - Trying to start actor system at master:0 2020-02-21 13:38:38,235 INFO akka.event.slf4j.Slf4jLogger - Slf4jLogger started 2020-02-21 13:38:38,242 INFO akka.remote.Remoting - Starting remoting 2020-02-21 13:38:38,264 INFO akka.remote.Remoting - Remoting started; listening on addresses :[akka.tcp://flink-metrics@master:33897] 2020-02-21 13:38:38,272 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcServiceUtils - Actor system started at akka.tcp://flink-metrics@master:33897 2020-02-21 13:38:38,288 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Starting RPC endpoint for org.apache.flink.runtime.metrics.dump.MetricQueryService at akka://flink-metrics/user/MetricQueryService . 2020-02-21 13:38:38,519 INFO org.apache.flink.configuration.Configuration - Config uses fallback configuration key 'jobmanager.rpc.address' instead of key 'rest.address' 2020-02-21 13:38:38,522 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Upload directory /tmp/flink-web-9988cd25-1fa3-4e56-a1ce-c73beafa905a/flink-web-upload does not exist. 2020-02-21 13:38:38,523 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Created directory /tmp/flink-web-9988cd25-1fa3-4e56-a1ce-c73beafa905a/flink-web-upload for file uploads. 2020-02-21 13:38:38,620 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Starting rest endpoint. 2020-02-21 13:38:39,184 WARN org.apache.flink.runtime.webmonitor.WebMonitorUtils - Log file environment variable 'log.file' is not set. 2020-02-21 13:38:39,187 WARN org.apache.flink.runtime.webmonitor.WebMonitorUtils - JobManager log files are unavailable in the web dashboard. Log file location not found in environment variable 'log.file' or configuration key 'Key: 'web.log.path' , default: null (fallback keys: [{key=jobmanager.web.log.path, isDeprecated=true}])'. 2020-02-21 13:38:39,719 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Rest endpoint listening at master:8081 2020-02-21 13:38:39,723 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - http://master:8081 was granted leadership with leaderSessionID=00000000-0000-0000-0000-000000000000 2020-02-21 13:38:39,723 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Web frontend listening at http://master:8081. 2020-02-21 13:38:39,777 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Starting RPC endpoint for org.apache.flink.runtime.resourcemanager.StandaloneResourceManager at akka://flink/user/resourcemanager . 2020-02-21 13:38:40,012 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Shutting down rest endpoint. 2020-02-21 13:38:40,216 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Removing cache directory /tmp/flink-web-9988cd25-1fa3-4e56-a1ce-c73beafa905a/flink-web-ui 2020-02-21 13:38:40,229 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - http://master:8081 lost leadership 2020-02-21 13:38:40,229 INFO org.apache.flink.runtime.jobmaster.MiniDispatcherRestEndpoint - Shut down complete. 2020-02-21 13:38:40,237 INFO org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Shutting StatefulFunctionsClusterEntryPoint down with application status FAILED. Diagnostics org.apache.flink.util.FlinkException: Could not create the DispatcherResourceManagerComponent. at org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:261) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:215) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:169) at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:168) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:518) at org.apache.flink.statefun.flink.launcher.StatefulFunctionsClusterEntryPoint.main(StatefulFunctionsClusterEntryPoint.java:94) Caused by: org.apache.flink.util.FlinkRuntimeException: Could not retrieve the JobGraph. at org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:57) at org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:51) at org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:196) ... 6 more Caused by: org.apache.flink.util.FlinkException: Could not create the JobGraph from the provided user code jar. at org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:96) at org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:55) ... 8 more Caused by: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Failed to acquire the Flink configuration from the current environment at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:335) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:205) at org.apache.flink.client.program.OptimizerPlanEnvironment.getPipeline(OptimizerPlanEnvironment.java:79) at org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:101) at org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:56) at org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:90) ... 9 more Caused by: java.lang.RuntimeException: Failed to acquire the Flink configuration from the current environment at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.getConfiguration(StatefulFunctionsConfig.java:98) at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.fromEnvironment(StatefulFunctionsConfig.java:87) at org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:321) ... 14 more Caused by: java.lang.NoSuchMethodException: org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getConfiguration() at java.lang.Class.getMethod(Class.java:1786) at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.getConfiguration(StatefulFunctionsConfig.java:94) ... 21 more . 2020-02-21 13:38:40,240 INFO org.apache.flink.runtime.blob.BlobServer - Stopped BLOB server at 0.0.0.0:37805 2020-02-21 13:38:40,242 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopping Akka RPC service. 2020-02-21 13:38:40,247 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopping Akka RPC service. 2020-02-21 13:38:40,286 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 2020-02-21 13:38:40,293 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. 2020-02-21 13:38:40,336 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Shutting down remote daemon. 2020-02-21 13:38:40,345 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remote daemon shut down; proceeding with flushing remote transports. 2020-02-21 13:38:40,354 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down. 2020-02-21 13:38:40,358 INFO akka.remote.RemoteActorRefProvider$RemotingTerminator - Remoting shut down. 2020-02-21 13:38:40,412 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopped Akka RPC service. 2020-02-21 13:38:40,417 INFO org.apache.flink.runtime.rpc.akka.AkkaRpcService - Stopped Akka RPC service. 2020-02-21 13:38:40,423 ERROR org.apache.flink.runtime.entrypoint.ClusterEntrypoint - Could not start cluster entrypoint StatefulFunctionsClusterEntryPoint. org.apache.flink.runtime.entrypoint.ClusterEntrypointException: Failed to initialize the cluster entrypoint StatefulFunctionsClusterEntryPoint. at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:187) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runClusterEntrypoint(ClusterEntrypoint.java:518) at org.apache.flink.statefun.flink.launcher.StatefulFunctionsClusterEntryPoint.main(StatefulFunctionsClusterEntryPoint.java:94) Caused by: org.apache.flink.util.FlinkException: Could not create the DispatcherResourceManagerComponent. at org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:261) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:215) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:169) at org.apache.flink.runtime.security.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:30) at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:168) ... 2 more Caused by: org.apache.flink.util.FlinkRuntimeException: Could not retrieve the JobGraph. at org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:57) at org.apache.flink.runtime.dispatcher.runner.DefaultDispatcherRunnerFactory.createDispatcherRunner(DefaultDispatcherRunnerFactory.java:51) at org.apache.flink.runtime.entrypoint.component.DefaultDispatcherResourceManagerComponentFactory.create(DefaultDispatcherResourceManagerComponentFactory.java:196) ... 6 more Caused by: org.apache.flink.util.FlinkException: Could not create the JobGraph from the provided user code jar. at org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:96) at org.apache.flink.runtime.dispatcher.runner.JobDispatcherLeaderProcessFactoryFactory.createFactory(JobDispatcherLeaderProcessFactoryFactory.java:55) ... 8 more Caused by: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Failed to acquire the Flink configuration from the current environment at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:335) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:205) at org.apache.flink.client.program.OptimizerPlanEnvironment.getPipeline(OptimizerPlanEnvironment.java:79) at org.apache.flink.client.program.PackagedProgramUtils.getPipelineFromProgram(PackagedProgramUtils.java:101) at org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:56) at org.apache.flink.statefun.flink.launcher.StatefulFunctionsJobGraphRetriever.retrieveJobGraph(StatefulFunctionsJobGraphRetriever.java:90) ... 9 more Caused by: java.lang.RuntimeException: Failed to acquire the Flink configuration from the current environment at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.getConfiguration(StatefulFunctionsConfig.java:98) at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.fromEnvironment(StatefulFunctionsConfig.java:87) at org.apache.flink.statefun.flink.core.StatefulFunctionsJob.main(StatefulFunctionsJob.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:321) ... 14 more Caused by: java.lang.NoSuchMethodException: org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.getConfiguration() at java.lang.Class.getMethod(Class.java:1786) at org.apache.flink.statefun.flink.core.StatefulFunctionsConfig.getConfiguration(StatefulFunctionsConfig.java:94) ... 21 more ```
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
