SLM issues for Baan jobs called in crontab
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: ******* 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 22.214.171.124
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.
Permissions for /usr/local/slm ?
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.
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.
I had already set these and confirmed that by looking at 'env'.
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.
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.
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.
This returned the following output -
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??
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
source /etc/profile at the top of the rc.startjob script:
Maybe there is something different in your rc.startjob script on test and productionserver
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?
I don't think it's anything to do with rc.startjob script as we use two ways to call jobs from shell scripts.
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.
What if you define these variables in the rc.startjob script:
You could also try to add SlmClientTest to the rc.startjob script and see if things are fine at that stage as well.
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.
|All times are GMT +2. The time now is 11:10.|
©2001-2018 - Baanboard.com - Baanforums.com