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 2024-02-14 08:46:45

Serpher
Member
Registered: 2022-09-23
Posts: 8

GLPI doesn't send any notification about expired certificate

GLPI (10.0.11) does not create and send notifications about expired certificates.
The Cron job is working but still to no avail. I tried to copy cron.php from 10.0.3, still nothing. This hasn't been working from at least version 10.0.6.


crontab:
* * * * * /usr/bin/php8.2 /var/www/html/front/cron.php certificate &> /dev/null

I tried this command:
/usr/bin/php8.2 -d error_reporting=E_ALL -d display_errors=on /var/www/html/front/cron.php --force certificate --debug && echo $?
External #1: Run certificate
0

cron.log
External #1: Run certificate
2024-01-30 11:30:01 [@helpdesk]
Can't lock DB

GLPI 10.0.11 ( => /var/www/html)
Installation mode: TARBALL
Current language:pl_PL

Operating system: Linux helpdesk 6.1.0-17-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.69-1 (2023-12-30) x86_64
PHP 8.2.7 apache2handler (Core, FFI, PDO, Phar, Reflection, SPL, SimpleXML, Zend OPcache, apache2handler, apcu, bz2, calendar,
ctype, curl, date, dom, exif, fileinfo, filter, ftp, gd, gettext, hash, iconv, intl, json, ldap, libxml, mbstring, mysqli,
mysqlnd, openssl, pcre, pdo_mysql, posix, random, readline, session, shmop, sockets, sodium, standard, sysvmsg, sysvsem,
sysvshm, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, zlib)
Setup: max_execution_time="30" memory_limit="128M" post_max_size="8M" safe_mode="" session.save_handler="files"
upload_max_filesize="2M" disable_functions=""
Software: Apache/2.4.57 (Debian) (Apache/2.4.57 (Debian) Server at helpdesk.domain.pl Port 443
)
Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123.0
Server Software: mariadb.org binary distribution
Server Version: 10.6.16-MariaDB-1:10.6.16+maria~deb11
Server SQL Mode: STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Parameters: glpi@localhost/helpdesk
Host info: Localhost via UNIX socket

PHP version (8.2.7) is supported.PHP version (8.2.7) is supported.
Sessions configuration is OK.Sessions configuration is OK.
Allocated memory is sufficient.Allocated memory is sufficient.
mysqli extension is installed.mysqli extension is installed.
Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.Following extensions are installed: dom, fileinfo, filter, libxml, json, simplexml, xmlreader, xmlwriter.
curl extension is installed.curl extension is installed.
gd extension is installed.gd extension is installed.
intl extension is installed.intl extension is installed.
zlib extension is installed.zlib extension is installed.
The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.The constant SODIUM_CRYPTO_AEAD_XCHACHA20POLY1305_IETF_NPUBBYTES is present.
Database engine version (10.6.16) is supported.Database engine version (10.6.16) is supported.
No files from previous GLPI version detected.No files from previous GLPI version detected.
The log file has been created successfully.The log file has been created successfully.
Write access to /var/www/html/files/_cache has been validated. Write access to /var/www/html/files/_cron has been validated. Write access to /var/www/html/files has been validated. Write access to /var/www/html/files/_dumps has been validated. Write access to /var/www/html/files/_graphs has been validated. Write access to /var/www/html/files/_lock has been validated. Write access to /var/www/html/files/_pictures has been validated. Write access to /var/www/html/files/_plugins has been validated. Write access to /var/www/html/files/_rss has been validated. Write access to /var/www/html/files/_sessions has been validated. Write access to /var/www/html/files/_tmp has been validated. Write access to /var/www/html/files/_uploads has been validated.Write access to /var/www/html/files/_cache has been validated.
Write access to /var/www/html/files/_cron has been validated.
Write access to /var/www/html/files has been validated.
Write access to /var/www/html/files/_dumps has been validated.
Write access to /var/www/html/files/_graphs has been validated.
Write access to /var/www/html/files/_lock has been validated.
Write access to /var/www/html/files/_pictures has been validated.
Write access to /var/www/html/files/_plugins has been validated.
Write access to /var/www/html/files/_rss has been validated.
Write access to /var/www/html/files/_sessions has been validated.
Write access to /var/www/html/files/_tmp has been validated.
Write access to /var/www/html/files/_uploads has been validated.

Web server root directory configuration is not safe as it permits access to non-public files. See installation documentation for more details.Web server root directory configuration is not safe as it permits access to non-public files. See installation documentation for more details.
The following directories should be placed outside "/var/www/html": ‣ "/var/www/html/files" ("GLPI_VAR_DIR") You can ignore this suggestion if your web server root directory is "/var/www/html/public".The following directories should be placed outside "/var/www/html":
‣ "/var/www/html/files" ("GLPI_VAR_DIR")
You can ignore this suggestion if your web server root directory is "/var/www/html/public".
Sessions configuration is secured.Sessions configuration is secured.
OS and PHP are relying on 64 bits integers.OS and PHP are relying on 64 bits integers.
exif extension is installed.exif extension is installed.
ldap extension is installed.ldap extension is installed.
openssl extension is installed.openssl extension is installed.
Following extensions are installed: bz2, Phar, zip.Following extensions are installed: bz2, Phar, zip.
Zend OPcache extension is installed.Zend OPcache extension is installed.
Following extensions are installed: ctype, iconv, mbstring, sodium.Following extensions are installed: ctype, iconv, mbstring, sodium.
Write access to /var/www/html/marketplace has been validated.Write access to /var/www/html/marketplace has been validated.
Access to timezone database (mysql) is not allowed.Access to timezone database (mysql) is not allowed.

php-errors.log

[2024-02-14 06:41:25] glpiphplog.WARNING:   *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/html/src/DbUtils.php at line 2154
  Backtrace :
  src/DbUtils.php:2154                               trigger_error()
  inc/db.function.php:585                            DbUtils->getDbRelations()
  src/CommonDBTM.php:877                             getDbRelations()
  src/CommonDBTM.php:797                             CommonDBTM->cleanRelationData()
  src/CommonDBTM.php:2100                            CommonDBTM->deleteFromDB()
  src/MassiveAction.php:1508                         CommonDBTM->delete()
  src/MassiveAction.php:1420                         MassiveAction::processMassiveActionsForOneItemtype()
  src/MassiveAction.php:1398                         MassiveAction->processForSeveralItemtypes()
  front/massiveaction.php:62                         MassiveAction->process()

recent sql-errors.log

[2024-02-11 22:32:02] glpisqllog.ERROR: DBmysql::doQuery() in /var/www/html/src/DBmysql.php line 403
  *** MySQL query error:
  SQL: SELECT RELEASE_LOCK('helpdesk.glpicron.134358')
  Error: MySQL server has gone away
  Backtrace :
  src/DBmysql.php:1180                               DBmysql->doQuery()
  src/CronTask.php:958                               DBmysql->releaseLock()
  src/CronTask.php:1078                              CronTask::release_lock()
  front/cron.php:82                                  CronTask::launch()
  {"user":"@helpdesk","mem_usage":"0.000\", 17.78Mio)"} 

Last edited by Serpher (2024-02-14 09:11:24)

Offline

#2 2024-02-14 09:20:43

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

[2024-02-14 06:41:25] glpiphplog.WARNING:   *** PHP User Warning (512): Relation between "glpi_networkports" and "glpi_plugin_ocsinventoryng_networkports" table based on "networkports_id" field cannot be handled automatically as "networkports_id" also corresponds to index field of the target table. in /var/www/html/src/DbUtils.php at line 2154

-> Ignore this. This is from the OCS plugin and not relevant.

Are you familiar with mysql / can you use phpmyadmin?

Please change the cron tab file for www-data (or your user) to:
* * * * * /usr/bin/php8.2 /var/www/html/front/cron.php &> /dev/null
(remove certificate)

I tried to copy cron.php from 10.0.3, still nothing.
-> Dont mix the version files. it will corrupt your system and you might not recover from it.
Please restore the file to the latest version you upgraded your system (not the latest version from github)

Let me know once that is done. After that i will give you the next steps. We will figure this out smile

Last edited by Eon8D (2024-02-14 09:31:43)

Offline

#3 2024-02-14 09:37:08

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

Eon8D wrote:

Please change the cron tab file for www-data (or your user) to:
* * * * * /usr/bin/php8.2 /var/www/html/front/cron.php &> /dev/null
(remove certificate)

That was the initial linie. I added certificate and queuednotification lines based on suggestions I read on the Internet. I changed that now.

Eon8D wrote:

-> Dont mix the version files. it will corrupt your system and you might not recover from it.
Please restore the file to the latest version you upgraded your system (not the latest version from github)

Again, I was following advice from some forum where someone suggested that code from 10.0.3 worked. After brief testing, I restored the original file.

Offline

#4 2024-02-14 09:39:48

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

Thats fine. Not blaming you but I want to solve this as quickly and detailed as possible and I have to know the exact current setup. So no offence smile

How about mysql / phpmyadmin?

Last edited by Eon8D (2024-02-14 09:41:30)

Offline

#5 2024-02-14 09:57:13

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

Go to
/front/crontask.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=CronTask&start=0

Is this returning one element? Open it.
What is the execution mode? What is the last run time? Status is active? Time is "daily" with 0->24h?

/front/notificationtemplate.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=NotificationTemplate&start=0

Is this returning one element? Open it.
Is there one translation called "default translation" in the translation tab? Open the default translation and make sure that both fields are not empty - correct?

go to
/front/notification.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=Notification&start=0

is there one element? open it. Is it active? Click on recipients tab. What is inside the box?

Last edited by Eon8D (2024-02-14 10:01:50)

Offline

#6 2024-02-15 08:45:43

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

Eon8D wrote:

Thats fine. Not blaming you but I want to solve this as quickly and detailed as possible and I have to know the exact current setup. So no offence smile

How about mysql / phpmyadmin?

If you're asking about versions then:

MariaDB version 10.6.17
PHP version 8.2

Eon8D wrote:

Go to
/front/crontask.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=CronTask&start=0

Is this returning one element? Open it.
What is the execution mode? What is the last run time? Status is active? Time is "daily" with 0->24h?

5 minutes 0->24h, planned, CLI, active.

Eon8D wrote:

/front/notificationtemplate.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=NotificationTemplate&start=0

Is this returning one element? Open it.
Is there one translation called "default translation" in the translation tab? Open the default translation and make sure that both fields are not empty - correct?

Yup, all default, not modified.

Eon8D wrote:

go to
/front/notification.php?as_map=0&browse=0&criteria%5B0%5D%5Blink%5D=AND&criteria%5B0%5D%5Bfield%5D=view&criteria%5B0%5D%5Bsearchtype%5D=contains&criteria%5B0%5D%5Bvalue%5D=cert&itemtype=Notification&start=0

is there one element? open it. Is it active? Click on recipients tab. What is inside the box?

It is active with Super-Admin profile (mine) recipient and a group that my account is part of.

Offline

#7 2024-02-15 09:30:20

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

Okay that looks good so far.
Add to the recipients "Group in charge of the certificate" and "technician in charge of the certificate".
For all tests create a new certificate and do not modify existing ones (very important).
Monitor the logs live with: tail -f /var/www/helpdesk/files/_log/* and create a new certificate and select a date in the past and select "group in charge of the hardware" and yourself as "technician in charge of the hardware" to your group. Do not run the action manually - wait until the next run.

No notification? Error logs?

What are the settings at Administration -> Entities -> *your entitity* -> Notifications -> Certificates (send before.. and reminder frequency)?

Last edited by Eon8D (2024-02-15 09:39:29)

Offline

#8 2024-02-15 10:13:21

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

Did all that and nothing. Notification is not being created even.

2024-02-15 08:03:01 [@helpdesk]
External #2: Run certificate
2024-02-15 08:04:01 [@helpdesk]
External #1: Nothing to run
2024-02-15 08:05:01 [@helpdesk]
External #1: Run pendingreason_autobump_autosolve
2024-02-15 08:06:01 [@helpdesk]
External #1: Start mailgate
2024-02-15 08:07:01 [@helpdesk]
External #1: Nothing to run

8:02 - creation of new test certificate. I added my account to a group and technican.

Eon8D wrote:

What are the settings at Administration -> Entities -> *your entitity* -> Notifications -> Certificates (send before.. and reminder frequency)?

Defaults, send before 30 days and reminder every day.

Offline

#9 2024-02-15 10:20:35

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

Interesting.
Other causes:
- Update to 10.0.12 to verify file integrity (is that an option)?
- Inheritance
- Issue with PHP 8.2 (I am on 7.x)

Offline

#10 2024-02-15 10:35:03

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

I updated from 10.0.6 to 10.0.11 just because of this issue.
PHP also went up due to .11 version requirements.

github.com/glpi-project/glpi/releases/

On this last point, we wanted to recall the 7.4 version of PHP is very outdated and not supported anymore by the developers!
You should upgrade on a recent version, at least 8.2 (8.0 will be outdated at the end of the year and 8.1 will be only with security fixes).

Offline

#11 2024-02-15 12:06:31

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

No, I now that PHP7 is outdated but thats one difference compared to my system and on mine it works so we have to keep this in mind that is is might related.

How many entities do you have?

Offline

#12 2024-02-15 12:29:15

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

17 entities

Offline

#13 2024-02-15 12:31:25

Eon8D
Member
Registered: 2020-02-12
Posts: 24

Re: GLPI doesn't send any notification about expired certificate

Did you check the inheritance of the notificationtemplates? (if the notification template available for your entity where you create the certificate?)

Offline

#14 2024-02-15 14:47:45

Serpher
Member
Registered: 2022-09-23
Posts: 8

Re: GLPI doesn't send any notification about expired certificate

Notification is connected to my main entity. Sub entities have default inheritance.

Offline

Board footer

Powered by FluxBB