Support Questions

Find answers, ask questions, and share your expertise

Shell action in oozie is failing

New Contributor


We have shell script( which executes psql query(script.sql). It works perfectly fine when i run directly run like `sh`. But when i add the same to oozie workflow inside shell-action. It is not recognizing the psql command.

<action name='shell1'> 
	<shell xmlns="uri:oozie:shell-action:0.1"> 
	<ok to="end" />
	<error to="fail" />

Please suggest me what i should do here.

My problem is ->i have to run some update queries (will be placed in hdfs path) to postgre db through oozie


Expert Contributor
@Mohan Kumar

Running a psql script using shell action would need the psql command to be available on all the NodeManagers and the user launching the oozie job, needs to be able to launch the psql command across the NM's.

Can you check to see if psql is available across all the NM's?

Also, it would be great if you can also post in the exception that you are seeing from the oozie launcher job for this shell action as shell action would be executed inside the oozie launcher.