Headless Client Licensing

Same thing happened this morning, grateful for any suggestions that would assist me with trouble shooting.
It happens about once a week, can’t yet see a pattern. The only resolution I’ve found is to kick everyone off and restart Servoy

It’s only the creation of HC that’s affected.
No problems with new SC or WC I can log in and use it normally.

Plenty of memory available -
System Information
Heap memory: allocated=549692K, used=296248K, max=1520448K
None Heap memory: allocated=96160K, used=95872K, max=163840K

From the Servoy log

2011-07-28 07:53:35,583 ERROR [pool-26-thread-497] com.servoy.j2db.util.Debug - Could not load record
2011-07-28 07:53:35,583 ERROR [pool-26-thread-497] com.servoy.j2db.util.Debug - Throwable
com.servoy.j2db.persistence.RepositoryException: Client is not registered with the server.
	at com.servoy.j2db.dataprocessing.Zu.Za(Zu.java:54)
	at com.servoy.j2db.dataprocessing.Zu.performQuery(Zu.java:349)
	at com.servoy.j2db.dataprocessing.RowManager.getRows(RowManager.java:447)
	at com.servoy.j2db.dataprocessing.FoundSet.createRecord(FoundSet.java:2421)
	at com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:1861)
	at com.servoy.j2db.dataprocessing.FoundSet.getRecord(FoundSet.java:1832)
	at com.servoy.j2db.dataprocessing.FoundSet.loadExternalPKList(FoundSet.java:1543)
	at com.servoy.j2db.dataprocessing.FoundSet.js_loadRecords(FoundSet.java:979)
	at sun.reflect.GeneratedMethodAccessor548.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:179)
	at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:353)
	at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:3666)
	at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:2680)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:166)
	at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
	at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3135)
	at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:165)
	at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:476)
	at com.servoy.j2db.FormController.executeFunction(FormController.java:3977)
	at com.servoy.j2db.FormController.executeFunction(FormController.java:3858)
	at com.servoy.j2db.plugins.ClientPluginAccessProvider$MethodExecutor.run(ClientPluginAccessProvider.java:548)
	at com.servoy.j2db.server.headlessclient.SessionClient.invokeAndWait(SessionClient.java:1170)
	at com.servoy.j2db.plugins.ClientPluginAccessProvider$1.run(ClientPluginAccessProvider.java:443)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

This was the preceding error, don’t know if it’s relevant.

2011-07-28 07:08:22,330 WARN [ContainerBackgroundProcessor[StandardEngine[Catalina]]] com.servoy.j2db.util.Debug - Flushing foundset with no selection: FoundSet[Table:invoice_notes,Size: 5,Relation: invoices_to_invoice_notes,CachedRecords: 5,SELECTED INDEX: 0]
java.lang.RuntimeException: Flushing foundset with no selection
	at com.servoy.j2db.dataprocessing.FoundSet.flushAllCachedItems(FoundSet.java:1800)
	at com.servoy.j2db.FormController.destroy(FormController.java:1815)
	at com.servoy.j2db.FormManager.removeAllFormPanels(FormManager.java:860)
	at com.servoy.j2db.FormManager.destroySolutionSettings(FormManager.java:432)
	at com.servoy.j2db.server.headlessclient.WebFormManager.destroySolutionSettings(WebFormManager.java:348)
	at com.servoy.j2db.FormManager.propertyChange(FormManager.java:155)
	at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(Unknown Source)
	at java.beans.PropertyChangeSupport.firePropertyChange(Unknown Source)
	at com.servoy.j2db.J2DBGlobals.firePropertyChange(J2DBGlobals.java:90)
	at com.servoy.j2db.ClientState.closeSolution(ClientState.java:1140)
	at com.servoy.j2db.server.headlessclient.WebClient.closeSolution(WebClient.java:656)
	at com.servoy.j2db.ClientState.shutDown(ClientState.java:1002)
	at com.servoy.j2db.server.headlessclient.SessionClient.shutDown(SessionClient.java:318)
	at com.servoy.j2db.server.headlessclient.WebClient.shutDown(WebClient.java:561)
	at com.servoy.j2db.server.headlessclient.SessionClient.valueUnbound(SessionClient.java:425)
	at org.apache.catalina.session.StandardSession.removeAttributeInternal(StandardSession.java:1654)
	at org.apache.catalina.session.StandardSession.expire(StandardSession.java:756)
	at org.apache.catalina.session.StandardSession.isValid(StandardSession.java:592)
	at org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:680)
	at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:665)
	at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1316)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1601)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1610)
	at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1590)
	at java.lang.Thread.run(Unknown Source)

This is on a Win 2008 R2 server, with Java 1.6.0_24-b07 (32 bit)

that last one is not really relevant for this, thats just an check we do. But shouldn’t be related at all to your clients.

How many clients are reported on the admin page when that happens?

What i don’t get is that it seems to be on a client that is deregistered from the server. But the loading of the solution and maybe even the onload and so on do work fine?
Because what goes wrong is long after that its an execute of a method in the active client.

And that is just what i can’t directly see or understand, if you do isValid() on the client, or you get it with getClient(clientid) then that client should be valid and registered.

can you log the clientid on which you call that method? And look if that clientid is really not there anymore on the admin server? (when clicking on a client in the clients page you get a lot of info including the client id)

Appreciate the response,

jcompagner:
How many clients are reported on the admin page when that happens?

Not more than 20 WC, sometimes none at all, and plenty of free RAM. On this occasion there was just the one HC, the one set up to run CRON jobs which call a second HC to run some housekeeping.

jcompagner:
can you log the clientid on which you call that method? And look if that clientid is really not there anymore on the admin server? (when clicking on a client in the clients page you get a lot of info including the client id)

The client matching the client id is not running when I get this error, only the CRON HC is visible on the Clients list. It fires a cron every 10 minutes which tries to launche a second HC I get the Can’t register client error.

Most of the time these two HCs play nicely together.