SORMAS-Foundation / SORMAS-Project

SORMAS (Surveillance, Outbreak Response Management and Analysis System) is an early warning and management system to fight the spread of infectious diseases.
https://sormas.org
GNU General Public License v3.0
293 stars 142 forks source link

[SurvNet] Sending cases to SurvNet randomly fails #11549

Closed adinaflorea9 closed 1 year ago

adinaflorea9 commented 1 year ago

Problem Description

On the release instance https://test1402.sormas.netzlink.com/ sending cases to the external surveillance tool SurvNet randomly leads to an error and the case is not sent.

Steps to Reproduce

  1. Log in with the Admin+NatUser into https://test1402.sormas.netzlink.com/;
  2. In the cases directory, open multiple cases and try to send them to SurvNet.

Actual Behavior

Some of the cases can be sent, some of them can not and an error appears: image

Expected Behavior

All of the cases should be successfully sent to SurvNet.

Screenshots

System Details

Additional Information

Logs from the server: Converter_1402.txt

SurvnetError.txt

adinaflorea9 commented 1 year ago

I was able to reproduce this issue today on https://test-de2.sormas.netzlink.com/ - it was reproducible when trying to send cases to the reporting tool and the cases were created by the automation admin (so created via API calls).

carina29 commented 1 year ago

I'll attach the analysis sent to Alicia Raber from Netzlink. Based on her answer (how she creates cases/events) we will know if this ticket can be closed or further steps should be done.

The following cases were analyzed: 282ce215-e87c-42f2-8b01-298a567a1917 | 2023-02-23 11:56:23.04 3efc7679-e2f1-448b-a6ca-8b5a1c9c6186 | 2023-02-23 11:58:19.37 fb72a16f-c6a6-4d88-b50a-34e3fb166ec0 | 2023-02-23 11:58:42.174 SOFEND-KDJ5MI-JXIVAA-PJI6KCLU | 2023-02-23 14:00:55.519 00491f43-6c22-4ead-8431-09871bd53d37 | 2023-02-23 14:27:58.1 7669d0f3-fdfd-484a-857d-269e3bd02e6a | 2023-02-23 14:29:52.664 0e6a6ffe-a615-4b02-80ee-40f7f3e0dd83 | 2023-02-23 14:31:46.868 1c032f07-c675-4bc3-98ef-d7d8c8c8b1d5 | 2023-02-23 14:33:40.978 8fe148e9-a9ba-4fd9-b871-50ed1f894944 | 2023-02-23 15:17:31.069 40d98804-d80b-4a9e-bd1b-ae4d4fccf00a | 2023-02-23 15:19:25.21 03812208-87c9-4117-924f-176931578e96 | 2023-02-23 15:21:19.288 fac1ba77-30a4-4b9a-9300-8240d7c20a96 | 2023-02-23 15:23:13.224 XNTOBC-TUNMSD-GCWYOC-O6RF2G7I | 2023-02-23 16:24:11.036 U3TTFI-BYEYIQ-2LOFHZ-CSS72LGE | 2023-02-24 11:46:38.568

In the above list there are 2 types of Uuids: 1) Cases/events with shorter Uuids ( like SOFEND-KDJ5MI-JXIVAA-PJI6KCLU) These cases/events are created by a logged in Admin user ( Admin user will be the reporting user) and the Sending to Survnet is working without problems. image

2) Cases/events with a longer Uuid (282ce215-e87c-42f2-8b01-298a567a1917): These cases/events with the long uuids were created by Rest AUTO ( which means that is not a normal reporting user logged in but a call is made from a Rest interface). For these cases/events which have as reporting user REST Auto and have those long uuids, the sending to Survnet Tool is failing and those cases/events were never sent to Survnet. I’ve checked the logs and it looks like one of the conversions is throwing an error because the uuid is too long ( is not a usual uuid which is shorter). image

  1. If the creation of cases/events is done with a logged in user ( the reporting user will be a logged in user) the cases/events will be sent without problems to the Reporting tool ( the uuids will have normal size).

    If the creation of cases/ events is done with reporting user REST Auto, it should be investigated why those cases/events are created with those long uuids or change some restrictions in Survnet project in order to accept the cases/events with longer Uuids.

carina29 commented 1 year ago

Update: The cases/events with the long uuids ( which can not be sent to the Reporting tool) were created by the Automation team on purpose in order to be easier to differentiate the cases/events created by them from the already existing cases/events created by a reporting user. Since the cases/events created by a logged in reporting user can be sent to the Reporting tool there is no bug which needs to be fixed.

I've talked with Alicia Raber from Netzlink ( the reporter of this problem) and she agreed that we can close this ticket.