Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

disconnect session upon exit 2

Status
Not open for further replies.

nix45

MIS
Nov 21, 2002
478
US
Citrix MetaFrame XP FR2/SP2
Windows 2000 Server SP3

I have a published application that launches a custom app. Is it possible to automatically disconnect your Citrix session when you close the application? When you close the app, it leaves your session connected.

Thanks,
Chris
 
So the published app spawns another application? If this is the case it really depends on the original application - you need to work out a way on a normal workstation to automatically unload the original app after the spawned app is closed. If you can do it on a normal workstation, then it should work under Citrix. If the issue is being caused by users shutting down the app by clicking on the "X" in the top right hand corner, then go to and give the AppScape utility a try.

Cheers
 
Sorry, I didn't explain my problem very well.

I have a published app called BBJ that requires you to log into the Windows domain, so its not anonymous. After you enter your credentials, it opens up the application. If you quit the application, the session remains active on the server. If you log back into the app, it won't ask for your credentials because you already have a session open, so it just brings you right in. Everytime you log in afterwards, it opens a new session, but they get killed as they should when you quit the app. The first session remains active until you terminate it from the CMC. When you log into BBJ, it actually launches a process on a Linux server. When you exit the application, the process on the Linux server terminates, but the Citrix session remains active.

This problem is only happening with this one particular application (BBJ). If I set up Internet Explorer as a published app (for example), the session terminates when you close the app as it should.

This probably doesn't matter, but we just upgraded to FR3/SP3 after I initially posted this.

Thanks,
Chris
 
This is starting to look like a BBj issue, and not a MetaFrame problem. Either way, if anyone has any ideas that would be great.

Thanks.
 
BBj as in "Business Basic java"? Anyhow, probably a stupid question but I have to ask, are you sure you're publishing the application rather than the entire desktop? If you close the app, how do you start it again from the same session when you connect back in?

If you definitely are just publishing the BBj application, then what happens normally if it's run from a standard workstation ie after quitting as you are doing on the Citrix server, does *everything* unload? Or is there perhaps something else that gets launched (eg some java app) that keep running in the background? Fire up task manager on a workstation that's just booted up (and before running the BBj app) and make a note of what's loaded. Now start BBj etc (not via Citrix) and check what's loaded. Finally, quit from BBj and see if it matches exactly what it was like originally - if there's something else still running, then that may be why the session won't end.

Cheers
 
Yes, its a published app and not the entire desktop.

Yes, BBj is a java app, We figured out yesterday that after you start a BBj session in Citrix and close it out, a process called "ProxyManagerService" doesn't terminate on the server. The bbj.exe service terminates, but the ProxyManager process stays alive, so if you try to log in again from the same workstation, it brings you right back to where you left off without asking you to log in.

Thanks for your help,
Chris
 
...the reason it brings you back in without asking you to log in is because the ICA client is storing your cached credentials. The bbj.exe process is being terminated correctly, but Citrix is reporting the connection as active because of the ProxyManager process sticking around. I also just noticed that if you kill the "wfica32.exe" process on your local workstation and then "terminate the Connection Center" from the system tray (right click on Program Neighborhood), the session will show us disconnected on the server, rather than active.

Chris
 
The ICA client isn't storing your credentials, the session is still running on the server and when you reconnect with the ICA client, the citrix server returns you to the original session. It's a feature - damned handy for (say) running a job from home as you can dial in, start something, then hang up & check on the progress later. Anyhow - maybe you can create a script that runs bbj then kills the proxymanager program? Then publish that script instead.... just a thought.

Oh, and maybe the following might be of help:
Cheers
 
I followed that doc and everything in the doc was already done except for the last step of disabling the Thin Client Proxy Server and the Interpreter Server in Enterprise Manager. Unfortunately, the same thing is still happening except a different process is hanging up now. When set up like this, a process called ThinClientProxy sticks around. The process is owned by the user who started it, not SYSTEM or Administrator.

I'll look into the scripting, but I'm not sure how well that will go. I can write Linux (bash) scripts fine, but have never attempted any scripting in Windows. I'm not a programmer and don't know anything about BBj, we have an in-house BBj programmer who takes care of that, but this has us both stumped.

Chris
 
...from BBj tech support...

"I'm assuming that you have the running of a BBj Application tied
to a user login and when the program ends the user is supposed to be
logged out. There is a property
com.basis.bbj.comm.ThinClientProxyServer.waitTime that is supposed to
specify how long before the ThinClientProxy server will timeout.
Changing this value to 0, should cause the server to go away after the
programs stops. Unfortunately, setting this value currently has no
affect(I believe it currently times out after 30 minutes)."

So basically, we just have to live with it until Basis gets their heads out of their....
 
Excellent...... [sigh] Ah well.... the script I was talking about isn't hard - just use notepad to create a plain text file called, say, "ihatebbj.cmd" then put in it something along the following:

@echo off
bbj
kill proxymanager
exit


where "bbj" is the command used to start the app, and kill is the utility from the win2k resource kit, and proxymanager is the name of the application you want to snuff.

Would probably need some tweaking, but should give you the general idea. Of course the ideal situation would be for Basis to..... [noevil]

Cheers
 
Hey nix45,
I had that same issue with publish applications. When users hit "x" it would only disconnect their sessions and would leave it running on the server.

Basically there is a process not closing whenever the end-user closes the application. I had two servers that I had publish out Excel but only one actually logged off the user when they exited the application. I ran them side by side and I noticed that on one it had 3 processes and on the other it only had 2. Everytime I closed out the application with the 3 processes, the extra process would hang. Which caused the app to still run on the server. Anyways, here is what you need to modify in the registry.

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Citrix\wfshell\TWI]
"DllName"="seamls20.dll"
"NotifyEvent"="WfshellTwiNotify"
"LogoffCheckSysModules"="ssonsvr.exe"

The "logoffchecksysmodules" is what you are needing to add. I noticed that on our server, ssonsvr would not close and that was causing our hangup with the app.

Hope this helps.
 
enigma, that reg hack worked great! Out of curiosity, how did you come across that reg hack?

Thanks a lot for your help, both of you, enigma and beergod.

Chris
 
hey nix45,
I'm glad that worked for you. I saw a post on citrix's knowledge base with another IBM application. So I called our Citrix support vendor and they mentioned the same thing.

So I tried it and it worked =)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top