Baanboard.com

Baanboard.com (http://www.baanboard.com/baanboard/index.php)
-   Tools Administration & Installation (http://www.baanboard.com/baanboard/forumdisplay.php?f=2)
-   -   SLM issues for Baan jobs called in crontab (http://www.baanboard.com/baanboard/showthread.php?t=62548)

pjohns 25th June 2012 16:46

SLM issues for Baan jobs called in crontab
 
Hello,

I enabled SLM licencing on our Production server at the weekend. After enabling I could login to the Baan client without any issue. An EDI job called by root's crontab also ran without any issues. However, Baan jobs called by other users crontabs failed to run. When I look in the log.bshell I see the following error:-

2012-06-24[02:01:07]:E:bsp: ******* S T A R T of Error message *******
2012-06-24[02:01:07]:E:bsp: Log message called from /BAAN/view/port.6.1c.13/vobs/tt/lib/al_1/al_sli.c: #789 keyword: shl
2012-06-24[02:01:07]:E:bsp: Pid 2856 Uid 125 Euid 125 Gid 125 Egid 125
2012-06-24[02:01:07]:E:bsp: user_type S language 2 user_name bsp tty locale ISO88591/NULL
2012-06-24[02:01:07]:E:bsp: Errno 2 (No such file or directory) bdb_errno 0
2012-06-24[02:01:07]:E:bsp: Log_mesg: Load of shared library failed 'SlmClient','SLM70_API_SL';
2012-06-24[02:01:07]:E:bsp: SlmClient.a: cannot open shared object file: No such file or directory
2012-06-24[02:01:07]:E:bsp: ******* E N D of Error message *******
2012-06-24[02:01:07]:W:bsp:
2012-06-24[02:01:07]:W:bsp: ******* S T A R T of Warning message *******
2012-06-24[02:01:07]:W:bsp: Log message called from /BAAN/view/port.6.1c.13/vobs/tt/mir/mir/bclm.c: #633 keyword: bclmInit
2012-06-24[02:01:07]:W:bsp: Pid 2856 Uid 125 Euid 125 Gid 125 Egid 125
2012-06-24[02:01:07]:W:bsp: user_type S language 2 user_name bsp tty locale ISO88591/NULL
2012-06-24[02:01:07]:W:bsp: Errno 2 (No such file or directory) bdb_errno 0
2012-06-24[02:01:07]:W:bsp: Log_mesg: SSA License Manager Initialization Failed, code: '1' ('initialization failed').
2012-06-24[02:01:07]:W:bsp: ******* E N D of Warning message *******

I have double checked the SLM set-up and cannot see any issues.

I have created SLMHOME variable in $BSE/lib/bse_vars
I have set LD_LIBRARY_PATH=/usr/local/slm/shlib
I have set CLASSPATH=:/usr/local/slm/java/com_baan_bclm.jar

The same user that fails can be used to login to Baan Windows client with no issue.

We have SLM set-up on our test servers and batch jobs run okay.

Baan Production Details -

Baan IVc4 SP 31
Port Set 6.1c.13
SLM Version 7.2.0.4

I have now switched back to Baan Licence daemon but can anyone advise what else I can look at to resolve the issue of batch jobs running with SLM?

Thanks in advance.

PJ

Martin 26th June 2012 11:14

Permissions for /usr/local/slm ?

pjohns 26th June 2012 13:47

No I checked the permissions and they are okay. The same batch user that fails with SLM can login to Baan client without any issue.

Martin 26th June 2012 15:28

ok.

make a short test :

set the environment variable SLMHOME,LD_LIBRARY_PATH and CLASSPATH
in /etc/profile or other file that permits you to set a system-wide environment variable.

pjohns 27th June 2012 11:59

I had already set these and confirmed that by looking at 'env'.

LD_LIBRARY_PATH=/usr/local/slm/shlib
SLMHOME=/usr/local/slm
CLASSPATH=:/usr/local/slm/java/com_baan_bclm.jar

Han Brinkman 27th June 2012 14:27

PJ,

Can you login as that user on unix level and run the SlmClientTest command? That will probably give you a hint what's configured wrong.

Regards,

pjohns 27th June 2012 14:35

Hello Han,

Yes I've done that and the test comes back with everything passing.

The whole thing is strange as I can login to Baan when SLM is running without issue. It was only when the Baan job was being called via the crontab that was causing problems. However, a Baan job called by root's crontab worked okay. This would point to permissions or enviroment settings but I have checked these and all appears to be okay.

Martin 27th June 2012 15:44

PJ,

login as the user, which does not work.
Modify the crontab like this :

* * * * * env > /tmp/env.output

Verify the output, so you are shure that all needed Environment is set from the cron.

pjohns 27th June 2012 16:35

This returned the following output -

SHELL=/bin/sh
USER=batch200
PATH=/usr/bin:/bin
PWD=/baan/bse/home/batch200
SHLVL=1
HOME=/baan/bse/home/batch200
LOGNAME=batch200
_=/usr/bin/env

SLM and batch jobs works on our test server and the above test gives the same results. So even though there is no reference to SLM in env.ouput it would appear it doesn't matter as the job runs fine under SLM on our test server??

Martin 27th June 2012 16:46

PJ,

no there must something different.
The Problem is, that the cron-shell is not a loginshell, so the /etc/profile is not read.
You have 2 options :
Variable can be defined in the crontab file; 'man 5 crontab' for
more info.

or

source /etc/profile at the top of the rc.startjob script:

.. /etc/profile

Maybe there is something different in your rc.startjob script on test and productionserver

Han Brinkman 27th June 2012 17:28

Does the batch user have a ksh as loginshell? Because cron uses sh as standard shell.
Perhaps that causes the problem?

Do the users use the same start.job script as your batch user?

pjohns 27th June 2012 17:42

I don't think it's anything to do with rc.startjob script as we use two ways to call jobs from shell scripts.

$BSE/etc/rc.startjob INV202
or
ba6.1 -- -set BSE_COMPNR=200 ttaad5203m000 after exporting BSH_JOB

Both of the above methods fail.

Users use bash as login shell.

As Martin says there is something different somewhere but I canot see it.

Han Brinkman 28th June 2012 15:25

Hmmm....

What if you define these variables in the rc.startjob script:

SLMHOME
LD_LIBRARY_PATH
CLASSPATH

You could also try to add SlmClientTest to the rc.startjob script and see if things are fine at that stage as well.

pjohns 2nd July 2012 18:55

Whilst comparing the production and test server I did overlook one "small" thing. I had recently updated the porting set from 6.1c.13 to the new 8.8a version.

So I rolled back the porting set on test and managed to replicate my issue. So following your suggestions I set the SLMHOME, CLASSPATH and LD_LIBRARY_PATH at the start of the users crontab. Scripts ran by cron now work.

Thanks for your input on this issue.

PJ


All times are GMT +2. The time now is 23:34.


vB.Sponsors
©2001-2017 - Baanboard.com - Baanforums.com