channelaccess / ca

Java Channel Access Client Implementation
GNU General Public License v3.0
12 stars 5 forks source link

Library does not interoperate with CA in EPICS 7.0 - "client version too old" #58

Closed simondelabici closed 4 years ago

simondelabici commented 4 years ago

This was reported by one of PSI's beamline scientists when working with the MATLAB wrapper to CA.

Here is the fault report:

The problem seems that the Matlab channel access client has problem to communicate with an EPICS7 IOC on sf-ecmc-04.psi.ch

Sometimes Franziskas script just works but sometimes it just hangs when opening the connection to the IOC

What can be seen on the IOC and what we see on the client side is that there is a message that the client version is too old.

On the IOC shell:

sf-ecmc-04> CAS: request from 129.129.145.206:54086 => CAS: Client version too old CAS: Request from 129.129.145.206:54086 => cmmd=23 cid=0x0 type=0 count=0 postsize=0 CAS: Request from 129.129.145.206:54086 => available=0x0 N=0 paddr=0x7f66c800d968

On the client side - if the connection is established and the caget works:

Jan 30, 2020 10:17:05 AM org.epics.ca.impl.ResponseHandlers exceptionResponse WARNING: Exception message reported, code: DEFUNCT, message: 'CAS: Client version 0 too old'.

simondelabici commented 4 years ago

Further comments from PSI tracker with proposed solution.

This is what I determined so far:

  • I was able to replicate the problem: the PSI Java CA client library protocol does seem to be rejected by the latest (V7) versions of the EPICS CA server.
  • I can see in the EPICS V7x base code the test which fails the protocol version check and which causes the CA server to reject the communication with the PSI library. However, it seems to me the PSI library protocol should be advanced enough to have passed this test. That has led me to look back inside the PSI CA library to see whether there is some lurking bug.
  • I may, perhaps have found something... I don't know the code well enough to be sure
  • I just attached a new CA jar file to this tracker ('ca-1.2.3-dev-all.jar') which allowed the unit test which failed earlier to run to completion. Could you try it in MATLAB and see whether that helps.
simondelabici commented 4 years ago

Solution ratified by Franziska...

It works with Matlab! ... cool! I checked several times the same channel: worked. All 9 channels together: worked without error- or warning-message. ... Franziska