Skip to content
This repository has been archived by the owner on Sep 13, 2024. It is now read-only.

Question after update to 5.2 sales order, chrome browser, incoming payments problems #11671

Closed
manwenick opened this issue Oct 5, 2019 · 24 comments
Milestone

Comments

@manwenick
Copy link

manwenick commented Oct 5, 2019

Hi everyone!

After the upgrade from 4.3 to 5.2.0 I've got some problems:

  1. I can't save any dialogs on Chrome- browser anymore, because the button "save" is grey. Only the "cancel" button is available.
  2. If I create a sales order and use more then one item I see the list of all items incl. all calculations like marge, sum etc. After I save it I see only the last item, which was selected at the end.
  3. If I created a incomming payment, I can't change the status. Its also grey.
    Did you faced the same problems? If yes, let me know, I will create an issue.

Thank you for feedback in advance!
Here are my server config screens

Screenshot_2019-10-05 Server configuration System settings
grafik
grafik
grafik

@manwenick manwenick changed the title Question Question after update to 5.2 sales order, chrome browser, incoming payments problems Oct 5, 2019
@apcloic
Copy link

apcloic commented Oct 7, 2019

Hi @manwenick

I had the same problem, it's relative to the following issues :
#9838
#11135

Check the structure of u_yf_finvoice_inventory table as referenced here :
https://github.com/YetiForceCompany/YetiForceCRM/blob/developer/install/install_schema/scheme.sql

CREATE TABLE u_yf_finvoice_inventory (
id int(10) NOT NULL AUTO_INCREMENT,
crmid int(10) DEFAULT NULL,
seq int(10) DEFAULT NULL,
name int(10) NOT NULL DEFAULT 0,
qty decimal(25,3) NOT NULL DEFAULT 0.000,
discountmode tinyint(1) NOT NULL DEFAULT 0,
taxmode tinyint(1) NOT NULL DEFAULT 0,
price decimal(28,8) NOT NULL DEFAULT 0.00000000,
discount decimal(28,8) DEFAULT 0.00000000,
gross decimal(28,8) NOT NULL DEFAULT 0.00000000,
net decimal(28,8) NOT NULL DEFAULT 0.00000000,
tax decimal(28,8) NOT NULL DEFAULT 0.00000000,
total decimal(28,8) NOT NULL DEFAULT 0.00000000,
taxparam varchar(255) NOT NULL,
discountparam varchar(255) DEFAULT NULL,
comment1 text DEFAULT NULL,
currency int(10) DEFAULT NULL,
currencyparam varchar(1024) DEFAULT NULL,
unit varchar(255) DEFAULT NULL,
subunit varchar(255) DEFAULT NULL,
PRIMARY KEY (id),
KEY u_yf_finvoice_inventory_crmid_idx (crmid),
CONSTRAINT fk_1_u_yf_finvoice_inventory FOREIGN KEY (crmid) REFERENCES u_yf_finvoice (finvoiceid) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

You need both id and crmid columns.

@vovpff
Copy link
Contributor

vovpff commented Oct 7, 2019

@manwenick this is problem grows from fault unsuccessful update process...

@rskrzypczak
Copy link
Contributor

#11569 (comment)

@manwenick
Copy link
Author

@manwenick this is problem grows from fault unsuccessful update process...

@vovpff Hi Vladimir,
you right. I remember a message during the update process, which said something like unseccessful update process (it was from 5.1 to 5.2) After I tried to start it again, I saw that I had 5.2 version already installed. So I just ignored this message. Than I improted the service pack and thats it.
Is it possible to check some logs, what was the problem during the update process?
@apcloic I read the linked issues. I didn't added new colomn crmid I only changed the colomn name id to crmid. Now I'm not sure what caused this problem. In each module I had custom fields. Maybe during the update process it won't work. I also did it this way 4.3 --> 4.4 ->5.0 + service packs ->5.1 + service packs -> 5.2 + service packs.
So I still have no solution for my mentioned problems. Maybe YF dev team (@rskrzypczak @mariuszkrzaczkowski ) can suggest something or somebody have any ideas?

@vovpff
Copy link
Contributor

vovpff commented Oct 7, 2019

@manwenick This is log /cache/logs/updateLogsTrace.log
id and crmid was added between 4.x and 5.x. If you don't have them after update your system is totally broken...

@manwenick
Copy link
Author

manwenick commented Oct 7, 2019

@manwenick This is log /cache/logs/updateLogsTrace.log
id and crmid was added between 4.x and 5.x. If you don't have them after update your system is totally broken...

@vovpff its sounds not so good... :(
I checked the db. There is some tables with crmid, some without (which are needed to be there like this dok https://github.com/YetiForceCompany/YetiForceCRM/blob/developer/install/install_schema/scheme.sql)
What can I do? Any ideas?

@vovpff
Copy link
Contributor

vovpff commented Oct 7, 2019

@manwenick roll back to your 4.3 and install updates step by step with checking what all perfect every time

@manwenick
Copy link
Author

manwenick commented Oct 7, 2019

@manwenick roll back to your 4.3 and install updates step by step with checking what all perfect every time

@vovpff
I just checked the logs, and found errors. Is it possible to change it manualy without a roll back? What do you think?

Here only the errors:

YetiForceUpdate::updateInventory| 2019-09-28 15:12:29
YetiForceUpdate::updateInventory| Error: Contacts, tablename: vtiger_contactdetails_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_vtiger_contactdetails_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE vtiger_contactdetails_inventory DROP FOREIGN KEY IF EXISTS `fk_1_vtiger_contactdetails_inventory`
YetiForceUpdate::updateInventory| Error: Accounts, tablename: vtiger_account_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_vtiger_account_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE vtiger_account_inventory DROP FOREIGN KEY IF EXISTS `fk_1_vtiger_account_inventory`
YetiForceUpdate::updateInventory| Error: PaymentsIn, tablename: vtiger_paymentsin_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_vtiger_paymentsin_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE vtiger_paymentsin_inventory DROP FOREIGN KEY IF EXISTS `fk_1_vtiger_paymentsin_inventory`
YetiForceUpdate::updateInventory| Error: LettersIn, tablename: vtiger_lettersin_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_vtiger_lettersin_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE vtiger_lettersin_inventory DROP FOREIGN KEY IF EXISTS `fk_1_vtiger_lettersin_inventory`
YetiForceUpdate::updateInventory| Error: SQuoteEnquiries, tablename: u_yf_squoteenquiries_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_squoteenquiries_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_squoteenquiries_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_squoteenquiries_inventory`
YetiForceUpdate::updateInventory| Error: SRequirementsCards, tablename: u_yf_srequirementscards_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_srequirementscards_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_srequirementscards_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_srequirementscards_inventory`
YetiForceUpdate::updateInventory| Error: SCalculations, tablename: u_yf_scalculations_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_scalculations_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_scalculations_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_scalculations_inventory`
YetiForceUpdate::updateInventory| Error: SQuotes, tablename: u_yf_squotes_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_squotes_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_squotes_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_squotes_inventory`
YetiForceUpdate::updateInventory| Error: SSingleOrders, tablename: u_yf_ssingleorders_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_ssingleorders_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_ssingleorders_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_ssingleorders_inventory`
YetiForceUpdate::updateInventory| Error: SRecurringOrders, tablename: u_yf_srecurringorders_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_srecurringorders_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_srecurringorders_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_srecurringorders_inventory`
YetiForceUpdate::updateInventory| Error: FInvoice, tablename: u_yf_finvoice_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_finvoice_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_finvoice_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_finvoice_inventory`
YetiForceUpdate::updateInventory| Error: IGRN, tablename: u_yf_igrn_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_igrn_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_igrn_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_igrn_inventory`
YetiForceUpdate::updateInventory| Error: FInvoiceProforma, tablename: u_yf_finvoiceproforma_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_finvoiceproforma_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_finvoiceproforma_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_finvoiceproforma_inventory`
YetiForceUpdate::updateInventory| Error: IGDN, tablename: u_yf_igdn_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_igdn_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_igdn_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_igdn_inventory`
YetiForceUpdate::updateInventory| Error: IIDN, tablename: u_yf_iidn_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_iidn_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_iidn_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_iidn_inventory`
YetiForceUpdate::updateInventory| Error: IGIN, tablename: u_yf_igin_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_igin_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_igin_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_igin_inventory`
YetiForceUpdate::updateInventory| Error: IPreOrder, tablename: u_yf_ipreorder_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_ipreorder_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_ipreorder_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_ipreorder_inventory`
YetiForceUpdate::updateInventory| Error: ISTDN, tablename: u_yf_istdn_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_istdn_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_istdn_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_istdn_inventory`
YetiForceUpdate::updateInventory| Error: FCorectingInvoice, tablename: u_yf_fcorectinginvoice_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_fcorectinginvoice_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_fcorectinginvoice_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_fcorectinginvoice_inventory`
YetiForceUpdate::updateInventory| Error: IGRNC, tablename: u_yf_igrnc_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_igrnc_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_igrnc_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_igrnc_inventory`
YetiForceUpdate::updateInventory| Error: IGDNC, tablename: u_yf_igdnc_inventory SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IF EXISTS `fk_1_u_yf_igdnc_inventory`' at line 1
Failed to prepare SQL: ALTER TABLE u_yf_igdnc_inventory DROP FOREIGN KEY IF EXISTS `fk_1_u_yf_igdnc_inventory`
YetiForceUpdate::updateInventory| 2019-09-28 15:12:30 | 0.02 mim.
YetiForceUpdate::update| 2019-09-28 15:12:30 | 0.46 mim.
YetiForceUpdate::postupdate| 2019-09-28 15:12:34
YetiForceUpdate::postupdate| 2019-09-28 15:12:35 | 0.01 mim.
YetiForceUpdate::update| 2019-09-28 15:31:48
YetiForceUpdate::addFields| 2019-09-28 15:31:51
___
ERROR] YetiForceUpdate::addMissingInserts: PDOException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`yetiforce`.`vtiger_entity_stats`, CONSTRAINT `fk_1_vtiger_entity_stats` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE) in /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Command.php:1258
Stack trace:
#0 /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Command.php(1258): PDOStatement->execute()
#1 /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Command.php(1075): yii\db\Command->internalExecute('INSERT INTO vti...')
#2 /var/www/html/yetiforce/cache/updates/updates/init.php(1275): yii\db\Command->execute()
#3 /var/www/html/yetiforce/cache/updates/updates/init.php(1213): YetiForceUpdate->addMissingInserts()
#4 /var/www/html/yetiforce/cache/updates/updates/init.php(122): YetiForceUpdate->updateData()
#5 /var/www/html/yetiforce/vtlib/Vtiger/PackageImport.php(1014): YetiForceUpdate->update()
#6 /var/www/html/yetiforce/vtlib/Vtiger/PackageImport.php(558): vtlib\PackageImport->importUpdate()
#7 /var/www/html/yetiforce/modules/Settings/ModuleManager/views/ModuleImport.php(142): vtlib\PackageImport->import('cache/vtlib/use...')
#8 [internal function]: Settings_ModuleManager_ModuleImport_View->importUserModuleStep3(Object(App\Request))
#9 /var/www/html/yetiforce/app/Controller/ExposeMethod.php(65): call_user_func_array(Array, Array)
#10 /var/www/html/yetiforce/modules/Settings/ModuleManager/views/ModuleImport.php(39): Settings_ModuleManager_ModuleImport_View->invokeExposedMethod('importUserModul...', Object(App\Request))
#11 /var/www/html/yetiforce/include/main/WebUI.php(183): Settings_ModuleManager_ModuleImport_View->process(Object(App\Request))
#12 /var/www/html/yetiforce/index.php(24): Vtiger_WebUI->process(Object(App\Request))
#13 {main}

Next yii\db\IntegrityException: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`yetiforce`.`vtiger_entity_stats`, CONSTRAINT `fk_1_vtiger_entity_stats` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE)
The SQL being executed was: INSERT INTO vtiger_entity_stats (vtiger_entity_stats.crmid)
						SELECT vtiger_campaign.campaignid FROM vtiger_campaign
						WHERE vtiger_campaign.campaignid NOT IN (SELECT vtiger_entity_stats.crmid FROM vtiger_entity_stats) in /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Schema.php:664
Stack trace:
#0 /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Command.php(1263): yii\db\Schema->convertException(Object(PDOException), 'INSERT INTO vti...')
#1 /var/www/html/yetiforce/vendor/yetiforce/yii2/db/Command.php(1075): yii\db\Command->internalExecute('INSERT INTO vti...')
#2 /var/www/html/yetiforce/cache/updates/updates/init.php(1275): yii\db\Command->execute()
#3 /var/www/html/yetiforce/cache/updates/updates/init.php(1213): YetiForceUpdate->addMissingInserts()
#4 /var/www/html/yetiforce/cache/updates/updates/init.php(122): YetiForceUpdate->updateData()
#5 /var/www/html/yetiforce/vtlib/Vtiger/PackageImport.php(1014): YetiForceUpdate->update()
#6 /var/www/html/yetiforce/vtlib/Vtiger/PackageImport.php(558): vtlib\PackageImport->importUpdate()
#7 /var/www/html/yetiforce/modules/Settings/ModuleManager/views/ModuleImport.php(142): vtlib\PackageImport->import('cache/vtlib/use...')
#8 [internal function]: Settings_ModuleManager_ModuleImport_View->importUserModuleStep3(Object(App\Request))
#9 /var/www/html/yetiforce/app/Controller/ExposeMethod.php(65): call_user_func_array(Array, Array)
#10 /var/www/html/yetiforce/modules/Settings/ModuleManager/views/ModuleImport.php(39): Settings_ModuleManager_ModuleImport_View->invokeExposedMethod('importUserModul...', Object(App\Request))
#11 /var/www/html/yetiforce/include/main/WebUI.php(183): Settings_ModuleManager_ModuleImport_View->process(Object(App\Request))
#12 /var/www/html/yetiforce/index.php(24): Vtiger_WebUI->process(Object(App\Request))
#13 {main}
Additional Information:
Array
(
    [0] => 23000
    [1] => 1452
    [2] => Cannot add or update a child row: a foreign key constraint fails (`yetiforce`.`vtiger_entity_stats`, CONSTRAINT `fk_1_vtiger_entity_stats` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE)
)

@vovpff
Copy link
Contributor

vovpff commented Oct 7, 2019

@manwenick I think rolling back is simpler way...

@manwenick
Copy link
Author

Hello everybody!

I decided to start with new installation of last 5.2.0 version and secure pack v18.

After I prepared the system, added all custom fields etc. I've started with import of the products.
I imported first 3 products to check if it works, after this I have 252 products more, which need to be added. First notification was something about max limit 250. I think there was 2 entries to much.
Unfortunatelly I didn't make a screenshot of this notification.
I just started to import a new package with 249 prods. But now I have a new problem:
If I go to Products -> activity -> import I receive a new notification:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'yf52.u_yf_import_5' doesn't exist Failed to prepare SQL: SELECT temp_status FROM u_yf_import_5
What can I do now? In the db, I can't find neither the table "u_yf_import_5" nor the table 'yf52.u_yf_import_5'
Please help.

@vovpff
Copy link
Contributor

vovpff commented Nov 18, 2019

Your import was unsuccessful. I don't really know how to change import flag.
In older versions there are was some table with data prepared to import. I don't remember table name. If this table was dropped manually import mechanism was refreshed and started from scratch. I'm nit sure what this will work in fresh versions.

@manwenick
Copy link
Author

Your import was unsuccessful. I don't really know how to change import flag.
In older versions there are was some table with data prepared to import. I don't remember table name. If this table was dropped manually import mechanism was refreshed and started from scratch. I'm nit sure what this will work in fresh versions.

Hello Vladimir!
Yesterday, I checked the db for eny entries like you say. I also didn't found something. Today I logged in on my phone first, then it was possible to make import. I imported entries by one file. (explanation: I exported as xml all products from old system, there were more than 250 entries = 1 entry = file. If I import one by one (file) then there is no problem. If I try to import ZIP file which contains entries (I reduced them to) I still get the notification SQLSTATE[42S02]: Base table or view not found: 1146 Table 'yf52.u_yf_import_5' doesn't exist Failed to prepare SQL: SELECT temp_status FROM u_yf_import_5
maybe @rskrzypczak @mariuszkrzaczkowski can contribute something?

@vovpff
Copy link
Contributor

vovpff commented Nov 19, 2019

Activate logs in debugging and try import. There are should be all actions written in log file.

@manwenick
Copy link
Author

Activate logs in debugging and try import. There are should be all actions written in log file.

😢 how can I do it? I mean enable logs in debugging? How do I enable debugging?

@vovpff
Copy link
Contributor

vovpff commented Nov 20, 2019

.../config/Debug.php

	/** Enable saving logs to file. Values: false/true */
	public static $LOG_TO_FILE = false;

Should be true

@mariuszkrzaczkowski
Copy link
Member

https://yetiforce.com/en/knowledge-base/documentation/implementer-documentation/item/debugging#quick_start

Create a new error and close the one if it is out of date.
Each update process must be successful without errors, otherwise errors will occur and subsequent packages will not fix it.

@manwenick
Copy link
Author

@mariuszkrzaczkowski @vovpff
Hi guys, I am confused...
Now my MySQL is gone away... this is what I had in the logs:

2019-11-25 23:13:25.9749 [info][yii\db\Command::query] - SELECT * FROM vtiger_tab
2019-11-25 23:13:25.9749 [info][yii\db\Connection::open] - Opening DB connection: mysql:host=localhost;dbname=yf52;port=3306
2019-11-25 23:13:25.9775 [info][yii\db\Command::query] - SELECT * FROM vtiger_entityname
2019-11-25 23:13:25.9784 [info][yii\db\Command::query] - SELECT * FROM a_yf_bruteforce LIMIT 1
2019-11-25 23:13:25.9798 [info][yii\db\Command::query] - SELECT id FROM a_yf_bruteforce_blocked WHERE (time > '2019-11-25 22:58:25') AND (ip='ichangeitsecurityreason') AND (blocked=1) LIMIT 1
2019-11-25 23:13:25.9646 [info][application] -
$_GET = []
$_POST = []
$_FILES = []
$_COOKIE = []
$_SESSION = [
'CSP_TOKEN' => '1451a4acf57cfe5aceac109f00c510715f683631c89077a0316892850fc33d47'
'last_activity' => 1574712805.9655
]
$security = [
'public_html' => 'Off'
]
$headers = [
'Header: server' => false
'Header: x-powered-by' => false
'Header: x-frame-options' => false
'Header: x-xss-protection' => false
'Header: x-content-type-options' => false
'Header: x-robots-tag' => false
'Header: x-permitted-cross-domain-policies' => false
'Header: expect-ct' => false
'Header: referrer-policy' => false
'Header: strict-transport-security' => false
]
$database = [
'innodb_lock_wait_timeout' => '50'
'character_set_server' => 'latin1'
]
$performance = [
'opcache.interned_strings_buffer' => '8'
'opcache.revalidate_freq' => '0'
'opcache.file_update_protection' => '0'
'realpath_cache_ttl' => '600'
]
$environment = [
'error_log' => false
]

2019-11-25 23:13:25.9626 [info][yii\db\Command::query] - SELECT * FROM vtiger_tab
2019-11-25 23:13:25.9626 [info][yii\db\Connection::open] - Opening DB connection: mysql:host=localhost;dbname=yf52;port=3306
2019-11-25 23:13:25.9633 [error] - SQLSTATE[HY000] [2006] MySQL server has gone away
PDOException: Packets out of order. Expected 0 received 1. Packet size=23 in /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php:687
Stack trace:
#0 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(687): PDO->__construct('mysql:host=loca...', 'root', 'ichangeitsecurityreason', NULL)
#1 /var/www/html/yf52/app/Db.php(207): yii\db\Connection->createPdoInstance()
#2 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(613): App\Db->createPdoInstance()
#3 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(996): yii\db\Connection->open()
#4 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(983): yii\db\Connection->getMasterPdo()
#5 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(253): yii\db\Connection->getSlavePdo()
#6 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(1143): yii\db\Command->prepare(true)
#7 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#8 /var/www/html/yf52/vendor/yetiforce/yii2/db/Query.php(237): yii\db\Command->queryAll()
#9 /var/www/html/yf52/vtlib/Vtiger/Functions.php(84): yii\db\Query->all()
#10 /var/www/html/yf52/vtlib/Vtiger/Module.php(249): vtlib\Functions::getModuleData('Announcements')
#11 /var/www/html/yf52/modules/Vtiger/models/Module.php(197): vtlib\Module::getInstance('Announcements')
#12 /var/www/html/yf52/cache/templates_c/basic/53b6ddce3640bea4423a7896f8ce32be884bda5d_0.file.Body.tpl.php(24): Vtiger_Module_Model::getInstance('Announcements')
#13 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd283eb2f5862_38158022(Object(Smarty_Internal_Template))
#14 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#15 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#16 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#17 /var/www/html/yf52/cache/templates_c/basic/7d16216622c9bef79d1ae85421456ef7dcd08827_0.file.Header.tpl.php(81): Smarty_Internal_Template->_subTemplateRender('modules/Users/B...', NULL, NULL, 0, 3600, Array, 0, true)
#18 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd280fbe59746_52204707(Object(Smarty_Internal_Template))
#19 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#20 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#21 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 1)
#22 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
#23 /var/www/html/yf52/include/runtime/Viewer.php(206): Smarty_Internal_TemplateBase->display('modules/Vtiger/...')
#24 /var/www/html/yf52/app/Controller/View.php(181): Vtiger_Viewer->view('Header.tpl', 'Users')
#25 /var/www/html/yf52/modules/Users/views/Login.php(45): App\Controller\View->preProcessDisplay(Object(App\Request))
#26 /var/www/html/yf52/include/main/WebUI.php(265): Users_Login_View->preProcess(Object(App\Request))
#27 /var/www/html/yf52/include/main/WebUI.php(185): Vtiger_WebUI->triggerPreProcess(Object(Users_Login_View), Object(App\Request))
#28 /var/www/html/yf52/index.php(24): Vtiger_WebUI->process(Object(App\Request))
#29 {main}

Next PDOException: SQLSTATE[HY000] [2006] MySQL server has gone away in /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php:687
Stack trace:
#0 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(687): PDO->__construct('mysql:host=loca...', 'root', 'ichangeitsecurityreason', NULL)
#1 /var/www/html/yf52/app/Db.php(207): yii\db\Connection->createPdoInstance()
#2 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(613): App\Db->createPdoInstance()
#3 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(996): yii\db\Connection->open()
#4 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(983): yii\db\Connection->getMasterPdo()
#5 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(253): yii\db\Connection->getSlavePdo()
#6 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(1143): yii\db\Command->prepare(true)
#7 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#8 /var/www/html/yf52/vendor/yetiforce/yii2/db/Query.php(237): yii\db\Command->queryAll()
#9 /var/www/html/yf52/vtlib/Vtiger/Functions.php(84): yii\db\Query->all()
#10 /var/www/html/yf52/vtlib/Vtiger/Module.php(249): vtlib\Functions::getModuleData('Announcements')
#11 /var/www/html/yf52/modules/Vtiger/models/Module.php(197): vtlib\Module::getInstance('Announcements')
#12 /var/www/html/yf52/cache/templates_c/basic/53b6ddce3640bea4423a7896f8ce32be884bda5d_0.file.Body.tpl.php(24): Vtiger_Module_Model::getInstance('Announcements')
#13 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd283eb2f5862_38158022(Object(Smarty_Internal_Template))
#14 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#15 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#16 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#17 /var/www/html/yf52/cache/templates_c/basic/7d16216622c9bef79d1ae85421456ef7dcd08827_0.file.Header.tpl.php(81): Smarty_Internal_Template->_subTemplateRender('modules/Users/B...', NULL, NULL, 0, 3600, Array, 0, true)
#18 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd280fbe59746_52204707(Object(Smarty_Internal_Template))
#19 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#20 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#21 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 1)
#22 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
#23 /var/www/html/yf52/include/runtime/Viewer.php(206): Smarty_Internal_TemplateBase->display('modules/Vtiger/...')
#24 /var/www/html/yf52/app/Controller/View.php(181): Vtiger_Viewer->view('Header.tpl', 'Users')
#25 /var/www/html/yf52/modules/Users/views/Login.php(45): App\Controller\View->preProcessDisplay(Object(App\Request))
#26 /var/www/html/yf52/include/main/WebUI.php(265): Users_Login_View->preProcess(Object(App\Request))
#27 /var/www/html/yf52/include/main/WebUI.php(185): Vtiger_WebUI->triggerPreProcess(Object(Users_Login_View), Object(App\Request))
#28 /var/www/html/yf52/index.php(24): Vtiger_WebUI->process(Object(App\Request))
#29 {main}

Next yii\db\Exception: SQLSTATE[HY000] [2006] MySQL server has gone away in /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php:624
Stack trace:
#0 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(996): yii\db\Connection->open()
#1 /var/www/html/yf52/vendor/yetiforce/yii2/db/Connection.php(983): yii\db\Connection->getMasterPdo()
#2 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(253): yii\db\Connection->getSlavePdo()
#3 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(1143): yii\db\Command->prepare(true)
#4 /var/www/html/yf52/vendor/yetiforce/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#5 /var/www/html/yf52/vendor/yetiforce/yii2/db/Query.php(237): yii\db\Command->queryAll()
#6 /var/www/html/yf52/vtlib/Vtiger/Functions.php(84): yii\db\Query->all()
#7 /var/www/html/yf52/vtlib/Vtiger/Module.php(249): vtlib\Functions::getModuleData('Announcements')
#8 /var/www/html/yf52/modules/Vtiger/models/Module.php(197): vtlib\Module::getInstance('Announcements')
#9 /var/www/html/yf52/cache/templates_c/basic/53b6ddce3640bea4423a7896f8ce32be884bda5d_0.file.Body.tpl.php(24): Vtiger_Module_Model::getInstance('Announcements')
#10 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd283eb2f5862_38158022(Object(Smarty_Internal_Template))
#11 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#12 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#13 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(385): Smarty_Internal_Template->render()
#14 /var/www/html/yf52/cache/templates_c/basic/7d16216622c9bef79d1ae85421456ef7dcd08827_0.file.Header.tpl.php(81): Smarty_Internal_Template->_subTemplateRender('modules/Users/B...', NULL, NULL, 0, 3600, Array, 0, true)
#15 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_5dd280fbe59746_52204707(Object(Smarty_Internal_Template))
#16 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode(Object(Smarty_Internal_Template))
#17 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(216): Smarty_Template_Compiled->render(Object(Smarty_Internal_Template))
#18 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(232): Smarty_Internal_Template->render(false, 1)
#19 /var/www/html/yf52/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute(Object(Smarty_Internal_Template), NULL, NULL, NULL, 1)
#20 /var/www/html/yf52/include/runtime/Viewer.php(206): Smarty_Internal_TemplateBase->display('modules/Vtiger/...')
#21 /var/www/html/yf52/app/Controller/View.php(181): Vtiger_Viewer->view('Header.tpl', 'Users')
#22 /var/www/html/yf52/modules/Users/views/Login.php(45): App\Controller\View->preProcessDisplay(Object(App\Request))
#23 /var/www/html/yf52/include/main/WebUI.php(265): Users_Login_View->preProcess(Object(App\Request))
#24 /var/www/html/yf52/include/main/WebUI.php(185): Vtiger_WebUI->triggerPreProcess(Object(Users_Login_View), Object(App\Request))
#25 /var/www/html/yf52/index.php(24): Vtiger_WebUI->process(Object(App\Request))
#26 {main}
Additional Information:

2019-11-25 23:13:25.9492 [info][application] -
$_GET = []
$_POST = []
$_FILES = []
$_COOKIE = []
$_SESSION = [
'CSP_TOKEN' => 'xxxb824d1fcb689b1a83e9a8d2e1533243a2060868f5af07d5d840b2f1c4bxxx'
'last_activity' => 1574712805.9502
]
$security = [
'public_html' => 'Off'
]
$headers = [
'Header: server' => false
'Header: x-powered-by' => false
'Header: x-frame-options' => false
'Header: x-xss-protection' => false
'Header: x-content-type-options' => false
'Header: x-robots-tag' => false
'Header: x-permitted-cross-domain-policies' => false
'Header: expect-ct' => false
'Header: referrer-policy' => false
'Header: strict-transport-security' => false
]
$database = [
'innodb_lock_wait_timeout' => '50'
'character_set_server' => 'latin1'
]
$performance = [
'opcache.interned_strings_buffer' => '8'
'opcache.revalidate_freq' => '0'
'opcache.file_update_protection' => '0'
'realpath_cache_ttl' => '600'
]
$environment = [
'error_log' => false
]

@vovpff
Copy link
Contributor

vovpff commented Nov 26, 2019

Cool news. At first confure your mysql and restart your mysql service and check configuration/Db.php for proper params

@manwenick
Copy link
Author

manwenick commented Nov 28, 2019

Cool news. At first confure your mysql and restart your mysql service and check configuration/Db.php for proper params

Hi guys!
I crashed my server with an update of mariadb.
After long writing and calling with support of VPS provider, it runs again.
But I have new failure:
grafik

What I did:
MySQL Server couldn't start, because mysqld.sock file couldn't be find at the path var/run/mysql/mysqld.sock
I deleted my.cnf file and restartet the server. After restart I've started MySQL server. It runs. Good so far.
I checked the .../config/Db.php file --> everything was right.
I logged in via phpmyadmin to the db. --> everything ok.
But now I don't understand, why I get this failure. I can login with the same credentials which are mentioned in Db.php file.
Is there some entry in the cache, which need to be deleted? Btw I cleared all browser caches as well. Maybe some service which need to be restarted? I restarted few time apache2 service and mysql service.

@vovpff
Copy link
Contributor

vovpff commented Nov 28, 2019

Try to reset password for db user. Last mysql update contains new mechanism for passwords. Maybe this helps.

@manwenick
Copy link
Author

Try to reset password for db user. Last mysql update contains new mechanism for passwords. Maybe this helps.

I changed the passwort, restarted mysql service and apache2 --> no changes.
I deleted the user and created new one with same name and same password which is also in Db.php file --> no changes. I still have the same permission denied failure. :(

@manwenick
Copy link
Author

@mariuszkrzaczkowski
I tried to copy the directories from the server, to make a backup today.
I saw something weird and I would like to ask if its normal behavior:
directory .../cache/session/ have over 80000 files each of them 116 KB, they have no file extension.
the name of the file beginns with sess_vvxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I opened one of it by renaming .txt --> here what I see inside:
CSP_TOKEN|s:64:"ba2c1e7799e2276eaebdda70b1ca20568b388671735199ff23b2d845e22b8b41";last_activity|d:1575033532.354175;

Actually this is the same entry, what I posted before it was containing the same line.
What does this entry mean?
@vovpff
I changed the host from localhost to 127.0.0.1 in phpmyadmin in the user entry which is also used in Db.php (here I also changed from localhost to 127.0.0.1)
I could enter in the CRM. But it was veeeeery slowly. After few minutes I received message:
SQLSTATE[HY000] [2006] MySQL server has gone away
After this I am again on the same point like few days ago.
Its very strange...

@vovpff
Copy link
Contributor

vovpff commented Nov 29, 2019

Every time if you have problems you must check logs. Usually logs contains enough information to understand whats going wrong

@manwenick
Copy link
Author

I gived up...
it take to long, to figure out what problem is.
I asked an IT-admin to setup the server completely new.
I have some issues again. therefore I will open new issue

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants