2

I have compiled the latest version of apache-griffin version 0.6.0 and it is all set up. It creates a spark job and submit it via apache-livy. When it gets submit and start it starts to show the following trace. I am unable to to pin point any issue from the trace. Can anyone suggest a starting point?

As per my digging it happens when the configuration is not right

My configurations are as stated in the guides available on the github page.

Application application_1593428020619_0001 failed 2 times due to AM Container for appattempt_1593428020619_0001_000002 exited with exitCode: 254
Failing this attempt.Diagnostics: [2020-06-29 16:16:12.221]Exception from container-launch.
Container id: container_1593428020619_0001_02_000001
Exit code: 254
[2020-06-29 16:16:12.224]Container exited with a non-zero exit code 254. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
0%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: {
"spark" :%20%7B%0A%20%20%20%20%22log.level%22%20:%20%22WARN%22%0A%20%20%7D,%0A%20%20%22sinks%22%20:%20%5B%20%7B%0A%20%20%20%20%22type%22%20:%20%22CONSOLE%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22max.log.lines%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22HDFS%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22path%22%20:%20%22hdfs://griffin/persist%22,%0A%20%20%20%20%20%20%22max.persist.lines%22%20:%2010000,%0A%20%20%20%20%20%20%22max.lines.per.file%22%20:%2010000%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22ELASTICSEARCH%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22method%22%20:%20%22post%22,%0A%20%20%20%20%20%20%22api%22%20:%20%22http:/es:9200/griffin/accuracy%22,%0A%20%20%20%20%20%20%22connection.timeout%22%20:%20%221m%22,%0A%20%20%20%20%20%20%22retry%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D%20%5D,%0A%20%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
at org.apache.hadoop.fs.Path.initialize(Path.java:205)
at org.apache.hadoop.fs.Path.<init>(Path.java:171)
at org.apache.griffin.measure.utils.HdfsUtil$.openFile(HdfsUtil.scala:58)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader$$anonfun$readConfig$1.apply(ParamFileReader.scala:37)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader$$anonfun$readConfig$1.apply(ParamFileReader.scala:36)
at scala.util.Try$.apply(Try.scala:192)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader.readConfig(ParamFileReader.scala:36)
at org.apache.griffin.measure.Application$.readParamFile(Application.scala:127)
at org.apache.griffin.measure.Application$.main(Application.scala:55)
at org.apache.griffin.measure.Application.main(Application.scala)
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.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:635)
Caused by: java.net.URISyntaxException: Relative path in absolute URI: {
"spark" :%20%7B%0A%20%20%20%20%22log.level%22%20:%20%22WARN%22%0A%20%20%7D,%0A%20%20%22sinks%22%20:%20%5B%20%7B%0A%20%20%20%20%22type%22%20:%20%22CONSOLE%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22max.log.lines%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22HDFS%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22path%22%20:%20%22hdfs://griffin/persist%22,%0A%20%20%20%20%20%20%22max.persist.lines%22%20:%2010000,%0A%20%20%20%20%20%20%22max.lines.per.file%22%20:%2010000%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22ELASTICSEARCH%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22method%22%20:%20%22post%22,%0A%20%20%20%20%20%20%22api%22%20:%20%22http:/es:9200/griffin/accuracy%22,%0A%20%20%20%20%20%20%22connection.timeout%22%20:%20%221m%22,%0A%20%20%20%20%20%20%22retry%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D%20%5D,%0A%20%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
at java.net.URI.checkPath(URI.java:1823)
at java.net.URI.<init>(URI.java:745)
at org.apache.hadoop.fs.Path.initialize(Path.java:202)
... 14 more
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Unregistering ApplicationMaster with FAILED (diag message: Shutdown hook called before final status was reported.)
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Deleting staging directory hdfs://localhost:9000/user/geek/.sparkStaging/application_1593428020619_0001
20/06/29 16:16:11 INFO util.ShutdownHookManager: Shutdown hook called
[2020-06-29 16:16:12.225]Container exited with a non-zero exit code 254. Error file: prelaunch.err.
Last 4096 bytes of prelaunch.err :
Last 4096 bytes of stderr :
0%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
java.lang.IllegalArgumentException: java.net.URISyntaxException: Relative path in absolute URI: {
"spark" :%20%7B%0A%20%20%20%20%22log.level%22%20:%20%22WARN%22%0A%20%20%7D,%0A%20%20%22sinks%22%20:%20%5B%20%7B%0A%20%20%20%20%22type%22%20:%20%22CONSOLE%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22max.log.lines%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22HDFS%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22path%22%20:%20%22hdfs://griffin/persist%22,%0A%20%20%20%20%20%20%22max.persist.lines%22%20:%2010000,%0A%20%20%20%20%20%20%22max.lines.per.file%22%20:%2010000%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22ELASTICSEARCH%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22method%22%20:%20%22post%22,%0A%20%20%20%20%20%20%22api%22%20:%20%22http:/es:9200/griffin/accuracy%22,%0A%20%20%20%20%20%20%22connection.timeout%22%20:%20%221m%22,%0A%20%20%20%20%20%20%22retry%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D%20%5D,%0A%20%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
at org.apache.hadoop.fs.Path.initialize(Path.java:205)
at org.apache.hadoop.fs.Path.<init>(Path.java:171)
at org.apache.griffin.measure.utils.HdfsUtil$.openFile(HdfsUtil.scala:58)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader$$anonfun$readConfig$1.apply(ParamFileReader.scala:37)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader$$anonfun$readConfig$1.apply(ParamFileReader.scala:36)
at scala.util.Try$.apply(Try.scala:192)
at org.apache.griffin.measure.configuration.dqdefinition.reader.ParamFileReader.readConfig(ParamFileReader.scala:36)
at org.apache.griffin.measure.Application$.readParamFile(Application.scala:127)
at org.apache.griffin.measure.Application$.main(Application.scala:55)
at org.apache.griffin.measure.Application.main(Application.scala)
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.spark.deploy.yarn.ApplicationMaster$$anon$2.run(ApplicationMaster.scala:635)
Caused by: java.net.URISyntaxException: Relative path in absolute URI: {
"spark" :%20%7B%0A%20%20%20%20%22log.level%22%20:%20%22WARN%22%0A%20%20%7D,%0A%20%20%22sinks%22%20:%20%5B%20%7B%0A%20%20%20%20%22type%22%20:%20%22CONSOLE%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22max.log.lines%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22HDFS%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22path%22%20:%20%22hdfs://griffin/persist%22,%0A%20%20%20%20%20%20%22max.persist.lines%22%20:%2010000,%0A%20%20%20%20%20%20%22max.lines.per.file%22%20:%2010000%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22ELASTICSEARCH%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22method%22%20:%20%22post%22,%0A%20%20%20%20%20%20%22api%22%20:%20%22http:/es:9200/griffin/accuracy%22,%0A%20%20%20%20%20%20%22connection.timeout%22%20:%20%221m%22,%0A%20%20%20%20%20%20%22retry%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D%20%5D,%0A%20%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D
at java.net.URI.checkPath(URI.java:1823)
at java.net.URI.<init>(URI.java:745)
at org.apache.hadoop.fs.Path.initialize(Path.java:202)
... 14 more
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Final app status: FAILED, exitCode: 16, (reason: Shutdown hook called before final status was reported.)
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Unregistering ApplicationMaster with FAILED (diag message: Shutdown hook called before final status was reported.)
20/06/29 16:16:11 INFO yarn.ApplicationMaster: Deleting staging directory hdfs://localhost:9000/user/geek/.sparkStaging/application_1593428020619_0001
20/06/29 16:16:11 INFO util.ShutdownHookManager: Shutdown hook called
For more detailed output, check the application tracking page: http://progeek:8088/cluster/app/application_1593428020619_0001 Then click on links to logs of each attempt.
. Failing the application.
Faizan Sh
  • 96
  • 1
  • 13

2 Answers2

0

URISyntaxException: Relative path in absolute URI: { "spark" :%20%7B%0A%20%20%20%20%22log.level%22%20:%20%22WARN%22%0A%20%20%7D,%0A%20%20%22sinks%22%20:%20%5B%20%7B%0A%20%20%20%20%22type%22%20:%20%22CONSOLE%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22max.log.lines%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22HDFS%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22path%22%20:%20%22hdfs://griffin/persist%22,%0A%20%20%20%20%20%20%22max.persist.lines%22%20:%2010000,%0A%20%20%20%20%20%20%22max.lines.per.file%22%20:%2010000%0A%20%20%20%20%7D%0A%20%20%7D,%20%7B%0A%20%20%20%20%22type%22%20:%20%22ELASTICSEARCH%22,%0A%20%20%20%20%22config%22%20:%20%7B%0A%20%20%20%20%20%20%22method%22%20:%20%22post%22,%0A%20%20%20%20%20%20%22api%22%20:%20%22http:/es:9200/griffin/accuracy%22,%0A%20%20%20%20%20%20%22connection.timeout%22%20:%20%221m%22,%0A%20%20%20%20%20%20%22retry%22%20:%2010%0A%20%20%20%20%7D%0A%20%20%7D%20%5D,%0A%20%20%22griffin.checkpoint%22%20:%20%5B%20%5D%0A%7D

That long string, starting at the {, is not a URL, but is being treated as such, and so is rejected.

If you URL decode that string, you get the following, and it becomes even more obvious that it is not a URL, since it is actually JSON.

You need to figure out where that JSON text comes from, and why the code believes it is a URL. It is likely the response to some web service call, but that's just a guess.

{"spark": {
    "log.level" : "WARN"
  },
  "sinks" : [ {
    "type" : "CONSOLE",
    "config" : {
      "max.log.lines" : 10
    }
  }, {
    "type" : "HDFS",
    "config" : {
      "path" : "hdfs://griffin/persist",
      "max.persist.lines" : 10000,
      "max.lines.per.file" : 10000
    }
  }, {
    "type" : "ELASTICSEARCH",
    "config" : {
      "method" : "post",
      "api" : "http:/es:9200/griffin/accuracy",
      "connection.timeout" : "1m",
      "retry" : 10
    }
  } ],
  "griffin.checkpoint" : [ ]
}
Andreas
  • 154,647
  • 11
  • 152
  • 247
0

this is a livy bug,and fixed in lastest version in Griffin, you may find the answer in

 https://issues.apache.org/jira/browse/GRIFFIN-248?jql=project%20%3D%20GRIFFIN%20AND%20issuetype%20%3D%20Bug%20AND%20text%20~%20%22%2525%22

The change i did was just to replace the "\" before trying to parse the json.
Class: Application.scala
lines: 44-45, in the moment of parsing the arguments.  

However, this comes from the SparkSubmitJob.java in function setLivyArgs(), where there is a workaround for a livy bug.

The livy version used when encountered "java.net.URISyntaxException: Relative path in absolute URI: " was 0.6.0-incubating. 
carson
  • 1
  • 1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - [From Review](/review/late-answers/30589483) – Zelkins Dec 15 '21 at 02:31