You are not logged in.

Announcement

 Téléchargez la dernière version stable de GLPI      -     Et vous, que pouvez vous faire pour le projet GLPI ? :  Contribuer
 Download last stable version of GLPI                      -     What can you do for GLPI ? :  Contribute

#1 2018-07-03 11:31:02

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Notification mail stay in queue

Hi everybody,

I've go a problem with notification mail in 9.2.3 new installation.

I've seen lot of same issues on the net and have tried some actions but with no success...

I've got in my crontab the line : */5 * * * * /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null (path of cron.php is ok)
I've put 5 minutes because some people had the problem with * and after changing it by launching every 5 minutes,it goes well. Not for me...:-(

If I launch the command manually with force mailgate :
[root@srv-web ~]# /usr/bin/php /var/www/html/glpi/front/cron.php --debug --force mailgate

I had an error telling me that apc.enable_cli was on off.
I add the line "apc.enable_cli=1" in /etc/php.d/50-apc.ini and I don't have the problem anymore.

But when I launch manually the command, no error but the mail still in the queue.

If I'm going on GLPI interface, select mails and send them manually, it's working.

Can somebody help me please?

Thank you

Offline

#2 2018-07-03 11:35:35

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

make sure queuednotification task is in CLI mode.

check next time to run, status, and last time


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#3 2018-07-03 13:21:24

machadomall
Member
From: Brazil, Brasilia, DF
Registered: 2011-10-30
Posts: 208

Re: Notification mail stay in queue

Good Morning,

A basic question, what is the version of your PHP?
Notice if the folder is correct.

Ex: /usr/bin/php, /usr/bin/php5, /usr/bin/php7.0 and so on.

Att,


Márcio Machado
Brasília-DF / Brasil

Offline

#4 2018-07-04 08:46:34

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Hello,

Thank you for your answers.

How can I check if I am in CLI mode please ?

My PHP version is : PHP 7.2.7 (cli) (built: Jun 20 2018 08:21:26) ( NTS )
My path is correct : /usr/bin/php and it's the path in my cron.

Thank you

Offline

#5 2018-07-04 09:47:50

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

Setup》automatic task 》queuednotification


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#6 2018-07-04 10:16:32

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Thanks,

It was set to GLPI.
I changed to CLI nothing has changed...
When I send the command /usr/bin/php /var/www/html/glpi/front/cron.php or /usr/bin/php /var/www/html/glpi/front/cron.php --debug --force mailgate I've got nor error but mails stay in the queue.

I've restarted apache in case of ...

Offline

#7 2018-07-04 11:54:13

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

mailgate  collects emails send to glpi

queudnotifications sends email from glpi

what are we talking about ? mailgate/notifications ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#8 2018-07-04 12:09:32

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Sorry, I didn't get that.
I'm talking about notifications, mail sent from GLPI.

Offline

#9 2018-07-04 12:39:11

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

I've tried the command : /usr/bin/php /var/www/html/glpi/front/cron.php --debug --force queuednotification

Result is :
Externe #1 : Rien à lancer /Nothing to launch

I've still got 3 mails to send in the queue

Last edited by amnesyXIII (2018-07-04 12:40:49)

Offline

#10 2018-07-04 12:59:53

KKAdmin
Member
From: Germany
Registered: 2010-03-05
Posts: 959

Re: Notification mail stay in queue

amnesyXIII wrote:

/Nothing to launch

You have to change the job configuration in the web interface from run mode "GLPI" to run mode "CLI".
You can do this "setup" -> "automatic actions" -> the job you want to change  example "queuednotification"


You can mark this threat as [resolved] in subject of your threat. (This is only available edit of the first post.) It is good for users who help others to quickly see which post is still open.
##############################################
GLPI 9.3.3

Offline

#11 2018-07-04 13:18:05

machadomall
Member
From: Brazil, Brasilia, DF
Registered: 2011-10-30
Posts: 208

Re: Notification mail stay in queue

@amnesyXIII

Good Morning,

Notice here "/usr/bin/php" depending on the version of your php that changes.
Version php7.0 would look like this "/usr/bin/php7.0"

Att,


Márcio Machado
Brasília-DF / Brasil

Offline

#12 2018-07-04 14:53:53

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Good morning all,

@ KKAdmin, I've already done this after LaDenrée told me to. It has not resolve the problem.

@ machadomall, yes my php version is 7.2.7 bit when I look in the usr/bin folder, I only have the executable file "php". There's no other.

When I look the task logs in GLPI interface, I see "Action ended, nothing to do" or "Action ended, process complete". But mails still in the queue.

Thank all for your help, I hope we'll find :-)

Offline

#13 2018-07-04 15:48:04

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

1) check if mail in queue are delayed (entity setting can delay mail sending)  ( creation date, planned send date,)

2) check timezones :  glpi and server should be in the sae timezone setting


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#14 2018-07-04 15:51:12

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

If I'm going on GLPI interface, select mails and send them manually, it's working.

do you mannually send with 
-administration>queued notifications>actions>send
or
-setup>automatic actions>[queuednotifications]>execute ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#15 2018-07-04 16:35:44

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

If I execute threw setup>automatic actions>[queuednotifications]>execute, mails are not send.
If i execute threw administration>queued notifications>actions>send , mails are sent

Offline

#16 2018-07-04 16:37:37

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

For the time zone :

Time zone of my server :
Time zone: Europe/Paris (CEST, +0200)

I don'f find the time zone in GLPI.
I had problems at the installation with GLPI on UTC time. I've added "date.timezone = Europe/Paris" in Date section in PHP.ini

Offline

#17 2018-07-05 16:16:42

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Hello all,

I still have the same issue.
Do you have any idea ?

Thanks a lot

Offline

#18 2018-07-05 16:26:06

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

did you check "Expected send date" of these 3 mails ?


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

#19 2018-07-05 17:08:57

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

For these 3 mails, it's yesterday, the time I created the following in the ticket.
It's a test ticket to debug that.

For the others tickets I select them and send them manually for the moment.

Offline

#20 2018-07-05 17:24:28

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Certainly important thing : Number of tries : 0 ...

Offline

#21 2018-07-06 15:07:39

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Hi all,

I really need help on this issue..thank you.
To summurize :
ISSUE : The notification mail are not sent by GLPI

- The queuednotification task is set to "CLI"
- In my crontab (add by crontab -e) I've got the command : * * * * * /usr/bin/php /var/www/html/glpi/front/cron.php &>/dev/null
- The executable php is "php" and in the path /usr/bin/php
- When I send the command manually : no error but mail are not sent
- When I double click on one of these mails,
      - the "Expected send date" is set to the moment the action has been done on GLPI.
      - The number of send try is always 0
- The time Zone of my server is Europe/Paris (CEST, +0200)
- I set the time zone for GLPI in php.ini to date.timezone = Europe/Paris
- If I execute threw setup>automatic actions>[queuednotifications]>execute, mails are not send.
- If i execute threw administration>queued notifications>actions>send , mails are sent

Can someone help me please ?
Thanks a lot

Offline

#22 2018-07-06 17:25:24

KKAdmin
Member
From: Germany
Registered: 2010-03-05
Posts: 959

Re: Notification mail stay in queue

Did you already test send of mail ? In the mail settings "Send test mail"


You can mark this threat as [resolved] in subject of your threat. (This is only available edit of the first post.) It is good for users who help others to quickly see which post is still open.
##############################################
GLPI 9.3.3

Offline

#23 2018-07-06 17:32:18

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Yes, and it's working.

Offline

#24 2018-07-06 17:55:10

amnesyXIII
Member
Registered: 2018-07-03
Posts: 14

Re: Notification mail stay in queue

Problem solved !

My task queuednotification was always on status Running on the interface.
We have checked the DB and there is a status waiting.

I've succedded to stop the task and the it came on status waiting with next execution one minute later.

Now it's launched every minute and it's working ..

Thank you everybody !
Have a nice week end

Offline

#25 2018-07-06 19:04:58

LaDenrée
HELPER
Registered: 2012-11-19
Posts: 6,146

Re: Notification mail stay in queue

post #2  :

check next time to run, status, and last time

....!


Trouver la panne avant de réparer...
GLPI10.0.10 (ubuntu 22.04 PHP8.1  Mariadb10.6 ) plugins : comportements 2.7.2 reports 1.16.0 formcreator 2.13.8, datainjection 2.13.4 fields 1.21.6

Offline

Board footer

Powered by FluxBB