Error 500 after update to mySQL 5.7.19
-
Bug: Incompatibility?
The last update cycle (performed Monday July 24th 2017) caused our FOG management server to only produce Error 500 in response to all requests.
After repeated attempts reverting to a working good snapshot, and limiting the updates (performed via Webmin, installed on the same VM guest in our data center) I’ve limited it to updates relating to mySQL 5.7.19-0ubuntu0.16.04.1.
I was performing updates in related groups, and the group of updates (from Ubuntu Server 16.04, as may be obvious) which I’m down to, include the following packages:-
- mysql-client
- mysql-client-5.7
- mysql-client-core-5.7
- mysql-common
- mysql-server
- mysql-server-5.7
- mysql-server-core-5.7
All hosted in the Xenial-security repository from Canonical.
Previous version (5.7.18-0ubuntu0.16.04.1) is not giving issues, so you can see I’m trying to be conservatively up-to-date. (ie. not bleeding-edge of the rolling release, but keeping up with a current LTS release)
I can provide a complete list of other installed packages on the system, if it’s required / helpful. I can only assume that there is an SQL syntax change in that release, which the PHP CGI scripting isn’t compatible with. For information: https://dev.mysql.com/doc/relnotes/mysql/5.7/en/news-5-7-19.html But it doesn’t indicate much to me.
With that in mind, and because I know it sometimes has an effect, I’ll mention that the current PHP version, and CGI method on the server is php7.1-fpm currently running 7.1.7.retag-1+ubuntu16.04.1+deb.sury.org+1
I certainly wouldn’t expect the three mysql-client-* packages to be an issue, I’d just rather they were at the same version as the server than upgrade them alone.
I can’t take this any further alone.
-
@bobsobol Please post your apache error log (see my signature on where to find it on your FOG server) here. I am pretty sure there are messages in there when you hit those HTTP 500…
-
[Tue Jul 25 11:48:44.167215 2017] [php7:error] [pid 14241] [client 192.168.108.115:64983] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:45.068205 2017] [php7:error] [pid 14239] [client 192.168.108.55:22809] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:45.081749 2017] [php7:error] [pid 14240] [client 192.168.108.151:46708] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:45.281803 2017] [php7:error] [pid 5351] [client 192.168.108.44:2941] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:46.478268 2017] [php7:error] [pid 30538] [client 192.168.108.184:7564] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:46.864235 2017] [php7:error] [pid 10462] [client 192.168.108.157:59042] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:46.957715 2017] [php7:error] [pid 1896] [client 192.168.108.63:13926] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 11:48:47.480665 2017] [php7:error] [pid 14241] [client 192.168.108.75:20478] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/bootmenu.class.php(1157): HookManager->processEvent('IPXE_EDIT', Array)\n#3 /var/www/html/fog/lib/fog/bootmenu.class.php(197): BootMenu->_parseMe(Array)\n#4 /var/www/html/fog/service/ipxe/boot.php(35): BootMenu->__construct(Object(Host))\n#5 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443 [Tue Jul 25 15:47:14.759963 2017] [php7:error] [pid 5351] [client 192.168.92.20:57119] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr.snc.ac.uk/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:14.847744 2017] [php7:error] [pid 14240] [client 192.168.59.57:56262] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:17.633557 2017] [php7:error] [pid 14239] [client 192.168.59.57:56259] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:22.614086 2017] [php7:error] [pid 14264] [client 192.168.59.57:56280] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:27.597646 2017] [php7:error] [pid 1896] [client 192.168.59.57:56283] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:32.596908 2017] [php7:error] [pid 14241] [client 192.168.59.57:56288] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:37.602921 2017] [php7:error] [pid 1529] [client 192.168.59.57:56293] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:42.604854 2017] [php7:error] [pid 5351] [client 192.168.59.57:56296] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:47.608672 2017] [php7:error] [pid 14240] [client 192.168.59.57:56299] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:52.604010 2017] [php7:error] [pid 14239] [client 192.168.59.57:56302] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:47:57.643333 2017] [php7:error] [pid 32199] [client 192.168.59.57:56305] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active [Tue Jul 25 15:48:02.593323 2017] [php7:error] [pid 14264] [client 192.168.59.57:56306] PHP Fatal error: Uncaught Error: Call to a member function lastInsertId() on boolean in /var/www/html/fog/lib/db/pdodb.class.php:443\nStack trace:\n#0 /var/www/html/fog/lib/fog/fogcontroller.class.php(527): PDODB->insertId()\n#1 /var/www/html/fog/lib/fog/hookmanager.class.php(59): FOGController->save()\n#2 /var/www/html/fog/lib/fog/fogpagemanager.class.php(82): HookManager->processEvent('SEARCH_PAGES', Array)\n#3 [internal function]: FOGPageManager->__construct()\n#4 /var/www/html/fog/lib/fog/fogbase.class.php(457): ReflectionClass->newInstanceArgs(Array)\n#5 /var/www/html/fog/management/index.php(23): FOGBase::getClass('FOGPageManager')\n#6 {main}\n thrown in /var/www/html/fog/lib/db/pdodb.class.php on line 443, referer: http://fog-mgmt-svr/fog/management/index.php?node=task&sub=active
Restored the broken state to take this, but will be returning to the most recent “fixed” snapshot.
If what you are looking for isn’t in there, I could try applying the update to the fixed snapshot, taking the logs, and reverting again. (the log doesn’t mean much to me, I’m afraid)
-
@bobsobol This is probably what you are looking for: https://forums.fogproject.org/topic/10006/ubuntu-is-fog-s-enemy
And you might as well look though this wiki page: https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL
-
@Sebastian-Roth Thanks.
sudo mysql -u root -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY '';"
Resolved it alone. I had done that when I set up in the first place, but didn’t expect simple updates to revert it.
sudo mysql -u root -e "ALTER USER 'root'@'127.0.0.1' IDENTIFIED WITH mysql_native_password BY '';"
Produced an error:-
ERROR 1396 (HY000) at line 1: Operation ALTER USER failed for 'root'@'127.0.0.1'
But that doesn’t seem to be detrimental to FOG operation, so far. The mysql.user table only defines root@localhost and root@%. (or root from anywhere except the local machine, which then does require a password)I’ve set a “Custom Command” to do this in Webmin, and will document it on our Wiki for the less intimate (or Linux oriented) members of my team.
Thanks for that. That’s resolved. (if I can mark the report “Resolved” I can’t see how, just yet)
P.S. on the Wiki page you linked the Debian / Ubuntu status check command should usually be
service mysql status
, which should returnmysql start/running, process
and the process ID you’d get fromps aux | grep mysql
. (the latter being less helpful, but more universal) -
@bobsobol I just moved your topic from bug reports to FOG problems. Hope you don’t mind. As well I marked it as solved for you (see the Topic Tools menu).
Thanks a lot for pointing out the missing command in the wiki page. We’ll fix it. You mind doing it while I don’t have access @Wayne-Workman? As well I would like to point out that you can request access to the wiki yourself here. It would be great to have more people from the community involved in updating the forum. There is lots to do and all help is highly appreciated!
-
@Sebastian-Roth fixed.