通过Java运行Oozie工作流时获得连接超时

时间:2014-11-18 04:13:40

标签: java workflow oozie

当我尝试使用java

运行Oozie工作流程时出现以下错误
IO_ERROR : java.net.ConnectException: Connection timed out: connect
at org.apache.oozie.client.OozieClient.validateWSVersion(OozieClient.java:234)
at org.apache.oozie.client.OozieClient.createURL(OozieClient.java:300)
at org.apache.oozie.client.OozieClient.access$000(OozieClient.java:71)
at org.apache.oozie.client.OozieClient$ClientCallable.call(OozieClient.java:366)
at org.apache.oozie.client.OozieClient.run(OozieClient.java:547)
at oozieDemo.main(oozieDemo.java:27)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.DualStackPlainSocketImpl.connect0(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)

这是我的代码:

OozieClient wc = new OozieClient("http:xxxxxxx/oozie");
System.out.println(" connection established....." + wc);

Properties conf = wc.createConfiguration();
conf.setProperty(OozieClient.APP_PATH,"hdfs:foo/xxx/workflow.xml");
conf.setProperty("jobTracker", "foo:8021");
conf.setProperty("nameNode","hdfs:xxxx");
conf.setProperty("queueName", "default");
conf.setProperty("appLibLoc","hdfs:/foo/xxx/lib");

String jobId = wc.run(conf);
System.out.println("Workflow job submitted");

所以在这里我可以看到连接已经建立但无法运行工作流程。

我是新手。所以无法弄清楚究竟哪里失败了。

1 个答案:

答案 0 :(得分:0)

连接超时意味着:

  1. 网址不正确或已关闭,请尝试ping它。
  2. 防火墙阻止了它。
  3. 默认超时已过期。
  4. 您的互联网访问已关闭,我将假设情况并非如此。