Question: I'm tryuing to run job looks like this (workflow.xml)

```
<workflow-app name="FirstWorkFlow" xmlns="uri:oozie:workflow:0.2">
    <start to="FirstJob"/> 
    <action name="FirstJob">
        <pig>
            <job-tracker>hadoop1:50300</job-tracker>
            <name-node>hdfs://hadoop1:8020</name-node>
            <script>lib/FirstScript.pig</script>
        </pig>
        <ok to="end"/>
        <error to="kill"/>
    </action>
    <kill name="kill">
        <message>Action failed, error message[${wf:errorMessage(wf:lastErrorNode())}]</message>
    </kill>
    <end name="end" />    
</workflow-app>

```

FirstScript :

```
dual = LOAD 'default.dual' USING org.apache.hcatalog.pig.HCatLoader();
store dual into '/user/oozie/dummy_file.txt' using PigStorage();

```

job.properties:

```
nameNode=hdfs://hadoop1:8020
jobTracker=hadoop1:50300
oozie.wf.application.path=/user/oozie/FirstScript
oozie.use.system.libpath=true

```

My question is: do I need to provide nameNode, and jobTracker confguration both in job.properies and workflow.xml?

I'm quite confused, cause no matter if I set these paramaters or not I get this error (error from hue interface): 

```
E0902: Exception occured: [Call to localhost/127.0.0.1:8020 failed on connection exception: java.net.ConnectException: Connection refused]

```

Regards
Pawel

Answer: 
First to answer your question about `job.properties` - it is used to parametrize the workflow (the variables in the flow are replaced with the values specified in job.properties). So you can set the job tracker and namenode in job.properties and use the variables in workflow.xml or you can set it directly just in workflow.xml.

Are you sure that your Job Tracker's port is `50300`? It seems suspicious for two reasons: normally, job tracker's web UI is accessible at `http://ip:50030` but that is not the port that you are supposed to use for this configuration. For a Hadoop job configuration, the job tracker port is usually `8021`, `9001`, or `8012`. 

So it seems your problem is with setting the *correct* job tracker and name node (as opposed to setting it in the correct place). Try to check your Hadoop's settings in `mapred-site.xml` and `core-site.xml` for the correct ports and IPs. Alternatively, you can simply SSH to the machines running your Hadoop nodes and run `netstat -plnt` and look for the ports mentioned here.
I see a difference in port that you have specified in namenode and jobtracker. Just check what you have configured in mapred-site.xml and core-site.xml and put the appropriate port. 

And also might be the hadoop1 host-name is not getting resolved. Try to add the ip address of the server or put hadoop1 in your /etc/hosts file. 

You define the properties file so that the workflow could be parametarized.