Normal Topic Server not releasing Client (Read 1096 times)
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Server not releasing Client
Jul 7th, 2006 at 8:15pm
Print Post Print Post  
I have a Sesame Server installed that is not releasing the Client connection.

I did a remote reconciliation of a new DSR file to an existig DB file.

Used Client icon, no delay and opened the reconciled DB file and saw the new DSR layouts were missing.
Thought that perhaps I had selected the wrong destination DB for the Reconcile, so went really slowly to make sure the correct target was selected.  Reconciled again.

Used Client icon to open again, opened instantly, no delay,and same result, DSR not in place.
I now opened DB file directly without Client connection and DSR layout was in place.
I closed and opened using Sesame Main Menu to browse for DB file, open with new DSR layout in place.
Used Client icon again, no delay, wrong layout.

The delay is the hint for me.
Normally when making first Client connection, there is a 5min + delay.  Subsequent ones open instantly.
So, I looked at Sesame Server with all Clients closed and could see the name of the DB file was showing in the list of applications open.
I closed Sesame Server, and restarted Sesame Server, DB file was not showing.
I used Client icon, long delay, but opened up with correct new DSR layouts.


I did some more testing, found that sometimes when starting Sesame Server, I would get a message that ports were not connected, and Sesame Server would shut down.  Try to start Sesame Server again, and would be ok, see name of server and 20000:20001 showing.

Client/Server connection works good when making initial connection.  It is when we think all are closed that we find DB is still being served by Sesame Server.  Cannot reconcile, it says file is in use.  Need to close Sesame Server, restart it, unlock the DB file and then do the Reconcile.

I came to this conclusion:
The Sesame Server is not releasing the DB file when the Clients normally close the databases,

Any suggestion to correct?
Could sn_conf.cnf file be damaged?  It is located in C:\Sesame\ folder on the Server.

Thanks for listening.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Server not releasing Client
Reply #1 - Jul 7th, 2006 at 8:40pm
Print Post Print Post  
Hello Bob,

Did you have to unlock the DB in order to reconcile to it? Never ever ever unlock an application in order to reconcile to it. It is one of the fastest ways you can get your self in a bad spot.

Quote:
found that sometimes when starting Sesame Server, I would get a message that ports were not connected,

This means that the ports are in use by another Sesame Server. The exact message says "Error: Failed to create a local socket: unknown".

Quote:
Need to close Sesame Server, restart it, unlock the DB file and then do the Reconcile.

No need to unlock the file if you shut the Sesame Server down properly. You should only EVER need to unlock an application if the Server Computer went down suddenly as if from a power outage. Under normal operation unlock should never be used. It's use is to tell the file that Sesame no longer has it open, and the only time you should have to do that is if the Server went down suddenly.


Quote:
Could sn_conf.cnf file be damaged?
No the file is not bad.

If a DB file is loaded by an X command into memory on the Server, or if a DB is used for Extractor(with the open flag) or ODBC, the DB will remain loaded into the Sesame server when the command finishes. This is to allow the next command to be faster. Now you can also get an application to stay loaded into memory on the server if you have a ghost client or a Sesame client suddenly dropped connection. The Server will release the seat under circumstances where it can determine that the client is truly gone but it will not lower the reference count in the DB file. This means that even if no clients are connected that DB file still has a reference count of 1 which keeps it loaded on the Sesame Server.

I think Bill passed out a document at the User's Conference about how to properly Reconcile an Application on the Network. If you need a copy let me know and I will see if I can find it for you.

-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged
 
Bob_Hansen
Senior Member
Members
*****
Offline


WOW, They have the Internet
on computers now!

Posts: 1861
Location: Salem, NH
Joined: Nov 24th, 2002
Re: Server not releasing Client
Reply #2 - Jul 7th, 2006 at 8:59pm
Print Post Print Post  
Thanks for quick reply Ray.
Hoping to get this fixed before Monday and will probably lose your support in the next hour.

I will certainly take a copy of Bill's document.  I know I have it, but will take me weeks to find it Grin

It sounds like I may have 2 problems:
1.  Phantom Sesame Server running
2.  Losing Client network connection to Server


You mentioned a phantom Sesame Server running?  Can you explain how this could be happening.

I am working remotely to my accounts network system, and have sole control.  The office is shut down and no on is there but me.  I am running into this using only 1 Client workstation and 1 Sesame Server on one Server machine.

I have used the Admin tools to close Sesame Server, not using Emergency shutdown.
After Sesame Server goes away, I start it again, and get message about ports not connecting.
After a few moments I start Sesame Server again, and it is OK.
---------------
So it sounds like I am seeing a Client connection being dropped across the network somehow?
That is why Sesame Server still shows DB file in use?  But I also see that the count is down to 0 of 2.
When I think the Client connection is closed, Sesame Server agrees with the count=0, but file is in use.
If I try to reconcile now, I get message that file is in use, this is due to Sesame Server status.  So I must need to close the Sesame Server vs  unlocking the DB file.  Then restart it, and then Reconcile.

So I have some tools to recover from the problem, but the real question is how to stop the problem.
What can be causing a phantom Sesame Server?  Can the Client disconnect be causing this?
If that is the case, then maybe I only have one problem, the Client workstation disconnecting from the Sesame Server.  And if that is happening why does the count go down but the file stays locked?

Hmmmm, really need some more specific help here if possible.

I will stay tuned for great answer to the problem.  Thanks.
  



Bob Hansen
Sesame Database Manager Professional
Sensible Solutions Inc.
Salem, NH
603-898-8223
Skype ID = sensiblesolutions
Back to top
IP Logged
 
Ray the Reaper
Global Moderator
Members
Lantica Support
*****
Offline


The One & The Only

Posts: 2482
Joined: Aug 20th, 2003
Re: Server not releasing Client
Reply #3 - Jul 10th, 2006 at 1:24pm
Print Post Print Post  
Hello Bob,

You will have an e-mail with the document in just a few minutes.

Quote:
After Sesame Server goes away, I start it again, and get message about ports not connecting.

How soon afterwards do you try to restart it? Depending on the OS and setup, the computer may take a few seconds or maybe a few minutes to release the ports after Sesame closes them. I know that there are a few versions of Linux that take roughly 5-10 minutes to release the ports.

Quote:
So it sounds like I am seeing a Client connection being dropped across the network somehow?

That is what this sounds like unless the application is first being loaded by an X command.

Quote:
That is why Sesame Server still shows DB file in use?  But I also see that the count is down to 0 of 2.

Seat count is different then reference count. Reference count is internal and can not be seen. It is the number of people in a given application at a time. Seat Count is how many people are on the entire Sesame Server. The 0 of 2 is the Seat Count.

Quote:
If I try to reconcile now, I get message that file is in use, this is due to Sesame Server status.  So I must need to close the Sesame Server vs  unlocking the DB file.  Then restart it, and then Reconcile.

Yes shutdown the server using Server Admin. Do not unlock the file. Too many people have got in the habit of unlocking far more often then they need to, which leaves the file open to another Sesame Process, which is bad.

Quote:
What can be causing a phantom Sesame Server?

Not sure if you even have a phantom server. It could just be the OS taking a few second to release the ports.

Quote:
Can the Client disconnect be causing this?

Once again it depends on what you actually have. Whether it be a phantom server or a port's not being release problem has yet to be seen.

Quote:
If that is the case, then maybe I only have one problem, the Client workstation disconnecting from the Sesame Server.  And if that is happening why does the count go down but the file stays locked?

The file stays locked because the Server believes it to still be in use. The Seat count which is the number of connections is completely separate from the reference count. Seat count is per server. Reference count is per Application. So the file stays loaded into memory as the files reference count is greater than 0.

I can not stress this enough. You should never ever ever have to unlock an application in order to reconcile to it. If you get an error when reconciling that the application is being served, the first thing you should do is figure out who is using it. You should not immediately unlock it. Unlocking a file allows two separate Sesame Processes to access the same file at the same time which can have catastrophic results.

Here is some more info in addition to the document that I sent you from Bill earlier.

Unlocking is a very serious process that should not be taken lightly. It should only ever need to be done after a power outage or computer failure. When you need to unlock a file, unlock only that one file, not every file that is listed.

Reconciling is another very serious process. Reconcile makes permanent changes to your DB file and when combined with unlock the results can be disastrous. To properly reconcile follow these steps

First create a Backup using Sesame.
Open the Application you are going to be reconciling.
Expand the Application Utilities Folder
Click Backup Application
Save the file under a new name
At this point you can also open your backup to be sure that it is a good backup.

Second shut down the Sesame Server so no one can access the files while you are reconciling.
From a client Click File->Server Administration
The first tab has the options for shutting down the server
This is how you properly shut down the Sesame Server. You should never click Emergency Shutdown except in the case of an actual emergency.

Once the Server is shut down then you can reconcile. Once you are done reconciling, start the Sesame Server back up and connect a client. Open the file you just reconciled and verify that everything is functioning properly.


-Ray
  

Raymond Yoxall Consulting
ray.yoxall@gmail.com
ryoxall@lantica.com
Sesame Applications, Design and Support
Back to top
IP Logged