Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error with LSF Platform: lsb_init: Failed in an LSF library call: Unable to open file lsf.conf

Tags:

centos

lsf

I have an issue with LSF Platform I cannot wrap my head around.

For scripting reason, I need to check the running/pending jobs with 'bjobs' (and other b***) with a perl script.

For some reason it did not work, and I was able to view the following error message:

lsb_init: Failed in an LSF library call: Unable to open file lsf.conf

Some research on Google and in the manual gave nothing great, I did a little test.

My account (max) is a LSF administrator. Root is a LSF admin as well.

So I switched to root, and tried to launch bjobs, but being max with 'sudo –u max'. Please have a look at these commands:

hn[~]=> whoami
max
hn[~]=> bjobs
No unfinished job found
hn[~]=> su
Password: 
[root@hn max]# whoami
root
[root@hn max]# sudo -u max whoami
max
[root@hn max]# bjobs
No unfinished job found
[root@hn max]# sudo -u max bjobs
lsb_init: Failed in an LSF library call: Unable to open file lsf.conf

How can I correct this?

like image 856
user1921895 Avatar asked Dec 21 '12 15:12

user1921895


1 Answers

By default LSF will look for lsf.conf in /etc. If its not there, then it will look in the directory in the env variable LSF_ENVDIR.

sudo is probably resetting your environment. Try sudo -i or put

Defaults !env_reset

in your sudoers file.

You could also try something like this

sudo -u max LSF_ENVDIR=$LSF_ENVDIR LSF_SERVERDIR=$LSF_SERVERDIR bjobs
like image 176
Michael Closson Avatar answered Nov 06 '22 22:11

Michael Closson