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 2017-12-06 13:59:36

I.Markus
Member
Registered: 2017-02-23
Posts: 4

Automatic action - mailgate CLI mode doesn't work

Hello fellow GLPI users,

Back when I was running GLPI 0.83 on Ubuntu 14.04.04 using PHP5 I was able to run "sudo /usr/bin/php5 /usr/share/glpi/front/cron.php &>/dev/null" this line and add it to the crontask "*/10 * * * * /usr/bin/php5 /usr/share/glpi/front/cron.php &/dev/null" and this worked fine.

Now I'm running GLPI 9.2 on Ubuntu 16.04.2 using PHP7 when I run "sudo /usr/bin/php /var/www/html/glpi/front/cron.php &/dev/null" I get:
"
/null
[1] 1750
bash: /dev/null: Permission denied
"

because I'm not sure I also tried "sudo /usr/bin/php7.0 /var/www/html/glpi/front/cron.php &/dev/null" And I got:
"
/null
[1] 1722
bash: /dev/null: Permission denied
"
I also tried it as root user, same results.
I checked the permissions on /dev/null and they seem to be correct (also tried rebooting the device).

Thanks for reading my post, it would be very helpful if anyone can help me resolve this problem, looking forward to your reactions.

Offline

#2 2017-12-06 15:43:21

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

Re: Automatic action - mailgate CLI mode doesn't work

It would be better if you contact a linux administrator. You did not really know what you do.

http://wiki.glpi-project.org/doku.php?i … ig:crontab


> missing
&>/dev/null


if you do this "command" & "command" this a complete different meaning
in this case the system try to run both command and the second command.... "/dev/null" https://en.wikipedia.org/wiki/Null_device


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

#3 2017-12-06 16:57:54

I.Markus
Member
Registered: 2017-02-23
Posts: 4

Re: Automatic action - mailgate CLI mode doesn't work

Thanks for your quick reply,

My mistake I did not notice I was missing the ">" symbol.

When I run it now its just stuck without any errors, in the GLP browser I get the message "Next run    Running" and it stays that way forever.

Offline

#4 2017-12-06 17:23:21

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

Re: Automatic action - mailgate CLI mode doesn't work

2. Go into the Automatic action - quedmail Or something reset it if currently running, and run it. If it is currently running and is in stuck nothing could work so cancel it.


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

#5 2017-12-13 11:03:44

I.Markus
Member
Registered: 2017-02-23
Posts: 4

Re: Automatic action - mailgate CLI mode doesn't work

Under Automatic actions you can find the mailgate (mailgate is the one that retrieves emails), when I run it in CLI mode it gets stuck on "Running". When I cancel the stuck current run it will get stuck agian in the next run. It only works when I set the mode to GLPI, but I want GLPI to retrieve emails even when nobody is logged in to the system. So I need to use the CLI mode set at a run frequency of 10 minutes.

Agian it worked fine on my last GLPI server running with php5 on ubuntu 14.

Does anyone have any more ideas I can try? Any help is appreciated.

Offline

#6 2017-12-13 22:06:23

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

Re: Automatic action - mailgate CLI mode doesn't work

Stop it and run cli command in linux bash in give us the output

/usr/bin/php7 /var/www/html/glpi/front/cron.php

If there is nothing give us the glpi logs
if there is nothing activate debug mode and try again and give us the glpi logs

each time you have to stop the stuck job


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

Board footer

Powered by FluxBB