indigo-astronomy / indigo

INDIGO is a system of standards and frameworks for multiplatform and distributed astronomy software development designed to scale with your needs.
http://www.indigo-astronomy.org
Other
153 stars 70 forks source link

Indigo server resets if the web interface is left open when the laptop goes to sleep #476

Closed JoelWesleyReed closed 1 year ago

JoelWesleyReed commented 1 year ago

Description

If the indigo control panel web page is left open when the laptop goes to sleep the indigo server will eventually reset. Any tasks being performed by the agents are interrupted and any drivers dynamically loaded via the control panel are not available anymore.

How to reproduce

  1. Open the indigo control panel in a web browser and dynamically load the indigo_ccd_simulator and the indigo_mount_simulator modules. Do not close this web page.
  2. Open the AstroGuider application, connect to the indigo server, start a guiding session using the simulator, guiding agent, etc, and then disconnect/close the AstroGuider application, leaving the guiding session running on the server.
  3. Close the laptop and wait several minutes. The indigo server will reset, the guiding session will stop, and the simulator drivers will not be loaded into the server anymore.

If the indigo control panel web page is closed after step 1 above, the server and guiding session will run indefinitely.

Environment / Versions

Server: Debian GNU/Linux 11 (bullseye) / x86_64 Indigo server version: 2.0-228

Client: Mac M1 Ventura 13.3.1 Browser version: safari 16.4

Indigo server log excerpt

18:12:35.464812 indigo_server: Donuts: threshold = 882.356, max = 65535.000, edge_clipping = 8px
18:12:35.759723 indigo_server: indigo_agent_guider[capture_raw_frame:576]: Drift 0.1376px (0.09783, 0.0968)
18:12:35.759917 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = -0.1343, drift = 0.1343, avg_drift = 0.0000
18:12:35.760030 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = 0.0303, drift = -0.0303, avg_drift = 0.0000
18:12:38.606092 indigo_server: Client upload in 0.009877s
18:12:38.909399 indigo_server: Donuts: threshold = 882.358, max = 62124.000, edge_clipping = 8px
18:12:39.203954 indigo_server: indigo_agent_guider[capture_raw_frame:576]: Drift 0.07044px (0.06498, 0.0272)
18:12:39.204124 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = -0.0695, drift = 0.0695, avg_drift = 0.0000
18:12:39.204240 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = -0.0114, drift = 0.0114, avg_drift = 0.0000
18:12:42.024013 indigo_server: Client upload in 0.010183s
18:12:42.329504 indigo_server: Donuts: threshold = 882.393, max = 62501.000, edge_clipping = 8px
18:12:42.624893 indigo_server: indigo_agent_guider[capture_raw_frame:576]: Drift 0.1311px (0.1307, 0.009809)
18:12:42.625115 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = -0.1160, drift = 0.1160, avg_drift = 0.0000
18:12:42.625227 indigo_server: indigo_guider_reponse(): P = 1.0000, I = 0.5000, response = -0.0609, drift = 0.0609, avg_drift = 0.0000
18:12:45.465444 indigo_server: Client upload in 0.010385s
18:12:45.759946 indigo_server: Donuts: threshold = 882.323, max = 58596.000, edge_clipping = 8px
18:12:47.987703 indigo_server: INDIGO server 2.0-228 built on 2023-04-01T19:46:16-04:00 +
18:12:47.989212 indigo_server: Driver indigo_agent_astrometry 2.0.0.15 loaded
18:12:47.992633 indigo_server: indigo_platesolver_validate_executable: /usr/local/astrometry/bin/solve-field
18:12:47.995966 indigo_server: indigo_platesolver_validate_executable: /usr/local/astrometry/bin/image2xy
18:12:47.999089 indigo_server: indigo_platesolver_validate_executable: /usr/bin/curl
18:12:48.024145 indigo_server: indigo_agent_astrometry: 'Astrometry Agent' attached
18:12:48.033797 indigo_server: Driver indigo_agent_alignment 2.0.0.1 loaded
18:12:48.045645 indigo_server: indigo_agent_alignment: 'Alignment model calibration agent' attached
18:12:48.054191 indigo_server: Driver indigo_agent_mount 2.0.0.14 loaded
18:12:48.075035 indigo_server: indigo_agent_mount: 'Mount Agent' attached
18:12:48.087819 indigo_server: Driver indigo_agent_imager 2.0.0.35 loaded
18:12:48.112192 indigo_server: indigo_agent_imager: 'Imager Agent' attached
18:12:48.135050 indigo_server: Driver indigo_agent_guider 2.0.0.28 loaded
18:12:48.156681 indigo_server: indigo_agent_guider: 'Guider Agent' attached
18:12:48.185571 indigo_server: Driver indigo_mount_asi 2.0.0.10 loaded
18:12:48.191995 indigo_server: indigo_mount_asi: 'Mount ZWO AM' attached
18:12:48.207277 indigo_server: indigo_mount_asi: 'Mount ZWO AM (guider)' attached
18:12:48.217412 indigo_server: Driver indigo_ccd_asi 2.0.0.39 loaded
18:12:48.217520 indigo_server: indigo_ccd_asi: ASI SDK v. 1, 28, 0, 0
18:12:48.217681 indigo_server: indigo_ccd_asi[indigo_ccd_asi:2000]: libusb_hotplug_register_callback ->  OK
18:12:48.218699 indigo_server: Driver indigo_focuser_asi 2.0.0.22 loaded
18:12:48.218781 indigo_server: indigo_focuser_asi: EAF SDK v. 1, 6, 0, 0
18:12:48.218872 indigo_server: indigo_focuser_asi[indigo_focuser_asi:947]: libusb_hotplug_register_callback ->  OK
18:12:48.219367 indigo_server: Driver indigo_ccd_simulator 2.0.0.19 loaded
18:12:48.226838 indigo_server: indigo_ccd_simulator: 'CCD Imager Simulator' attached
18:12:48.235065 indigo_server: indigo_ccd_simulator: 'CCD Imager Simulator (wheel)' attached
18:12:48.242411 indigo_server: indigo_ccd_simulator: 'CCD Imager Simulator (focuser)' attached
18:12:48.252403 indigo_server: indigo_ccd_simulator: 'CCD Guider Simulator' attached
18:12:48.263009 indigo_server: indigo_ccd_simulator: 'CCD Guider Simulator (guider)' attached
18:12:48.270585 indigo_server: indigo_ccd_simulator: 'CCD Guider Simulator (AO)' attached
18:12:48.279795 indigo_server: indigo_ccd_simulator: 'DSLR Simulator' attached
18:12:48.289877 indigo_server: indigo_ccd_simulator: 'CCD File Simulator' attached
18:12:48.294269 indigo_server: Driver indigo_mount_simulator 2.0.0.7 loaded
18:12:48.300928 indigo_server: indigo_mount_simulator: 'Mount Simulator' attached
18:12:48.309165 indigo_server: indigo_mount_simulator: 'Mount Simulator (guider)' attached
18:12:48.865135 indigo_server: Server attached
18:12:48.865483 indigo_server: Server started on port 7624
18:12:48.889423 indigo_server: Service registered as indigo
JoelWesleyReed commented 1 year ago

I have been unable to reproduce this issue in version 2.0-230. It has been fixed.