karlovac
13th September 2002, 08:36
For disconnecting idle users (BW users) I made a procedure with ipc_info; new_bshell and everything was fine.
After 40 minutes of inactivity - licence is free...
But, for ASCII users same new_bshell doesn't work well.
I installed some solutions which repaired 5 minutes maximum input for disconnecting, but, without results.
My ordinary users doesn't have /bin/ksh defined in General user data.
Is it maybe problem (they must have ksh?)?
(And, if I give them shell - what to put in .profile after ba6.1 to not to give them to be "lost in unix shell"?)
Thanks
NPRao
13th September 2002, 08:56
Looking back at my notes and from the BaaN support site -
Solution No: 110907
Stopping inactive (idle) bshells using session_timeout mechanism.
Most simple way is to set it as an environment variable.When logging into Baan specify the following in the command field of BW Configuration:
-- -set SESSION_TIMEOUT=0
Another method is more complex, to use this method, follow the next instructions:
1. Log in to unix and go to directory $BSE/lib/defaults
2. copy the file where you specified the session_timeout. For example, in case the session_timeout parameter is specified in the file "all", copy the file "all" to "all2" for example.
3. Edit the file all2 and set the session_timeout parameter to 0.
4. Now, when logging into Baan specify the following in the command field of BW Configuration:
-- -set USR_DBC_RES=lib/defaults/all2
In this way the bshell will first read in the file $BSE/lib/defaults/all and then secondly the file $BSE/lib/defaults/all2The value of session_timeout in file all2 will override the value of session_timeout in file all.
So, in this case session_timeout will be set to a very high value, and therefor never reach this value, and you can savely run the session.
karlovac
13th September 2002, 09:14
Thanks, but sorry
I was reading this solutions several times:
solutions 110907, 110908, 110978, 117282, 19868 and so on.
but my question is ragarding BA - ASCII Users.
In BW everythings works fine, but in BA for some thing you can use DS_SA variable in .profile file but a ask again if someone know:
My ordinary users doesn't have /bin/ksh defined in General user data.
Is it maybe problem (they must have ksh?)?
(And, if I give them shell - what to put in .profile after ba6.1 to not to give them to be "lost in unix shell"?)
Thanks
patvdv
13th September 2002, 09:20
Your users don't need a shell in their profile unless they want to run an external shell from within Baan. I don't think this is related to the session_timeout mechanism which I have always found to be pretty unreliable. In some portingset it works, in others it doesn't.
To avoid people from gaining shell access you can put a 'trap' in your .profile just before the ba6.1 and an 'exit' statement right after.
OmeLuuk
13th September 2002, 11:11
For ascii users, the setting for the alternative bshell_new must be set. If not set, the bshell name will be bshell.
You can set this with the
set DS_AS=bshell_name [for ba6.x only, to specify a specific bshell name from ipc_info]
I assume you do set the value in the $BSE/lib/defaults/bshell_new file?
Alternative you can use the setting in $BSE/lib/defaults/all, then it applies to all users.
I think a better way is to do it the other way around:
Put the general setting in the $BSE/lib/defaults/all file.
Allow the "power" users (and only them) to use an alternative bshell name as bshell_new and overrule the settings of the all file in the $BSE/lib/defaults/bshell_new file.
Or if the number of exceptions is only very few: do not mess up the ipc_info file and just overrule the general setting in the all file with the -- -set SESSION_TIMEOUT=0 (or very high) for the exceptions. This can be added both to ba6.1 as to bw.exe (command box).
karlovac
13th September 2002, 12:38
Hi, OmeLuuk
I added in ipc_info:
bshellt s 0 0 p ${BSE}/bin/bshellt
;
created in $BSE/bin file bshellt
$ cat bshellt
#!/usr/bin/ksh
SESSION_TIMEOUT=39
export SESSION_TIMEOUT
${BSE}/bin/bshell6.1 $*
It works fine for BW users (call bshellt instead bshell)
i tried to make it for BAscii users so I put a line in .profile:
# cat .profile (of some user)
export DS_AS=bshellt
.......
exec ba6.1
<EOF>
But, it doesn't work ?!?
:confused:
(BW idle - disconnect works well for a few months)
nick66
13th September 2002, 16:44
If you want the timeout to affect all users, just create a file "all" in $BSE/lib/defaults. The content of this file should be:
session_timeout:40
Just implemented this today, and works fine for both ASCII and BW users. No need to mess around with the bshell or ipc_info...
Regards,
Nick
jclju1
13th September 2002, 17:13
I tested this scenario in this way:
export DS_AS=bshellt
ba6.1
exit
On HP-UX (ksh) it works fine. ba6.1 tried to start bshellt (and reported error because I didn't created bshellt task) and after that logout was done automatically.
If I deleted first line (export DS_AS=bshellt) ba6.1 started normally and when I finished my work ("a" in choice field) logout was done automatically.
karlovac
16th September 2002, 08:36
OK,
if I put session_timeout:40 for all users,
what to put in users files to for users who must be on all time
And what with job daemon?
Thanks
d
OmeLuuk
16th September 2002, 10:33
You can give them the bshellnt (no timeout)
and create a file in $BSE/defaults/bshellnt with setting session_timeout:0Solution 110907:
Another method is more complex, to use this method, follow the next instructions:
1. Log in to unix and go to directory $BSE/lib/defaults
2. copy the file where you specified the session_timeout. For example, in case the session_timeout parameter is specified in the file "all", copy the file "all" to "all2" for example.
3. Edit the file all2 and set the session_timeout parameter to 0.
4. Now, when logging into Baan specify the following in the command field of BW Configuration:
-- -set USR_DBC_RES=lib/defaults/all2
In this way the bshell will first read in the file $BSE/lib/defaults/all and then secondly the file $BSE/lib/defaults/all2
The value of session_timeout in file all2 will override the value of session_timeout in file all.
So, in this case session_timeout will be set to a very high value, and therefor never reach this value, and you can savely run the session.
Solution 110908:
2) Set the resource variable in that way it applies only for certain bshells.
First determine the bshell name by checking the file $BSE/lib/ipc_info.
Default there will be the following line in this file:
bshell s 0 0 p ${BSE}/bin/bshell6.2
So the bshell name "bshell" will start ${BSE}/bin/bshell6.2.
In case you want to run a bshell with specific settings you can copy the current ${BSE}/bin/bshell6.2 to another name.
E.g.: ${BSE}/bin/bshell_test6.2, and add the following line the ipc_info file:
bshell_test s 0 0 p ${BSE}/bin/bshell_test6.2
Now you have created a new bshell name: "bshell_test", and when logging into Baan you can specify this name in the field "Bshell name" of BW configuration. (And when using ASCII interface, ba6.x, you set environment variable DS_AS to set the bshell name. E.g.: export DS_AS=bshell_test).
Now you can set specific resource variables only for this bshell (${BSE}/bin/bshell_test6.2) as follows:
Create a file called "bshell_test" in $BSE/lib/defaults and specify in this file the resource variables you want. (Refer to previous text above).
karlovac
16th September 2002, 16:57
Thanks OmeLuuk,
but there IS a problem
THIS PART:
Solution 110908:
2) Set the resource variable in that way it applies only for certain bshells.
First determine the bshell name by checking the file $BSE/lib/ipc_info.
Default there will be the following line in this file:
bshell s 0 0 p ${BSE}/bin/bshell6.2
So the bshell name "bshell" will start ${BSE}/bin/bshell6.2.
In case you want to run a bshell with specific settings you can copy the current ${BSE}/bin/bshell6.2 to another name.
E.g.: ${BSE}/bin/bshell_test6.2, and add the following line the ipc_info file:
bshell_test s 0 0 p ${BSE}/bin/bshell_test6.2
Now you have created a new bshell name: "bshell_test", and when logging into Baan you can specify this name in the field "Bshell name" of BW configuration. (And when using ASCII interface, ba6.x, you set environment variable DS_AS to set the bshell name. E.g.: export DS_AS=bshell_test).
WORKS WELL FOR BW USERS
but NOT for ASCII users
And we are now on my first question in this 10 submits long thread ...
(I installed some "patches" which could make it work for time
greater than 5 minutes but it doesn't work for me.)
HM
Thanks anyway
Dubravko
OmeLuuk
16th September 2002, 19:00
Karlovac: I added in ipc_info:
bshellt s 0 0 p ${BSE}/bin/bshelltI think you should just call bshell here with the bshell name bshellt. The line is meant just to determine another bshellname, doing the same as the first line would.created in $BSE/bin file bshellt
$ cat bshellt
#!/usr/bin/ksh
SESSION_TIMEOUT=39
export SESSION_TIMEOUT
${BSE}/bin/bshell6.1 $*<< This part can be skipped then because the ba users and bw users can have the setting being set in a different way, via the $BSE/defaults/bshellt file. I think the ASCII users do not use bshellt, but they use ba6.1 to start the bshell...i tried to make it for BAscii users so I put a line in .profile:
# cat .profile (of some user)
export DS_AS=bshellt
.......
exec ba6.1
<EOF>This should be fine then, because via the setting bshellt the file $BSE/lib/defaults/bshellt is being read and ba6.1 is starting the bshell process. In that file an alternative value can be set.
karlovac
17th September 2002, 11:52
If i understand well I did it right way;
But, maybe ottstppollmess isn't patched as it should be ...
(I give up for now - waiting for new Service pack)
Thanks OmeLuuk, thanks to others
karlovac
19th September 2002, 07:35
It works ...
For BA (ascii) users I made a shell script which put into .profile:
SESSION_TIMEOUT=29
EXPORT SESSION_TIMEOUT
That's all
Magic border is 30!!!
It does't work with number bigger than that
(I installed all needed patches but border stud the same)
For BW users works procedure with bshellt, as we talked about.
Regards
Dubravko
OmeLuuk
19th September 2002, 14:12
I tend to believe you. But I think this is either a bug or not true.
klixy23
19th September 2002, 17:03
Originally posted by karlovac
It works ...
For BA (ascii) users I made a shell script which put into .profile:
SESSION_TIMEOUT=29
EXPORT SESSION_TIMEOUT
That's all
Magic border is 30!!!
Regards
Dubravko
I think the magic border is DS_TIMEOUT_DETECT. Try to set DS_TIMEOUT_DETECT = 61 and SESSION_TIMEOUT = 60.
Refer to IMPORTANT NOTES (4) in solution 110907.
The value of ds_timeout_detect has to be bigger then the value of session_timeout !! (Refer to solution 19868 for more infomation about ds_timeout_detect). Take care: in case you did not set ds_timeout_detect, the default value of 30 minutes is applicable. In that case session_timeout has to be smaller then 30 minutes to let it work.
OmeLuuk
19th September 2002, 17:51
That must be it! ... There is something strange though, why do the bw-clients run correct with the higher settings?