Issue #1229: Server crash - Mismatch client-server protocol prefix

Type: Bug ReoprtVersion: 2.5.2Priority: HighStatus: ClosedReplies: 4

We've been having a problem where our ObjectDB server goes unresponsive every 2 days or so.  I've reviewed the server-side logs, and there are no events logged shortly before the crash.  Once the server gets in this state, it is unresponsive to bin/ restart; I have had to reboot the entire server on which it's running.  The only recorded symptom is a client-side error (which fortunately gets auto-mailed to me):

[ObjectDB 2.5.2] javax.persistence.PersistenceException
Mismatch client-server protocol prefix (error 523)
        at com.objectdb.jpa.JpaQuery.getSingleResult(
        at org.apache.jsp.status_jsp._jspService(
        at org.apache.jasper.runtime.HttpJspBase.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.jasper.servlet.JspServletWrapper.service(
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(
        at org.apache.jasper.servlet.JspServlet.service(
        at javax.servlet.http.HttpServlet.service(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at com.fastmodel.fastplan.db.EntityManagerFactory.doFilter(
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(
        at org.apache.catalina.core.StandardWrapperValve.invoke(
        at org.apache.catalina.core.StandardContextValve.invoke(
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(
        at org.apache.catalina.core.StandardHostValve.invoke(
        at org.apache.catalina.valves.ErrorReportValve.invoke(
        at org.apache.catalina.valves.RemoteIpValve.invoke(
        at org.apache.catalina.valves.AccessLogValve.invoke(
        at org.apache.catalina.core.StandardEngineValve.invoke(
        at org.apache.catalina.connector.CoyoteAdapter.service(
        at org.apache.coyote.http11.AbstractHttp11Processor.process(
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(
        at java.util.concurrent.ThreadPoolExecutor.runWorker(
        at java.util.concurrent.ThreadPoolExecutor$
Caused by: com.objectdb.o.UserException: Mismatch client-server protocol prefix
        at com.objectdb.o.MSG.d(
        at com.objectdb.o.SCO.b(
        at com.objectdb.o.NTS.z(
        at com.objectdb.o.CLS.S(
        at com.objectdb.o.CLS.Q(
        at com.objectdb.o.CST.U6(
        at com.objectdb.o.QRR.g(
        at com.objectdb.o.QRR.f(
        at com.objectdb.jpa.JpaQuery.getSingleResult(
        ... 27 more


I realize this isn't a lot to go on; I can provide a snapshot of our database via private channel if you would like.


Since you are probably using the same ObjectDB version on the client and the server, the stack trace indicates an issue in communication between the client and the server, which could possibly happen due to an unknown server failure.

The database file will not help here, but just verify by running the Doctor that it is healthy.

A thread dump of the server could be useful if you had a way to obtain it.

In addition, you just reported another issue today. Is it just a coincidence that both issues started now? Maybe the other issue is the cause of this server problem? Maybe both are result of a change in your system or upgrading an ObjectDB version?

ObjectDB Support

The connection between the two issues is that I discovered issue #206 while examining the logs, hunting for a clue regarding this issue.  I had upgraded my production server to 2.5.2 on 8/15 (from 2.3.something).  The issue I reported as #206 started within a few days, and occurred in clusters, but its occurrence never immediately preceded a crash.  The crashes didn't occur until 8/29.  Approximate failure times were 8/29 @ 11:54 AM, 8/30 @ 7:41 PM, 9/1 @ 12:15 PM (all times PDT).

Other issues I noted in the log were some out-of-memory errors (although I'm running with -Xmx1024m) and some issues with a particular index, which was also flagged when I ran the database doctor on a backup of the production database.  I will be taking the production site offline tonight so I can run a repair on that issue.

I'm attaching all server logs since the upgrade.


All these errors may be related. Please report again after repairing the index and increasing the heap size (-Xmx1024m may not be sufficient).

ObjectDB Support

Do you still see this error message after eliminating the memory and index issues?

Update: Apparently this exception is the result of an OutOfMemoryError exception, and allocating sufficient RAM solves the problem. We should check how future versions of ObjectDB can at least produce a better error message in this case.

ObjectDB Support