frib-high-level-controls / save-set-restore

save set restore
MIT License
2 stars 0 forks source link

cannot connect to MASAR if not connected or connection lost #12

Closed shengb closed 8 years ago

shengb commented 8 years ago

If the connection is not established during launching, have to restart CS-Studio to connect to the service. Or if the connection lost, also have to restart the CS-Studio.

jbobnar commented 8 years ago

No need to restart. There is a blue button at the top of the browser, which will fetch the data again. It covers the "not established connection at startup". I will make this automatic, so there will be no need to push the button, when service comes online.

Losing the connection during operation and not being able to reconnect looks like a bug in EPICS V4. I will ask Matej about it, but in the mean time I'll provide you with a workaround for the save-restore application.

shengb commented 8 years ago

The blue button does not work.

An internal error occurred during: "Save and Restore: Load base levels".

java.lang.NullPointerException

2016-02-17 09:22:29.851 SEVERE [Thread 5107] org.csstudio.logging.PluginLogListener (logging) - An internal error occurred during: "Save and Restore: Load base levels". java.lang.NullPointerException at org.csstudio.saverestore.masar.MasarClient.getBaseLevels(MasarClient.java:324) at org.csstudio.saverestore.masar.MasarDataProvider.getBaseLevels(MasarDataProvider.java:106) at org.csstudio.saverestore.ui.Selector.lambda$4(Selector.java:191) at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:52) at org.csstudio.saverestore.SaveRestoreService$SaveRestoreJob.run(SaveRestoreService.java:87) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

jbobnar commented 8 years ago

This should be fixed.

shengb commented 8 years ago

connection problem after lost connection.

Here is steps to reproduce it:

  1. start MASAR;
  2. start CS-Studio;
  3. close MASAR;
  4. restart MASAR;
  5. click the blue button on CS-Studio.

It will report: "Could not load the system list. Masar service not available"

on the console, the message is: 2016-03-17 14:24:11.105 WARNING [Thread 33] org.csstudio.saverestore.masar.MasarClient$MasarChannelRPCRequester (requestDone) - RequestDone for masarService called with status StatusImpl [type=ERROR, message=channel not connected].

jbobnar commented 8 years ago

I finally managed to reproduce this, but I had to do the points 3. and 4. really quickly. If there was more than a second in between it reconnected just fine. This solves the problem that I saw ecd8b5f. Please, update and see if it works for you as well.

shengb commented 8 years ago

yes, it is fixed.