SORMAS-Foundation / SORMAS-Docker

GNU General Public License v3.0
30 stars 28 forks source link

Notification on SORMAS docker version is KO #341

Closed carolinverset closed 2 years ago

carolinverset commented 2 years ago

In France, we have six SORMAS environments (test, training and production) of which 4 are installed in docker version.

When a task is assigned to a user, he's theoretically informed by email of the task to be done. This mechanism works fine on standard environments but malfunctions on docker environments. No notification is sent.

On the different environments, here are the docker versions installed: Test 1 : v2.27.0 Test 2 : v2.27.2 Training1 : v2.27.1 Production 1 : v2.20.0

@bernardsilenou

bernardsilenou commented 2 years ago

@fhauptmann Please any update on this?

carolinverset commented 2 years ago

@fhauptmann @bernardsilenou in France almost all environments (except one) are installed in docker version. To date, notifications sent when creating tasks do not work on docker environments. No email is received by users. We have developed several types of notifications that would be very useful to us. However, to date, we are unable to use them given this bug which affects docker environments. It would be really urgent to correct this malfunction to allow users to receive the different types of notifications. Thanks for your quick help

carolinverset commented 2 years ago

@fhauptmann @bernardsilenou @olivierleuci I allow myself to return to this subject which is really annoying. Did you support this ticket? It is really a pity that the developments funded by France cannot be used due to a docker compilation problem. I draw your attention to the urgency of this issue because it has been many months now that the teams of the interregional solution have not received any notification, even though the processes have been defined on the basis of notifications which avoid sending emails that are not always secure.

bernardsilenou commented 2 years ago

@carolinverset Thanks for the reminder, we would respond next week.

nliakm commented 2 years ago

@carolinverset Could you please share more information about how you configured the notifications on your systems(featureconfiguration, environments), so we can try to reproduce it? Thank you.


I just checked on a dockerized instance the notification via e-mail from a created task and successfully received an e-mail. Inside .env, i set following configurations:

MAIL_HOST=<IP_OF_INTERNAL_SMTP>
SMTP_PORT=25
SMTP_USER=None
SMTP_PASSWORD=None
SMTP_STARTTLS=false
SMTP_SSL=false
SMTP_ASYNC_SENDING=false
SMTP_AUTH_ENABLED=false
EMAIL_NOTIFICATION_ENABLED=true
LOG_SENDER_ADDRESS=noreply@sormas.netzlink.com
LOG_RECIPIENT_ADDRESS=
LOG_SUBJECT="SORMAS [TEST]: %logger{20} - %m"
SEPARATOR=\;
EMAIL_SENDER_ADDRESS=noreply@sormas.netzlink.com
EMAIL_SENDER_NAME=SORMAS`

Inside featureconfiguration table, I enabled TASK_NOTIFICATIONS and OTHER_NOTIFICATIONS.

At the end I assigned a task from a case to a user with following roles (to trigger an immediate e-mail, I changed the case classification):

carolinverset commented 2 years ago

@nliakm @bernardsilenou @olivierleuci I requested the elements of the env file from the technical teams. I will send them to you as soon as I receive them. Regarding the features configurations table, we disabled "other notification" but enabled "task notification" (I attach the table of our BFC environment in test (docker)) features_config_dockerBFCtest_1.67.1.xlsx

Thank you for your help !

carolinverset commented 2 years ago

@bernardsilenou @nliakm @OlivierLeuci I have received the env files of the interregional solution. The parameter "EMAIL_NOTIFICATION_ENABLED" was on "false" which probably explains the absence of sending notifications. I ask to switch it to "true" to test again.

I am sorry for my repeated messages if the cause is a bad parameterization of the file env.

carolinverset commented 2 years ago

@bernardsilenou @nliakm @OlivierLeuci The technical team has just changed the parameter to true. Unfortunately, still no notifications. I am attaching the contents of the file approx. Do you see anything that could explain the problem?

MAIL_HOST=mta.integra.fr SMTP_PORT=25 SMTP_USER= SMTP_PASSWORD= SMTP_STARTTLS=false SMTP_SSL=false SMTP_ASYNC_SENDING=false SMTP_AUTH_ENABLED=false EMAIL_NOTIFICATION_ENABLED=true LOG_SENDER_ADDRESS=noreply@sormas.netzlink.com LOG_RECIPIENT_ADDRESS= LOG_SUBJECT="SORMAS [TEST]: %logger{20} - %m" SEPARATOR=\; EMAIL_SENDER_ADDRESS=noreply@rec2-ars-sormas.integra.fr EMAIL_SENDER_NAME=SORMAS

nliakm commented 2 years ago

Configuration looks fine for me. One thing that can be tested in the first place is, whether the mail host is reachable from the container. You can check it via telnet inside the SORMAS container:

# connect to container
docker exec -it <ID_OF_SORMAS_CONTAINER> bash
# install telnet
apt update
apt install telnet
# verify mail host is reachable
telnet mta.integra.fr 25
# output should look like this
Trying mta.integra.fr...
Connected to mta.integra.fr.
Escape character is '^]'.

If this test is succesful, we have to involve the developers from SORMAS to help here, so they can help us in tracing the problem inside the application.

carolinverset commented 2 years ago

@bernardsilenou @nliakm @OlivierLeuci The tests have just been carried out on two test environments and the results are as expected

root@588ff1e0b772:/# telnet mta.integra.fr 25 Trying 46.19.126.164... Connected to mta.integra.fr. Escape character is '^]'. 220 mta1.integra.fr ESMTP server

root@a1feac07c78d:/# telnet mta.integra.fr 25 Trying 217.115.165.42... Connected to mta.integra.fr. Escape character is '^]'. 220 mta2.integra.fr ESMTP server

bernardsilenou commented 2 years ago

@nliakm

fhauptmann commented 2 years ago

@carolinverset can you please check the logs of your mail server, if it accepts E-mails from sormas of if mails are rejected? Please telnet to the mail server as above: telnet mta.integra.fr 25 and then type: `MAIL FROM:noreply@rec2-ars-sormas.integra.fr RCPT TO:YOUR_ADDRESS@YOUR_DOMAIN DATA

Subject: Test

This is a test from sormas

. QUIT ` as described here. https://www.thomas-krenn.com/de/wiki/TCP_Port_25_(smtp)_Zugriff_mit_telnet_%C3%BCberpr%C3%BCfen If everything goes right, you should receive an email. Otherwise the mail server will respond with some error message.

carolinverset commented 2 years ago

@bernardsilenou @fhauptmann @nliakm @olivierleuci The technical team managed to rectify the configurations. notifications now sent from docker environments. Thank you very much for your details. We therefore tested another development which is to integrate a hypertext link which directs the user in charge of the task to the object concerned by the task. This link does not appear in the notification. I made a specific ticket several months ago in the github of which here is the link: https://github.com/hzi-braunschweig/SORMAS-Docker/issues/305 A priori, the modification has been merged. Can you tell me the name of the configuration to modify to display the hypertext link?

Thank you so much for your help

fhauptmann commented 2 years ago

Hello @carolinverset,

I'm glad that it is working now. Can you please tell us, what the reason for not working configuration was, so that others may benefit from that knowledge?

Best, Frank

carolinverset commented 2 years ago

@fhauptmann hallo, I just asked for feedback from the technical teams. I will send you the items as soon as I receive them. A bientôt

carolinverset commented 2 years ago

@fhauptmann the additional action performed by the technical team is the restart of the server.

fhauptmann commented 2 years ago

Hi @carolinverset, thanks. When changing the properties a restart needs to be done for SORMAS to read the properties file.

bernardsilenou commented 2 years ago

@fhauptmann @carolinverset observed that notifications sent at the time of multiple of 10, ie 12:00, 12:10, 12, 20, 12, 45 etc are not sent. However, the notification that the task is overdue is sent at the right time. We may need to test this on other serve also to diagnose the cause.