Update database glpi

Hello everyone, as soon as you have upgraded GLPI, it asks you to start the upgrade process. It appears to me on the screen as to follow. It doesn’t go on .

Apr  6 20:23:26 neth7 su: (to apache) root on none
Apr  6 20:23:26 neth7 esmith::event[15765]: Risultano mancanti alcuni requisiti di sistema opzionali. Esegui il comando "php bin/console system:check_requirements" per maggiori dettagli
Apr  6 20:23:26 neth7 esmith::event[15765]: +------------------------+-------------------------------------------------+-----------+
Apr  6 20:23:26 neth7 esmith::event[15765]: |                        | Corrente                                        | Obiettivo |
Apr  6 20:23:26 neth7 esmith::event[15765]: +------------------------+-------------------------------------------------+-----------+
Apr  6 20:23:26 neth7 esmith::event[15765]: | Host database          | 127.0.0.1:8105                                  |           |
Apr  6 20:23:26 neth7 esmith::event[15765]: | Nome database          | glpi                                            |           |
Apr  6 20:23:26 neth7 esmith::event[15765]: | Utente database        | glpi                                            |           |
Apr  6 20:23:26 neth7 esmith::event[15765]: | Versione di GLPI       | 10.0.3                                          | 10.0.6    |
Apr  6 20:23:26 neth7 esmith::event[15765]: | Versione database GLPI | 10.0.3@a130db99c7d9b131c2e2ea59fe0d6260fe93d831 | 10.0.6    |
Apr  6 20:23:26 neth7 esmith::event[15765]: +------------------------+-------------------------------------------------+-----------+
Apr  6 20:23:26 neth7 esmith::event[15765]: Verifica dell'integrità dello schema del database
Apr  6 20:23:27 neth7 esmith::event[15765]: Lo schema del database non è consistente con la versione di GLPI installata (10.0.3). Esegui il comando "php bin/console database:check_schema_integrity" per visualizzare le differenze trovate
Apr  6 20:23:27 neth7 su: (to apache) root on none
Apr  6 20:23:28 neth7 esmith::event[15765]: Il codice di GLPI è stato aggiornato. E' necessario l'aggiornamento del database di GLPI
Apr  6 20:23:28 neth7 esmith::event[15765]: Esegui il comando "php bin/console database:update" per eseguire l'aggiornamento
Apr  6 20:23:28 neth7 su: (to apache) root on none
Apr  6 20:23:28 neth7 esmith::event[15765]: Il codice di GLPI è stato aggiornato. E' necessario l'aggiornamento del database di GLPI
Apr  6 20:23:28 neth7 esmith::event[15765]: Esegui il comando "php bin/console database:update" per eseguire l'aggiornamento
Apr  6 20:23:28 neth7 su: (to apache) root on none
Apr  6 20:23:28 neth7 esmith::event[15765]: Il codice di GLPI è stato aggiornato. E' necessario l'aggiornamento del database di GLPI
Apr  6 20:23:28 neth7 esmith::event[15765]: Esegui il comando "php bin/console database:update" per eseguire l'aggiornamento
Apr  6 20:23:28 neth7 su: (to apache) root on none
Apr  6 20:23:29 neth7 esmith::event[15765]: PHP Warning (2): Undefined array key "config_class" in /usr/share/glpi/marketplace/camerainput/inc/config.class.php at line 95
Apr  6 20:23:29 neth7 esmith::event[15765]: PHP Warning:  Undefined array key "config_class" in /usr/share/glpi/marketplace/camerainput/inc/config.class.php on line 95
Apr  6 20:23:29 neth7 esmith::event[15765]: La modalità manutenzione è disabilitata.
Apr  6 20:23:29 neth7 esmith::event[15765]: Action: /etc/e-smith/events/nethserver-glpi-10-latest-update/S40nethserver-glpi-10-latest-conf SUCCESS [3.608566]
Apr  6 20:23:29 neth7 systemd: Reloading.
Apr  6 20:23:29 neth7 systemd: [/usr/lib/systemd/system/netdata.service:50] Failed to parse capability in bounding/ambient set, ignoring: CAP_PERFMON
Apr  6 20:23:29 neth7 systemd: [/usr/lib/systemd/system/netdata.service:69] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Apr  6 20:23:29 neth7 esmith::event[15765]: [INFO] service httpd reload
Apr  6 20:23:29 neth7 systemd: Reloading The Apache HTTP Server.
Apr  6 20:23:29 neth7 systemd: Reloaded The Apache HTTP Server.
Apr  6 20:23:29 neth7 systemd: Reloading.
Apr  6 20:23:29 neth7 systemd: [/usr/lib/systemd/system/netdata.service:50] Failed to parse capability in bounding/ambient set, ignoring: CAP_PERFMON
Apr  6 20:23:29 neth7 systemd: [/usr/lib/systemd/system/netdata.service:69] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Apr  6 20:23:29 neth7 systemd: Stopping The PHP FastCGI Process Manager...
Apr  6 20:23:29 neth7 esmith::event[15765]: [INFO] service php81-php-fpm restart
Apr  6 20:23:29 neth7 systemd: Stopped The PHP FastCGI Process Manager.
Apr  6 20:23:29 neth7 systemd: Starting The PHP FastCGI Process Manager...
Apr  6 20:23:30 neth7 systemd: Started The PHP FastCGI Process Manager.
Apr  6 20:23:30 neth7 systemd: Reloading.
Apr  6 20:23:30 neth7 systemd: [/usr/lib/systemd/system/netdata.service:50] Failed to parse capability in bounding/ambient set, ignoring: CAP_PERFMON
Apr  6 20:23:30 neth7 systemd: [/usr/lib/systemd/system/netdata.service:69] Unknown lvalue 'ProtectControlGroups' in section 'Service'
Apr  6 20:23:30 neth7 esmith::event[15765]: [INFO] service rh-mariadb105-mariadb@glpi restart
Apr  6 20:23:30 neth7 systemd: Stopping MariaDB 10.5 database server...
Apr  6 20:23:30 neth7 systemd: Stopped MariaDB 10.5 database server.
Apr  6 20:23:30 neth7 systemd: Starting MariaDB 10.5 database server...
Apr  6 20:23:30 neth7 scl: Database MariaDB is probably initialized in /var/opt/rh/rh-mariadb105/lib/mysql-glpi already, nothing is done.
Apr  6 20:23:30 neth7 scl: If this is not the case, make sure the /var/opt/rh/rh-mariadb105/lib/mysql-glpi is empty before running mysql-prepare-db-dir.
Apr  6 20:23:30 neth7 mysqld-scl-helper: 2023-04-06 20:23:30 0 [Note] /opt/rh/rh-mariadb105/root/usr/libexec/mysqld (mysqld 10.5.16-MariaDB) starting as process 16253 ...
Apr  6 20:23:30 neth7 systemd: Started MariaDB 10.5 database server.
Apr  6 20:23:30 neth7 esmith::event[15765]: Action: /etc/e-smith/events/actions/adjust-services SUCCESS [1.374372]
Apr  6 20:23:30 neth7 esmith::event[15765]: Event: nethserver-glpi-10-latest-update SUCCESS


Restricted area.
Only local access allowed.
Check your configuration or contact your administrator.

1 Like

For those who want to set SELinux to “enforcing” thats a really bad idea!

I Just tried that out! :rofl:

Were you able to upgrade? I’m stuck on the page …

1 Like

Nope, as i set SELinux to “enforcing” several services stopped working, like shorewall, SSSD and others…

Is a rollback possible or not?

1 Like

for SELinux? I just did! :slight_smile:

i changed /etc/e-smith/templates and then changed it back as soon i saw a really bad behaviour

All okey now lol!

Could you give me the precise instructions on how to do it? Thank you

1 Like

Dude, just don´t do it, its a bad bad idea…

GLPI is not working still, :slight_smile: maybe its that ou are asking me.

Thank you, we are waiting …

Okey, edit /etc/e-smith/templates/etc/selinux/config/10selinux
change SElinux to “enforcing”
same here:
nano /etc/selinux/config change to “enforcing”
That will change SELinux to Enforcing and crash a lot of other services, and GLPI will still not work

But i strongly advise you not to do it

I will put this GLPI under proxmox, i was supposed to do this a long time ago!

Hi, I managed to get it started again. I ran the glpi console command, forced the maintenance mode, and then ran the console database:update command. He went there by reporting some inconsistencies, but then in the end he gave me Ok. He gave me the login mask I entered and I had to execute some commands that he told me to do through the console. Now it seems to work at version 10.06 . I don’t guarantee for other systems, but mine works, at least I hope … I took a snapshot on proxmox so I got safe …

1 Like

This is also the result from GLPI information

GLPI 10.0.6 (/glpi => /usr/share/glpi)
Installation mode: TARBALL
Current language:it_IT

1 Like

I tried console, but it gives me some error:
PHP Parse error: syntax error, unexpected ‘(’ in /usr/share/glpi/inc/based_config.php on line 160

I checked my php version, wierdly it says:

[root@srv1 bin]# php --version
PHP 5.4.16 (cli) (built: Apr 1 2020 04:07:17)
Copyright (c) 1997-2013 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2013 Zend Technologies

Now i am just afraid to change apache php version and mess nethserver all up

Just found this:

And:
/etc/e-smith/templates/etc/httpd/conf.d/zzz_glpi.conf/10base All fine, pointing to php7.3

whaaaaaa! :frowning:

I ran for the version I have :slight_smile:

/opt/remi/php81/root/bin/php /usr/share/glpi/bin/console maintenance:disable
ecc .. ecc ..
1 Like

I got it working in another way:

I removed glpi:
rpm -e --nodeps glpi nethserver-glpi-latest

installed it again:
yum install nethserver-glpi-10-latest

Then the annoying:
Restricted area.
Only local access allowed.
Check your configuration or contact your administrator.

to solve this i changed some parameters in httpd.conf
where:
Require all denied
i changed to:
Require all granted

And also Allow from all.

restarted httpd.service

installed “lynx” :roll_eyes:
and:
lynx https://myip/glpi

and updated database from there… all good now :smiley:

1 Like

Hi Walter, I had thought of the same procedure, but I am not mistakenly convinced that this type of solution could guarantee me success. I preferred as written before , to manually update the database as GLPI ( the netrhserver10 script ) suggested that I update only the database , as the program had been updated successfully . So I turned on maintenance mode and immediately then ran the database:update directive with php/console. He pointed out to me during this procedure some incompatibilities that seem to have been solved later automatically by highlighting the green word OK at the end of the script. I always had to correct with console 2 other directives always reported by GLPI in the access mask . I checked as much as I could the rest, the program seems to work, the records are there with related images, calls, notes, and PC inventory. At the moment nothing unusual seems to me, I know it works in my case.Thank you for participating and letting me know about your work around. However, this error must be put in place if it can be defined as such, but I am not capable of it!

2 Likes

yes glpi gets a good console cli, enable maintenance and run manually the upgrade

this is what my rpm does I do not understand why it missed it the first time. I tested yesterday night on a VM and I can see the upgrade from 10.0.3 to 10.0.6

1 Like

Hi steph, yes I did what was written because GLPI indicated it. He reported only a “record incompatibility” during the update. Then at the end of the procedure he reported the word Ok in green . I forgot … the time zone had remained disabled, so always from CLI I ran php/console and the time zone activation command. I think we need to analyze the script better. Thank you for your confirmation of what was written.

3 Likes