4

i got the following oozie.log :

org.apache.oozie.service.ServiceException: E0104: Could not fully initialize service [org.apache.oozie.service.ShareLibService], Not able to cache sharelib. An Admin needs to install the sharelib with oozie-setup.sh and issue the 'oozie admin' CLI command to update the sharelib

i run the following command:

oozie-setup.sh sharelib create -fs hdfs://localhost:54310
oozied.sh start

hdfs dfs -ls /user/hduser/share/lib
15/02/24 18:05:03 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Found 3 items
drwxr-xr-x   - hduser supergroup          0 2015-02-24 17:19 /user/hduser/share/lib/lib_20150224171855
drwxr-xr-x   - hduser supergroup          0 2015-02-24 17:19 /user/hduser/share/lib/lib_20150224171908
drwxr-xr-x   - hduser supergroup          0 2015-02-24 17:29 /user/hduser/share/lib/lib_20150224172857 

but :

oozie admin -shareliblist -oozie http://localhost:11000/oozie
[Available ShareLib]

oozie admin -sharelibupdate -oozie http://localhost:11000/oozie
null

my oozie-site.xml contains:

<property>
    <name>oozie.service.WorkflowAppService.system.libpath</name>
    <value>/user/${user.name}/share/lib/</value>
</property>

<property>
    <name>oozie.service.HadoopAccessorService.hadoop.configurations</name>
    <value>*=hadoop-conf</value>
</property>

Do you have any idea of my mistake ?

seb835
  • 366
  • 6
  • 16
  • where you able to find a solution. I also have similar issue( ErrorCode [It should never happen], Message [File /user/mountain/share/lib does not exist])..but not able to find a solution so far – Raj May 25 '15 at 05:39
  • unfortunately not, so i decide to not use oozie ... i rework to use another solution. – seb835 May 25 '15 at 14:37

2 Answers2

10

I struggled to fix the same error for couple of days and I finally fix it.

It was related to the sharelib service that was looking for sharelib folder on my local file system instead of my hdfs.

So to fix it:

stop oozie

edit conf/oozie-site.xml

<property>        
      <name>oozie.service.HadoopAccessorService.hadoop.configurations</name> 
      <value>*=/usr/local/hadoop/etc/hadoop/</value>
</property>

restart oozie.

And Voila!

The value of the property was set to *=hadoop-conf by default. I still don't know yet what hadoop-conf should point to but in my case it wasn't the configuration folder hadoop so I changed it for *=/usr/local/hadoop/etc/hadoop/.

yair
  • 8,945
  • 4
  • 31
  • 50
Breach
  • 1,288
  • 1
  • 11
  • 25
  • Thanks! You helped me alot! Had the same Problem. – jk2 Jul 28 '15 at 09:39
  • Some background on what happened can be derived from the _oozie-default.xml_ file. The property _oozie.service.HadoopAccessorService.hadoop.configurations_ specifies that if the value is a relative path the hadoop configuration _core-site.xml_ will be taken from the oozie installation dir. By default _core-site.xml_ will not contain _fs.defaultFS_ property which means the default value _file:///_ will be picked-up. The most common use-case is to use oozie atop the existing hadoop cluster installation which means you already have some path to hadoop conf dir which is what should be provided. – kasur May 24 '16 at 16:26
  • @Breach: the path /usr/local/hadoop/etc/hadoop/ seem to be local not an hdfs path. In my case I have set to the value where all hadoop *.xml files reside. Still getting the same error – Atish Feb 05 '17 at 16:48
5

In my oozie-4.2.0, the default setting *hadoop-conf points to the subfolder in

path/to/oozie/conf/hadoop-conf

In my case, there is a file 'core-site.xml', which I think should be the config file. I add below properties in this file.

<property>
    <name>fs.defaultFS</name>
    <value>hdfs://localhost:9000</value>
</property>

Restart oozie and the issue is resolved.

Juniver Hazoic
  • 127
  • 2
  • 10