Lost client connection: "Error in relation" errormmessage

Questions, answers, tips and ideas on Servoy Client

Lost client connection: "Error in relation" errormmessage

Postby martinh » Tue Dec 22, 2009 10:25 am

Hi,

I see a strange situation. On my AS I don't see a client connected. AS has not been restarted since yesterday.
This night I kept a Servoy Smart Client open on my computer.
This morning computer was in screensave status.
On the Servoy Client there is a popup message "Error in relation" ( probably the servoy.relation.error error)

I can press thousands of time OK, but that client doesn't stop.
For one moment it seemed to be stopped, but when changing the focus to IE and then giving the focus back to Servoy Client, the message starts again to appear.
So for some reason it looks like the onShow() is involved.
But on the other hand this client is not connected anymore to the AS.
Impossible to stop the client other then the TaskManager.
Also I get same call from my customer.

In the log I see 1 single log that could be involved, but I'm not sure

Code: Select all
2009-12-21 18:40    TaskExecuter[0]    ERROR    com.servoy.j2db.dataprocessing.ClientManager    Error flushing message buffer to client c8ba64bf-1ac2-4f62-b896-dc823e421ede
java.rmi.ConnectIOException: error during JRMP connection establishment; nested exception is: java.io.EOFException
     at sun.rmi.transport.tcp.TCPChannel.createConnection(Unknown Source)
     at sun.rmi.transport.tcp.TCPChannel.newConnection(Unknown Source)
     at sun.rmi.server.UnicastRef.invoke(Unknown Source)
     at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
     at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
     at $Proxy10.isAlive(Unknown Source)
     at com.servoy.j2db.dataprocessing.Zab.Zd(Zab.java:88)
     at com.servoy.j2db.dataprocessing.Zy.run(Zy.java:26)
     at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:6)
     at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
     at java.io.DataInputStream.readByte(Unknown Source)



Is this some issue in Servoy (4.1) ?

And on the other hand, if connection with AS is lost, why doesn't Servoy Client stop immediately stop working?

Martin
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Lost client connection: "Error in relation" errormmessage

Postby martinh » Tue Dec 22, 2009 10:31 am

Additional info:

I see the javaw.exe having 321.508kb of memory.
That seems to be very much.

And when pressing 'OK' on the errormessage, the amount of memory used is increased.
So when pressing a lot on OK, the memory used increases very fast.
That is why the amount of memory used is probably so high

Also when pressing fast lot of times on OK, I see CPU also used > 50%

Can a virus check be a reason also (AVG is checking harddisk every day at 23:00) that connection with AS is lost?
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Lost client connection: "Error in relation" errormmessage

Postby martinh » Tue Dec 22, 2009 10:34 am

More additional info:

The Smart client wasn't visible in the AS "Clients"
When when closing the task on the client PC, I still get the following messages in the log:

Code: Select all
2009-12-22 09:30    ClientExportNotifyListner[1]    ERROR    com.servoy.j2db.util.Debug    Signalling channel lost when reading pings or client export notifies, removing ports: [3000]
java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(Unknown Source)
     at java.io.BufferedInputStream.fill(Unknown Source)
     at java.io.BufferedInputStream.read(Unknown Source)
     at com.servoy.j2db.util.rmi.compressing.Zc.Za(Zc.java:10)
     at com.servoy.j2db.util.rmi.compressing.Zc.read(Zc.java:6)
     at java.io.DataInputStream.readInt(Unknown Source)
     at com.servoy.j2db.util.rmi.Zi.run(Zi.java:15)
2009-12-22 09:30    ClientExportNotifyListner[1]    ERROR    com.servoy.j2db.util.Debug    Signalling channel lost, removing ports: [3000]
java.net.SocketException: Connection reset
     at java.net.SocketInputStream.read(Unknown Source)
     at java.io.BufferedInputStream.fill(Unknown Source)
     at java.io.BufferedInputStream.read(Unknown Source)
     at com.servoy.j2db.util.rmi.compressing.Zc.Za(Zc.java:10)
     at com.servoy.j2db.util.rmi.compressing.Zc.read(Zc.java:6)
     at java.io.DataInputStream.readInt(Unknown Source)
     at com.servoy.j2db.util.rmi.Zi.run(Zi.java:15)


So it looks like AS doesn't really know the correct state either.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Lost client connection: "Error in relation" errormmessage

Postby hpmxxx » Tue Dec 22, 2009 8:49 pm

A customer recognized the same problem on his productive system. But in his case, the errormessage "Fehler in Beziehung" -> "Error in relation" is showed during the work with the smart client. It's also impossible to stop the errormessage other than the TaskManager. In our case, it's not possible to reproduce the error. I don't know, what caused this error until yet. There's no entry on the server log. With customers help, I've got the log of the Java console. But I'm not shure, if this is the error which caused the errormessage. I'll open a case and refer to this topic.

Here's the log:
Code: Select all
com.servoy.j2db.dataprocessing.DataException: No transaction with id= 8e0e6433-66e7-467e-8657-8476d7f0594a
at com.servoy.j2db.dblayer.DBDependentHandler.Za(DBDependentHandler.java:219)
at com.servoy.j2db.persistence.Server.translateSQLException(Server.java:107)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:428)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:317)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:858)
at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
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)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
at $Proxy1.performQuery(Unknown Source)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.createRelatedFoundSets(RelatedFoundSet.java:148)
at com.servoy.j2db.dataprocessing.Zrb.Za(Zrb.java:366)
at com.servoy.j2db.dataprocessing.FoundSet.getRelatedFoundSet(FoundSet.java:1470)
at com.servoy.j2db.dataprocessing.Record.getRelatedFoundSet(Record.java:275)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:164)
at com.servoy.j2db.dataprocessing.Record.get(Record.java:64)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1740)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.gen.c155._c0(sales_document_total:3)
at org.mozilla.javascript.gen.c155.call(sales_document_total)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:126)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:70)
at com.servoy.j2db.scripting.TableScope.get(TableScope.java:7)
at com.servoy.j2db.dataprocessing.FoundSet.getCalculationValue(FoundSet.java:1651)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:41)
at com.servoy.j2db.dataprocessing.FoundSet.get(FoundSet.java:1233)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.get(RelatedFoundSet.java:217)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1429)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1418)
at org.mozilla.javascript.gen.c157._c0(sales_document_total:5)
at org.mozilla.javascript.gen.c157.call(sales_document_total)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3125)
at org.mozilla.javascript.gen.c157.call(sales_document_total)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:126)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:70)
at com.servoy.j2db.scripting.TableScope.get(TableScope.java:7)
at com.servoy.j2db.dataprocessing.FoundSet.getCalculationValue(FoundSet.java:1651)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:41)
at com.servoy.j2db.dataprocessing.Zh.run(Zh.java:3)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:25)
at java.lang.Thread.run(Unknown Source)


Servoy 4.1.4
Server: Windows Server 2003, Java 1.6.0_17, Sybase 10.0.1
Client: Windows XP, Java 1.6.0_15 or 1.6.0_17
Hans-Peter Minnig
MGT AG
hpmxxx
 
Posts: 82
Joined: Wed Sep 10, 2003 5:50 pm
Location: Switzerland

Re: Lost client connection: "Error in relation" errormmessage

Postby lvostinar » Tue Jan 05, 2010 1:47 pm

hpmxxx wrote:A customer recognized the same problem on his productive system. But in his case, the errormessage "Fehler in Beziehung" -> "Error in relation" is showed during the work with the smart client. It's also impossible to stop the errormessage other than the TaskManager. In our case, it's not possible to reproduce the error. I don't know, what caused this error until yet. There's no entry on the server log. With customers help, I've got the log of the Java console. But I'm not shure, if this is the error which caused the errormessage. I'll open a case and refer to this topic.

Here's the log:
Code: Select all
com.servoy.j2db.dataprocessing.DataException: No transaction with id= 8e0e6433-66e7-467e-8657-8476d7f0594a
at com.servoy.j2db.dblayer.DBDependentHandler.Za(DBDependentHandler.java:219)
at com.servoy.j2db.persistence.Server.translateSQLException(Server.java:107)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:428)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:317)
at com.servoy.j2db.dataprocessing.SQLEngine.performQuery(SQLEngine.java:858)
at sun.reflect.GeneratedMethodAccessor241.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)
at sun.rmi.transport.Transport$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Source)
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)
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
at sun.rmi.server.UnicastRef.invoke(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invokeRemoteMethod(Unknown Source)
at java.rmi.server.RemoteObjectInvocationHandler.invoke(Unknown Source)
at $Proxy1.performQuery(Unknown Source)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.createRelatedFoundSets(RelatedFoundSet.java:148)
at com.servoy.j2db.dataprocessing.Zrb.Za(Zrb.java:366)
at com.servoy.j2db.dataprocessing.FoundSet.getRelatedFoundSet(FoundSet.java:1470)
at com.servoy.j2db.dataprocessing.Record.getRelatedFoundSet(Record.java:275)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:164)
at com.servoy.j2db.dataprocessing.Record.get(Record.java:64)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.nameOrFunction(ScriptRuntime.java:1740)
at org.mozilla.javascript.ScriptRuntime.name(ScriptRuntime.java:1679)
at org.mozilla.javascript.gen.c155._c0(sales_document_total:3)
at org.mozilla.javascript.gen.c155.call(sales_document_total)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:126)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:70)
at com.servoy.j2db.scripting.TableScope.get(TableScope.java:7)
at com.servoy.j2db.dataprocessing.FoundSet.getCalculationValue(FoundSet.java:1651)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:41)
at com.servoy.j2db.dataprocessing.FoundSet.get(FoundSet.java:1233)
at com.servoy.j2db.dataprocessing.RelatedFoundSet.get(RelatedFoundSet.java:217)
at org.mozilla.javascript.ScriptableObject.getProperty(ScriptableObject.java:1641)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1429)
at org.mozilla.javascript.ScriptRuntime.getObjectProp(ScriptRuntime.java:1418)
at org.mozilla.javascript.gen.c157._c0(sales_document_total:5)
at org.mozilla.javascript.gen.c157.call(sales_document_total)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:387)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3125)
at org.mozilla.javascript.gen.c157.call(sales_document_total)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:126)
at com.servoy.j2db.scripting.ScriptEngine.executeFunction(ScriptEngine.java:70)
at com.servoy.j2db.scripting.TableScope.get(TableScope.java:7)
at com.servoy.j2db.dataprocessing.FoundSet.getCalculationValue(FoundSet.java:1651)
at com.servoy.j2db.dataprocessing.Record.getValue(Record.java:41)
at com.servoy.j2db.dataprocessing.Zh.run(Zh.java:3)
at com.servoy.j2db.util.TaskExecuter.run(TaskExecuter.java:25)
at java.lang.Thread.run(Unknown Source)


Servoy 4.1.4
Server: Windows Server 2003, Java 1.6.0_17, Sybase 10.0.1
Client: Windows XP, Java 1.6.0_15 or 1.6.0_17


This issue will be fixed in next Servoy 5 release (the error message showing so many times).

@Martin If you can provide a stack from Java console when this happens we can check it out also ( this area has been improved in Servoy 5 so probably it is fixed as well)
Laurian Vostinar
Servoy
lvostinar
 
Posts: 1051
Joined: Tue Feb 19, 2008 10:53 am

Re: Lost client connection: "Error in relation" errormmessage

Postby jcompagner » Thu Jan 07, 2010 11:03 am

The thing we fixed in 5.0.1 (and even better in the coming release of 5.0.2) is that if your client loses the connection with the server for a while
(your laptop goes to sleep or somehow you dont have a network connection anymore) that after that if you come back and most of the time when you are in a tableview
you could got loads of errors because the client wasnt connected yet fully with the server again but the client did try to call out to the server.

Problem is that this fix is not a few lines of code but touches many classes, so back porting this to 4 is not easy doable.

Also i dont know if this is for you guys really the situation? Do you get this after a disconnect from the server?
Besides that on a mac it could behave a little bit different because then we notice a disconnect a bit later then on windows
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8302
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Lost client connection: "Error in relation" errormmessage

Postby martinh » Thu Jan 07, 2010 11:08 am

jcompagner wrote:Also i dont know if this is for you guys really the situation? Do you get this after a disconnect from the server?


As far as I've seen it was screensaver situation so perhaps there was indeed a loss of connection. The situation is very rare.

In case that I'm sure that there is a loss of connection, I see message 'disconnected from server' and perhaps this message is gone after trying to reconnect, but this message about "error in relation" occurs.
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Lost client connection: "Error in relation" errormmessage

Postby jcompagner » Thu Jan 07, 2010 11:16 am

yes if you see "disconnected from the server" then the connection is lost
and then you could result in a "error in relation" dialog in certain cases (because the disconnect wasnt resolved yet for the client)
Johan Compagner
Servoy
User avatar
jcompagner
 
Posts: 8302
Joined: Tue May 27, 2003 7:26 pm
Location: The Internet

Re: Lost client connection: "Error in relation" errormmessage

Postby Nikki Stokes » Sat Mar 06, 2010 12:09 am

We have a similar situation, except that in our case the database connection is transient for security reasons. Our application connects to a number of different databases with the same structure simultaneously, so we can update them at the same time. Some are local e.g. dev, local and others are remote e.g. live1, live2.

The connections to the local ones are permanent, but the remote ones disconnect automatically after a certain period. When this happens I get the repeating error messages, and the only way to stop it is either reconnect the database, which isn't always possible or convenient at the time, or crash the application.

Because the remote databases are built into relations, if the connection is down, the relation triggers an error even if I'm not using the relation anywhere, so I have to remove any reference to the disconnected database from my solution altogether to avoid errors, which is quite impractical.

We're using Servoy 4.1.5. Is there any way to capture the state of a database connection and prevent this error state in the application? Or are my only options to either keep the remote connection open permanently, or upgrade to version 5?
Nikki Stokes
 
Posts: 9
Joined: Wed May 30, 2007 1:28 pm

Re: Lost client connection: "Error in relation" errormmessage

Postby martinh » Sat Mar 06, 2010 3:35 pm

I saw in the releasenotes of Servoy 5.1 that a fix has been made for this issue:

[enh] 263349 "Error in relation" message when having network issues
Martin
------------------------------------------------
Servoy Developer
Version 5.2.10/5.2.13
Java version 1.6 update 31
Database SQL Server 2008 R2
martinh
 
Posts: 857
Joined: Wed May 09, 2007 5:34 pm
Location: Belgium

Re: Lost client connection: "Error in relation" errormmessage

Postby rgansevles » Mon Mar 08, 2010 10:08 am

Nikki,

When Servoy server connects to a database, it assumes the connection is always available.
This has not changed in Servoy 5.

Maybe an option for you is to use a local database (that Servoy connects to) for each remote database and have the 2 databases synchronize via replication when possible.


Martin,

The enhancement you refer to is an improvement for smart client-to-server reconnecting, not between server and database.

Rob
Rob Gansevles
Servoy
User avatar
rgansevles
 
Posts: 1901
Joined: Wed Nov 15, 2006 6:17 pm
Location: Amersfoort, NL


Return to Servoy Client

Who is online

Users browsing this forum: No registered users and 0 guests