RE: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Papadopoulos, Konstantinos
Yes, we are submitting more than one job and we choose which one is going to be 
executed depending on the first program argument (i.e., ‘job’ argument).

From: Chesnay Schepler 
Sent: Παρασκευή, 15 Μαρτίου 2019 12:53 μμ
To: Papadopoulos, Konstantinos ; 
user@flink.apache.org
Subject: Re: ProgramInvocationException when trying to submit a job by running 
a jar using Monitoring REST API

In your jar, are you submitting multiple jobs in parallel?

On 15.03.2019 10:05, Papadopoulos, Konstantinos wrote:
We had some progress since the job seems to be submitted and its execution has 
been started, but, now, I am getting a ProgramAbortException as follows:

05:01:01.788 [ERROR] SpringApplication – Application run failed
org.apache.flink.client.program.OptimizerPlanEnvironment$ProgramAbortException: 
null
at 
org.apache.flink.client.program.OptimizerPlanEnvironment.execute(OptimizerPlanEnvironment.java:54)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
org.apache.flink.api.java.ExecutionEnvironment.execute(ExecutionEnvironment.java:817)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at org.apache.flink.api.java.DataSet.collect(DataSet.java:413) 
~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
com.iri.aa.etl.lmx.entity.service.AbstractLmxService.getCampaigns(AbstractLmxService.java:105)
 ~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.lmx.entity.service.MediaSpentServiceImpl.transform(MediaSpentServiceImpl.java:25)
 ~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.lmx.MediaSpentJob.execute(MediaSpentJob.java:58) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.lmx.AbstractLmxJob.abstractExecute(AbstractLmxJob.java:27) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.lmx.MediaSpentJob.execute(MediaSpentJob.java:38) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.lmx.MediaSpentJob.executeDry(MediaSpentJob.java:44) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
com.iri.aa.etl.job.JobExecutor.lambda$executeDryRunners$6(JobExecutor.java:44) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at java.util.ArrayList.forEach(Unknown Source) ~[?:1.8.0_201]
at 
com.iri.aa.etl.job.JobExecutor.executeDryRunners(JobExecutor.java:44) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at com.iri.aa.etl.job.JobExecutor.run(JobExecutor.java:35) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)
 ~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:794)
 ~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:324) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at com.iri.aa.etl.EtlApplication.main(EtlApplication.java:21) 
~[d7378efa-919f-4bd3-a320-d74a5a76f80e_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_201]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
~[?:1.8.0_201]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source) ~[?:1.8.0_201]
at java.lang.reflect.Method.invoke(Unknown Source) 
~[?:1.8.0_201]
at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:83)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:78)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1]
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:120)
 ~[flink-dist_2.12-1.7.1.jar:1.7.1

Re: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Chesnay Schepler
: ProgramInvocationException when trying to submit a job 
by running a jar using Monitoring REST API


Please separate your program arguments by a space instead of a comma 
and try again.


On 15.03.2019 09:34, Papadopoulos, Konstantinos wrote:

Hi Chesnay,

Sorry for the misunderstanding. I get the following exception:

2019-03-15 04:31:26,826 ERROR
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler -
Exception occurred in REST handler.

org.apache.flink.runtime.rest.handler.RestHandlerException:
org.apache.flink.client.program.ProgramInvocationException: The
main method caused an error.

at

org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$handleRequest$4(JarRunHandler.java:114)

at
java.util.concurrent.CompletableFuture.uniExceptionally(Unknown
Source)

at
java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(Unknown
Source)

at
java.util.concurrent.CompletableFuture.postComplete(Unknown Source)

at
java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)

at
java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at
java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.util.concurrent.CompletionException:
org.apache.flink.client.program.ProgramInvocationException: The
main method caused an error.

at

org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:119)

at

org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$getJobGraphAsync$7(JarRunHandler.java:151)

... 4 more

Caused by:
org.apache.flink.client.program.ProgramInvocationException: The
main method caused an error.

at

org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:546)

at

org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)

at

org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:83)

at

org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:78)

at

org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:120)

at

org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:117)

... 5 more

Caused by: java.lang.IllegalStateException: Failed to execute
ApplicationRunner

at

org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:807)

at

org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:794)

at
org.springframework.boot.SpringApplication.run(SpringApplication.java:324)

at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)

at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)

at
com.iri.aa.etl.EtlApplication.main(EtlApplication.java:21)

at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at

org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)

... 10 more

Caused by: java.lang.IllegalArgumentException: Argument
'initialScopeId' is missing.

at

com.iri.aa.etl.job.JobArgumentsUtility.getArgument(JobArgumentsUtility.java:58)

at

com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getLmxArguments(JobArgumentsServiceImpl.java:86)

at

com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getJobArguments(JobArgumentsServiceImpl.java:39)

at
com.iri.aa.etl.job.JobExecutor.run(JobExecutor.java:30)

at

org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)

... 20 more

*From:*Chesnay Schepler 
<mailto:ches...@apache.org>
*Sent:* Παρασκευή, 15 Μαρτίου 2019 10:20 πμ
*To:* Papadopoulos, Konstantinos

<mailto:konstantinos.papadopou...@iriworldwide.com>;
user@flink.apache.org <mailto:user@f

RE: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Papadopoulos, Konstantinos
]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source) [?:1.8.0_201]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source) [?:1.8.0_201]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_201]

From: Chesnay Schepler 
Sent: Παρασκευή, 15 Μαρτίου 2019 10:56 πμ
To: Papadopoulos, Konstantinos ; 
user@flink.apache.org
Subject: Re: ProgramInvocationException when trying to submit a job by running 
a jar using Monitoring REST API

Please separate your program arguments by a space instead of a comma and try 
again.

On 15.03.2019 09:34, Papadopoulos, Konstantinos wrote:
Hi Chesnay,

Sorry for the misunderstanding. I get the following exception:

2019-03-15 04:31:26,826 ERROR 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler- Exception 
occurred in REST handler.
org.apache.flink.runtime.rest.handler.RestHandlerException: 
org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$handleRequest$4(JarRunHandler.java:114)
at 
java.util.concurrent.CompletableFuture.uniExceptionally(Unknown Source)
at 
java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown 
Source)
at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.CompletionException: 
org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:119)
at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$getJobGraphAsync$7(JarRunHandler.java:151)
... 4 more
Caused by: org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error.
at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:546)
at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
at 
org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:83)
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:78)
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:120)
at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:117)
... 5 more
Caused by: java.lang.IllegalStateException: Failed to execute ApplicationRunner
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:807)
at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:794)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:324)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.iri.aa.etl.EtlApplication.main(EtlApplication.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)
... 10 more
Caused by: java.lang.IllegalArgumentException: Argument 'initialScopeId' is 
missing.
at 
com.iri.aa.etl.job.JobArgumentsUtility.getArgument(JobArgumentsUtility.java:58)
at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getLmxArguments(JobArgumentsServiceImpl.java:86)
at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getJobArguments(JobArgumentsServiceImpl.java:39)
at com.iri.aa.etl.job.JobExecutor.run(JobExecutor.java:30)
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)
... 20 more

From: Chesnay Schepler <mailto:ches...@apache.org>
Sent: Παρασκευή, 15 Μαρτίου 2019 10:20 πμ
To: Papadopoulos, Konstantinos 
<mailto:konstantinos.papadopou...@iriworldwide.com>;
 user@flink.apache.org<mailto:user@flink.apache.org>
Subject: Re: ProgramInvoca

Re: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Chesnay Schepler
Please separate your program arguments by a space instead of a comma and 
try again.


On 15.03.2019 09:34, Papadopoulos, Konstantinos wrote:


Hi Chesnay,

Sorry for the misunderstanding. I get the following exception:

2019-03-15 04:31:26,826 ERROR 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler - Exception 
occurred in REST handler.


org.apache.flink.runtime.rest.handler.RestHandlerException: 
org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error.


at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$handleRequest$4(JarRunHandler.java:114)


at java.util.concurrent.CompletableFuture.uniExceptionally(Unknown Source)

at 
java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(Unknown 
Source)


at java.util.concurrent.CompletableFuture.postComplete(Unknown Source)

at java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: java.util.concurrent.CompletionException: 
org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error.


at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:119)


at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$getJobGraphAsync$7(JarRunHandler.java:151)


... 4 more

Caused by: org.apache.flink.client.program.ProgramInvocationException: 
The main method caused an error.


at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:546)


at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)


at 
org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:83)


at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:78)


at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:120)


at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:117)


... 5 more

Caused by: java.lang.IllegalStateException: Failed to execute 
ApplicationRunner


at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:807)


at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:794)


at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:324)


at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)


at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)


at com.iri.aa.etl.EtlApplication.main(EtlApplication.java:21)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)


... 10 more

Caused by: java.lang.IllegalArgumentException: Argument 
'initialScopeId' is missing.


at 
com.iri.aa.etl.job.JobArgumentsUtility.getArgument(JobArgumentsUtility.java:58)


at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getLmxArguments(JobArgumentsServiceImpl.java:86)


at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getJobArguments(JobArgumentsServiceImpl.java:39)


at com.iri.aa.etl.job.JobExecutor.run(JobExecutor.java:30)

at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)


... 20 more

*From:*Chesnay Schepler 
*Sent:* Παρασκευή, 15 Μαρτίου 2019 10:20 πμ
*To:* Papadopoulos, Konstantinos 
; user@flink.apache.org
*Subject:* Re: ProgramInvocationException when trying to submit a job 
by running a jar using Monitoring REST API


Please provide the logged exception, I cannot help you otherwise.

On 14.03.2019 14:20, Papadopoulos, Konstantinos wrote:

It seems that Flink cluster does not retrieve program arguments
correctly. For reference, I sent the following request:

Method Type: POST

URL:

http://dbtpa05p.ch3.dev.i.com:9171/v1/jars/321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar/run

<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdbtpa05p.ch3.dev.i.com%3A9171%2Fv1%2Fjars%2F321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar%2Frun=02%7C01%7C%7Cc66d382ad8cb47a0547608d6a91f0367%7C43728c2044474b27ac2e4bdabb3c0121%7C0%7C0%7C636882348004604648=eQF8PpHADRppeT7y9pkPdfbG0sAaKkgpzTa%2BTaBb9mQ%3D=0>

Body: {"programArgs" :

"--job=mediaSpent,--initialScopeId=b494c35d-4c37-4338-8d23-0fc947bef690,--integratedScopeId=91769bd8-df4d-436c-b8d0-2e23ce862859,--projectId=333,--log.path=../log"}

Cont

RE: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Papadopoulos, Konstantinos
Hi Chesnay,

Sorry for the misunderstanding. I get the following exception:

2019-03-15 04:31:26,826 ERROR 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler- Exception 
occurred in REST handler.
org.apache.flink.runtime.rest.handler.RestHandlerException: 
org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$handleRequest$4(JarRunHandler.java:114)
at 
java.util.concurrent.CompletableFuture.uniExceptionally(Unknown Source)
at 
java.util.concurrent.CompletableFuture$UniExceptionally.tryFire(Unknown Source)
at java.util.concurrent.CompletableFuture.postComplete(Unknown 
Source)
at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown 
Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown 
Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.util.concurrent.CompletionException: 
org.apache.flink.client.program.ProgramInvocationException: The main method 
caused an error.
at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:119)
at 
org.apache.flink.runtime.webmonitor.handlers.JarRunHandler.lambda$getJobGraphAsync$7(JarRunHandler.java:151)
... 4 more
Caused by: org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error.
at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:546)
at 
org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:421)
at 
org.apache.flink.client.program.OptimizerPlanEnvironment.getOptimizedPlan(OptimizerPlanEnvironment.java:83)
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:78)
at 
org.apache.flink.client.program.PackagedProgramUtils.createJobGraph(PackagedProgramUtils.java:120)
at 
org.apache.flink.runtime.webmonitor.handlers.utils.JarHandlerUtils$JarHandlerContext.toJobGraph(JarHandlerUtils.java:117)
... 5 more
Caused by: java.lang.IllegalStateException: Failed to execute ApplicationRunner
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:807)
at 
org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:794)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:324)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
at com.iri.aa.etl.EtlApplication.main(EtlApplication.java:21)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown 
Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at 
org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:529)
... 10 more
Caused by: java.lang.IllegalArgumentException: Argument 'initialScopeId' is 
missing.
at 
com.iri.aa.etl.job.JobArgumentsUtility.getArgument(JobArgumentsUtility.java:58)
at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getLmxArguments(JobArgumentsServiceImpl.java:86)
at 
com.iri.aa.etl.lmx.job.JobArgumentsServiceImpl.getJobArguments(JobArgumentsServiceImpl.java:39)
at com.iri.aa.etl.job.JobExecutor.run(JobExecutor.java:30)
at 
org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:804)
... 20 more

From: Chesnay Schepler 
Sent: Παρασκευή, 15 Μαρτίου 2019 10:20 πμ
To: Papadopoulos, Konstantinos ; 
user@flink.apache.org
Subject: Re: ProgramInvocationException when trying to submit a job by running 
a jar using Monitoring REST API

Please provide the logged exception, I cannot help you otherwise.

On 14.03.2019 14:20, Papadopoulos, Konstantinos wrote:
It seems that Flink cluster does not retrieve program arguments correctly. For 
reference, I sent the following request:
Method Type: POST
URL: 
http://dbtpa05p.ch3.dev.i.com:9171/v1/jars/321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar/run<https://nam02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdbtpa05p.ch3.dev.i.com%3A9171%2Fv1%2Fjars%2F321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar%2Frun=02%7C01%7C%7Cc66d382ad8cb47a0547608d6a91f0

Re: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-15 Thread Chesnay Schepler

Please provide the logged exception, I cannot help you otherwise.

On 14.03.2019 14:20, Papadopoulos, Konstantinos wrote:


It seems that Flink cluster does not retrieve program arguments 
correctly. For reference, I sent the following request:


Method Type: POST

URL: 
http://dbtpa05p.ch3.dev.i.com:9171/v1/jars/321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar/run


Body: {"programArgs" : 
"--job=mediaSpent,--initialScopeId=b494c35d-4c37-4338-8d23-0fc947bef690,--integratedScopeId=91769bd8-df4d-436c-b8d0-2e23ce862859,--projectId=333,--log.path=../log"}


Content-Type: application/json

*From:*Chesnay Schepler 
*Sent:* Πέμπτη, 14 Μαρτίου 2019 2:24 μμ
*To:* Papadopoulos, Konstantinos 
; user@flink.apache.org
*Subject:* Re: ProgramInvocationException when trying to submit a job 
by running a jar using Monitoring REST API


Please enable debug logging, re-submit the job, check the JobManager 
logs and report back the logged exception.


On 14.03.2019 13:16, Papadopoulos, Konstantinos wrote:

Hi all,

As part of our projects, I experiment with Flink Monitoring REST
API and, especially, its capabilities of uploading and running jar
files.

When I am trying to submit one of our jobs by running a jar
previously uploaded via '/jars/upload', I am getting an 500
Internal Server Error response with the following body:

{ "errors": [
"org.apache.flink.client.program.ProgramInvocationException: The
main method caused an error." ] }

On the other hand, when I am trying the same with the ‘Word Count’
batch example, execution succeeds.

It must be pointed out that I tried to execute the respective POST
request both via ‘curl’ and Postman, but both failed with the same
error.

Do anyone have idea why this may happen?

Thanks in advance,

Konstantinos





RE: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-14 Thread Papadopoulos, Konstantinos
It seems that Flink cluster does not retrieve program arguments correctly. For 
reference, I sent the following request:
Method Type: POST
URL: 
http://dbtpa05p.ch3.dev.i.com:9171/v1/jars/321febd8-a5e8-4255-858b-c221b49aef18_aa-lmx-etl-1.0.0.1-SNAPSHOT.jar/run
Body: {"programArgs" : 
"--job=mediaSpent,--initialScopeId=b494c35d-4c37-4338-8d23-0fc947bef690,--integratedScopeId=91769bd8-df4d-436c-b8d0-2e23ce862859,--projectId=333,--log.path=../log"}
Content-Type: application/json


From: Chesnay Schepler 
Sent: Πέμπτη, 14 Μαρτίου 2019 2:24 μμ
To: Papadopoulos, Konstantinos ; 
user@flink.apache.org
Subject: Re: ProgramInvocationException when trying to submit a job by running 
a jar using Monitoring REST API

Please enable debug logging, re-submit the job, check the JobManager logs and 
report back the logged exception.

On 14.03.2019 13:16, Papadopoulos, Konstantinos wrote:
Hi all,

As part of our projects, I experiment with Flink Monitoring REST API and, 
especially, its capabilities of uploading and running jar files.
When I am trying to submit one of our jobs by running a jar previously uploaded 
via '/jars/upload', I am getting an 500 Internal Server Error response with the 
following body:
{ "errors": [ "org.apache.flink.client.program.ProgramInvocationException: The 
main method caused an error." ] }
On the other hand, when I am trying the same with the 'Word Count' batch 
example, execution succeeds.
It must be pointed out that I tried to execute the respective POST request both 
via 'curl' and Postman, but both failed with the same error.

Do anyone have idea why this may happen?

Thanks in advance,
Konstantinos




Re: ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-14 Thread Chesnay Schepler
Please enable debug logging, re-submit the job, check the JobManager 
logs and report back the logged exception.


On 14.03.2019 13:16, Papadopoulos, Konstantinos wrote:


Hi all,

As part of our projects, I experiment with Flink Monitoring REST API 
and, especially, its capabilities of uploading and running jar files.


When I am trying to submit one of our jobs by running a jar previously 
uploaded via '/jars/upload', I am getting an 500 Internal Server Error 
response with the following body:


{ "errors": [ 
"org.apache.flink.client.program.ProgramInvocationException: The main 
method caused an error." ] }


On the other hand, when I am trying the same with the ‘Word Count’ 
batch example, execution succeeds.


It must be pointed out that I tried to execute the respective POST 
request both via ‘curl’ and Postman, but both failed with the same error.


Do anyone have idea why this may happen?

Thanks in advance,

Konstantinos





ProgramInvocationException when trying to submit a job by running a jar using Monitoring REST API

2019-03-14 Thread Papadopoulos, Konstantinos
Hi all,

As part of our projects, I experiment with Flink Monitoring REST API and, 
especially, its capabilities of uploading and running jar files.
When I am trying to submit one of our jobs by running a jar previously uploaded 
via '/jars/upload', I am getting an 500 Internal Server Error response with the 
following body:
{ "errors": [ "org.apache.flink.client.program.ProgramInvocationException: The 
main method caused an error." ] }
On the other hand, when I am trying the same with the 'Word Count' batch 
example, execution succeeds.
It must be pointed out that I tried to execute the respective POST request both 
via 'curl' and Postman, but both failed with the same error.

Do anyone have idea why this may happen?

Thanks in advance,
Konstantinos


Re: [EXTERNAL] Re: Flink on YARN || Monitoring REST API Not Working || Please help

2018-01-31 Thread Raja . Aravapalli

Thanks a lot for the response Jins.

Still I couldn’t figure out what is wrong. I am able access flink job manager 
ui from running application on YARN. But, I want to use Monitoring thru REST 
Api, which I could not figure out ☹

Some more details FYR:

Below is what I receive when I submit jobs to running flink on YARN cluster:

Cluster configuration: Standalone cluster with JobManager at 
x..com/11.11.11.111:34651
Using address x..com:34651 to connect to JobManager.
JobManager web interface address http://x.xxx.com:8081


Any thoughts, what I am missing would be highly helpful.

Thanks.

Regards,
Raja.

From: Jins George <jins.geo...@aeris.net>
Date: Wednesday, January 31, 2018 at 8:51 PM
To: Raja Aravapalli <raja.aravapa...@target.com>
Cc: "user@flink.apache.org" <user@flink.apache.org>
Subject: [EXTERNAL] Re: Flink on YARN || Monitoring REST API Not Working || 
Please help

8081 is the default port for standalone cluster.

For Yarn flink cluster,
Go to the Running applications and from the list of applications.
 You can get the Flink UI by clicking Application master link for the yarn 
session.

Regards,
Jins

On Feb 1, 2018, at 8:06 AM, Raja.Aravapalli 
<raja.aravapa...@target.com<mailto:raja.aravapa...@target.com>> wrote:
Hi,

I have deployed Flink cluster on Hadoop YARN and I am able to trigger jobs and 
run it.

But, I am not able to work the running flink cluster’s Montoring REST API!

As listed here @ 
https://ci.apache.org/projects/flink/flink-docs-release-1.3/monitoring/rest_api.html
 I am trying to connect using url http://hostname:8081/jobs where hostname is 
jobmanager host.

Could n’t find, how to fix this.

Can someone please share your thoughts.


Thanks a lot.


Regards,
Raja.







Re: Flink on YARN || Monitoring REST API Not Working || Please help

2018-01-31 Thread Jins George
8081 is the default port for standalone cluster.

For Yarn flink cluster,
Go to the Running applications and from the list of applications.
 You can get the Flink UI by clicking Application master link for the yarn 
session.

Regards,
Jins

On Feb 1, 2018, at 8:06 AM, Raja.Aravapalli 
> wrote:

Hi,

I have deployed Flink cluster on Hadoop YARN and I am able to trigger jobs and 
run it.

But, I am not able to work the running flink cluster’s Montoring REST API!

As listed here @ 
https://ci.apache.org/projects/flink/flink-docs-release-1.3/monitoring/rest_api.html
 I am trying to connect using url http://hostname:8081/jobs where hostname is 
jobmanager host.

Could n’t find, how to fix this.

Can someone please share your thoughts.


Thanks a lot.


Regards,
Raja.







Flink on YARN || Monitoring REST API Not Working || Please help

2018-01-31 Thread Raja . Aravapalli
Hi,

I have deployed Flink cluster on Hadoop YARN and I am able to trigger jobs and 
run it.

But, I am not able to work the running flink cluster’s Montoring REST API!

As listed here @ 
https://ci.apache.org/projects/flink/flink-docs-release-1.3/monitoring/rest_api.html
 I am trying to connect using url http://hostname:8081/jobs where hostname is 
jobmanager host.

Could n’t find, how to fix this.

Can someone please share your thoughts.


Thanks a lot.


Regards,
Raja.







Re: Securing Flink Monitoring REST API

2017-09-18 Thread Eron Wright
Unfortunately Flink does not yet support SSL mutual authentication nor any
form of client authentication.   There is an ongoing discussion about it:
http://apache-flink-mailing-list-archive.1008284.n3.nabble.com/DISCUSS-Service-Authorization-redux-td18890.html

A workaround that I've seen is to use nginx as a frontend proxy.  Be sure
to lock down the underlying endpoints somehow.  If you choose to go this
route, Patrick Lucas gave a related talk recently (Flink in Containerland):
https://youtu.be/w721NI-mtAA

-Eron


On Mon, Sep 18, 2017 at 1:30 AM, Fabian Hueske  wrote:

> Hi,
>
> sorry for the late response.
> Flink uses Netty for network communication which supports SSL client
> authentication.
> I haven't tried it myself, but would think that this should work in Flink
> as well if you configure the certificates correctly.
>
> We should update the docs to cover this aspect.
> Feedback on this would be very welcome
>
> Thanks, Fabian
>
> 2017-09-06 14:23 GMT+02:00 avivros :
>
>> Does  jobmanager.web.ssl.enabled supports Client SSL Authentication?
>>
>>
>>
>>
>> --
>> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.
>> nabble.com/
>>
>
>


Re: Securing Flink Monitoring REST API

2017-09-18 Thread Fabian Hueske
Hi,

sorry for the late response.
Flink uses Netty for network communication which supports SSL client
authentication.
I haven't tried it myself, but would think that this should work in Flink
as well if you configure the certificates correctly.

We should update the docs to cover this aspect.
Feedback on this would be very welcome

Thanks, Fabian

2017-09-06 14:23 GMT+02:00 avivros :

> Does  jobmanager.web.ssl.enabled supports Client SSL Authentication?
>
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>


Re: Securing Flink Monitoring REST API

2017-09-06 Thread avivros
Does  jobmanager.web.ssl.enabled supports Client SSL Authentication?
 



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Re: Securing Flink Monitoring REST API

2017-09-04 Thread Fabian Hueske
Hi,

you can configure SSL for Flink's network communication [1] (see
jobmanager.web.ssl.enabled).
However, Flink does not manage different user accounts or allows to grant
permissions yet.

Best, Fabian

[1]
https://ci.apache.org/projects/flink/flink-docs-release-1.3/setup/security-ssl.html

2017-09-04 13:00 GMT+02:00 avivros <aviv.rosenf...@iqpiot.com>:

> What is the best way to secure the Monitoring REST API?
> I am using the monitoring rest API in a production environment (
> starting/stopping jobs, etc...). I should only allow authenticated calls to
> be executed ( called from a Java sever process ).
> What's the best way to go about this ( Kerberos? SSL Client Authentication?
> Other?).
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.
> n4.nabble.com/
>


Securing Flink Monitoring REST API

2017-09-04 Thread avivros
What is the best way to secure the Monitoring REST API?
I am using the monitoring rest API in a production environment (
starting/stopping jobs, etc...). I should only allow authenticated calls to
be executed ( called from a Java sever process ).
What's the best way to go about this ( Kerberos? SSL Client Authentication?
Other?).



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


Re: Monitoring REST API and YARN session

2017-03-31 Thread Ufuk Celebi
In this case they are proxied through YARN, you can check the list auf
running applications and click on the Flink app master UI link. Then
you have the host and port for the REST calls. Does this work?

On Fri, Mar 31, 2017 at 1:51 AM, Mohammad Kargar  wrote:
> How can I access the REST APIs for monitoring when cluster launched in a
> yarn session?


Monitoring REST API and YARN session

2017-03-30 Thread Mohammad Kargar
How can I access the REST APIs
for
monitoring when cluster launched in a yarn session?


Re: Monitoring REST API

2016-12-27 Thread Shannon Carey
Although Flink exposes some metrics in the API/UI, it probably only does that 
because it was easy to do and convenient for users. However, I don't think 
Flink is intended to be a complete monitoring solution for your cluster.

Instead, you should take a look at collectd https://collectd.org/ which is 
meant for monitoring OS-level metrics and has, for example, a Graphite plugin 
which you can use to write to a Graphite server or statsd instance… or you can 
integrate it some other way depending on what you have & what you want.

-Shannon

From: Lydia Ickler <ickle...@googlemail.com<mailto:ickle...@googlemail.com>>
Date: Wednesday, December 21, 2016 at 12:55 PM
To: <user@flink.apache.org<mailto:user@flink.apache.org>>
Subject: Monitoring REST API

Hi all,

I have a question regarding the Monitoring REST API;

I want to analyze the behavior of my program with regards to I/O MiB/s, Network 
MiB/s and CPU % as the authors of this paper did. 
(https://hal.inria.fr/hal-01347638v2/document)
From the JSON file at http:master:8081/jobs/jobid/ I get a summary including 
the information of read/write records and read/write bytes.
Unfortunately the entries of Network or CPU are either (unknown) or 0.0. I am 
running my program on a cluster with up to 32 nodes.

Where can I find the values for e.g. CPU or Network?

Thanks in advance!
Lydia



Re: Monitoring REST API

2016-12-21 Thread Ovidiu-Cristian MARCU
Hi Lydia,

I have used sar monitoring (sar -u -n DEV -p -d -r 1) and plotted the average 
over multiple nodes.

1)So for each node you can collect the sar output, and obtain for example:

Linux 3.2.0-4-amd64 (parasilo-4.rennes.grid5000.fr) 2016-01-27  
_x86_64_(16 CPU)
12:54:09CPU %user %nice   %system   %iowait%steal %idle
12:54:10all  4.63  0.00  3.25  0.13  0.00 91.99
12:54:09kbmemfree kbmemused  %memused kbbuffers  kbcached  kbcommit   
%commit  kbactive   kbinact
12:54:10129538812   2525308  1.91  1292 85876   3662636  
2.69   2111652 55132
12:54:09  DEV   tps  rd_sec/s  wr_sec/s  avgrq-sz  avgqu-sz 
await svctm %util
12:54:10  sda 28.71   2708.91 87.13 97.38  0.03  
1.10  0.97  2.77
12:54:09IFACE   rxpck/s   txpck/srxkB/stxkB/s   rxcmp/s   
txcmp/s  rxmcst/s
12:54:10 eth0632.67587.13   3173.60 58.47  0.00  
0.00  0.00

2) Calculate the average over your nodes (sync clocks) and obtain a final 
output over which you run some plot scripts:

LINE  DATE  FILENAME CPU_user  CPU_SYS   KBMEMFREE 
KBMEMUSED MEMUSED   DISK_UTIL DISK_RKBs DISK_WKBs _IO_RSTs  _IO_WSTs
1 12:54:10  res1Avg  6.12  1.25  129554704 
2509412   1.90  6.00  4253.63   87.04 3944.00   88.00 
2 12:54:11  res1Avg  3.41  0.28  129523432 
2540690   1.92  4.00  2335.82   51.62 2692.00   0.00  
3 12:54:12  res1Avg  0.06  0.03  129522000 
2542120   1.92  1.60  0.16  0.59  2048.00   32.00 
4 12:54:13  res1Avg  0.09  0.06  129520936 
2543182   1.92  0.60  0.19  0.59  2048.00   0.00  
5 12:54:14  res1Avg  0.06  0.06  129518448 
2545670   1.93  6.80  4.31  169.474044.00   16.00 

For other metrics specific to Flink’s execution you may need to rely on various 
metrics Flink is currently exposing.

Best,
Ovidiu

> On 21 Dec 2016, at 19:55, Lydia Ickler <ickle...@googlemail.com> wrote:
> 
> Hi all,
> 
> I have a question regarding the Monitoring REST API;
> 
> I want to analyze the behavior of my program with regards to I/O MiB/s, 
> Network MiB/s and CPU % as the authors of this paper did. 
> (https://hal.inria.fr/hal-01347638v2/document 
> <https://hal.inria.fr/hal-01347638v2/document>)
> From the JSON file at http:master:8081/jobs/jobid/ I get a summary including 
> the information of read/write records and read/write bytes.
> Unfortunately the entries of Network or CPU are either (unknown) or 0.0. I am 
> running my program on a cluster with up to 32 nodes.
> 
> Where can I find the values for e.g. CPU or Network?
> 
> Thanks in advance!
> Lydia
> 



Monitoring REST API

2016-12-21 Thread Lydia Ickler
Hi all,

I have a question regarding the Monitoring REST API;

I want to analyze the behavior of my program with regards to I/O MiB/s, Network 
MiB/s and CPU % as the authors of this paper did. 
(https://hal.inria.fr/hal-01347638v2/document 
<https://hal.inria.fr/hal-01347638v2/document>)
From the JSON file at http:master:8081/jobs/jobid/ I get a summary including 
the information of read/write records and read/write bytes.
Unfortunately the entries of Network or CPU are either (unknown) or 0.0. I am 
running my program on a cluster with up to 32 nodes.

Where can I find the values for e.g. CPU or Network?

Thanks in advance!
Lydia