PluginsOCSInventory-NG / officepack

Retrieve microsoft office keys
GNU General Public License v2.0
15 stars 27 forks source link

officepack destroys mysql after uninstalling #36

Closed TitanLV closed 4 years ago

TitanLV commented 6 years ago

Hi, I have Newest OCS Inventory 2.4 server installed. 1) Tried to install several plugins. 2) Ony on plugin officepack whn I pressed install - webbrovser tab were working on something wery long - so long my session in OCS ended. 3) after I testes plugins I noticed officepack plugins wasnt working, there wasnt any sign office keys on OCS DB (I testes VBA stript on client pcs worked ) 4) After several weeks I decided to remove plugin 5) pressed that X to remove plugin and my browsers tab started to woring again. Waited more than 30 minutes and afcourse OCS session was ennded. 6) tried to log in OCS web console- none of my user accounts was able to log in OCS - no error shown. 7) restarted apache - no success 8) restarted whole OCS server 9) when tried to open OCS web console got error, ERROR: MySql connection problem 2002 No such file or directory 9.1) tried to restart mysql - sql could not be restarted: Job for mysql.service failed because the control process exited with error code.
See "systemctl status mysql.service" and "journalctl -xe" for details. 10) I am not an expert in MySql so I restored OCS server from backup. 11) after server restore tried to remove plugin again and same thing web browsers tab starts to spin like working on something. This time I didnt waited so long and tried to close and reopen OCs web console 12) Console wasnt working again. 13) Restarted apache and console worked 14) loged in OCS web console and went to plugins manager - officepack plugin still present (steps 11-14 tried several times)

Wanted to mention that others (up to date plugins are working) and can be uninstalled fast and easy.

My Servers parameters: Ubuntu 16.04.3 LTS PHP Version :7.0.22 Web Server : Apache/2.4.18 (Ubuntu) Database Server: (Ubuntu) version 5.7.20-0ubuntu0.16.04.1 Version OCSReports: 2.4

If you are interested in this issue I could give you more intel. Probably could make another server clone to experiment on.

P.S. Sorry for bad English.

TitanLV commented 6 years ago

So MySQL server could not be started:

root@ocs:/etc/mysql# systemctl status mysql.service ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (start-post) (Result: exit-code) since Fri 2017-12-29 08:08:30 EET; 26s ago Process: 15214 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Process: 15204 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 15214 (code=exited, status=1/FAILURE); : 15215 (mysql-systemd-s) Tasks: 2 Memory: 332.0K CPU: 137ms CGroup: /system.slice/mysql.service └─control ├─15215 /bin/bash /usr/share/mysql/mysql-systemd-start post └─15269 sleep 1

Dec 29 08:08:30 ocs systemd[1]: Stopped MySQL Community Server. Dec 29 08:08:30 ocs systemd[1]: Starting MySQL Community Server... Dec 29 08:08:30 ocs mysql-systemd-start[15204]: my_print_defaults: [ERROR] Found option without preceding group in co Dec 29 08:08:30 ocs mysql-systemd-start[15204]: my_print_defaults: [ERROR] Fatal error in defaults handling. Program Dec 29 08:08:30 ocs mysqld[15214]: mysqld: [ERROR] Found option without preceding group in config file /etc/mysql/my. Dec 29 08:08:30 ocs mysqld[15214]: mysqld: [ERROR] Fatal error in defaults handling. Program aborted! Dec 29 08:08:30 ocs systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE lines 1-21/21 (END)...skipping... ● mysql.service - MySQL Community Server Loaded: loaded (/lib/systemd/system/mysql.service; enabled; vendor preset: enabled) Active: activating (start-post) (Result: exit-code) since Fri 2017-12-29 08:08:30 EET; 26s ago Process: 15214 ExecStart=/usr/sbin/mysqld (code=exited, status=1/FAILURE) Process: 15204 ExecStartPre=/usr/share/mysql/mysql-systemd-start pre (code=exited, status=0/SUCCESS) Main PID: 15214 (code=exited, status=1/FAILURE); : 15215 (mysql-systemd-s) Tasks: 2 Memory: 332.0K CPU: 137ms CGroup: /system.slice/mysql.service └─control ├─15215 /bin/bash /usr/share/mysql/mysql-systemd-start post └─15269 sleep 1

Dec 29 08:08:30 ocs systemd[1]: Stopped MySQL Community Server. Dec 29 08:08:30 ocs systemd[1]: Starting MySQL Community Server... Dec 29 08:08:30 ocs mysql-systemd-start[15204]: my_print_defaults: [ERROR] Found option without preceding group in config Dec 29 08:08:30 ocs mysql-systemd-start[15204]: my_print_defaults: [ERROR] Fatal error in defaults handling. Program abor Dec 29 08:08:30 ocs mysqld[15214]: mysqld: [ERROR] Found option without preceding group in config file /etc/mysql/my.cnf Dec 29 08:08:30 ocs mysqld[15214]: mysqld: [ERROR] Fatal error in defaults handling. Program aborted! Dec 29 08:08:30 ocs systemd[1]: mysql.service: Main process exited, code=exited, status=1/FAILURE

TitanLV commented 6 years ago

I found reason why MySQL wasnt working. When started uninstalling officepack plugin Apache error logs grown indefinitely filling up whole hard drive in about 15 minutes. image

TitanLV commented 6 years ago

So far I understood that plugins.class.php in line 255 and 256 is looking for those two files english.txt and english.tmp which doesnt exists. and probalby next sript lines 260, 261, 266 depends on those two files.

Anyway... Happy New Year!

TitanLV commented 6 years ago

So what I did: Created New folder "english" in folder "language" and copied file "en_GB.txt" from "plugins\language\" and renamed it to "english.txt" Now plugin is uninstalled from OCS, with some MySQL error notification

Mant1kor commented 6 years ago

Confirm the problem. I faced it after update OCS 2.4 to 2.4.1.

TitanLV commented 6 years ago

I installed OCS from scratch to newest version 2.4.1(without db migration) and now plugin is working like a charm.