Of course we cannot always share details about our work with customers, but nevertheless it is nice to show our technical achievements and share some of our implemented solutions.
Here at Infiniroot we've been using Znuny, an open source ticketing system, for a while now and already wrote about it in the past. The current LTS version is 6.5 and the latest minor version is (while writing this) 6.5.8.
Znuny and its update process usually works fine, but this time we ran into an error. Here's how we analyzed and solved the (self-made) problem.
After the latest LTS update from 6.4.5 to 6.5.8 our Znuny ran into internal server errors after the update. Unfortunately the Apache error logs were not really helpful and only showed such entries:
[:error] [pid 10450] The constructor of Kernel::System::DynamicField::Backend returned undef. at /opt/otrs/Kernel/System/Ticket/TicketSearch.pm line 1427.\n
According to some hints found on our research, such an error could be related to an installed module.
One step of the update process is the update of installed (OPM) modules. Reviewing the update's log revealed that this process failed:
otrs@znuny:~$ bin/otrs.Console.pl Admin::Package::UpgradeAll
Fetching online repositories...
Freebie Features... Done
Znuny Open Source Add-ons... Done
Znuny::ITSM... Done
Upgrading installed packages...
Notice: Install /opt/otrs/doc/general-catalog-database.dia (660)!
Notice: Install /opt/otrs/doc/general-catalog-database.png (660)!
[...]
The following packages were updated...
GeneralCatalog
ITSMCore
The following packages could not be found in the online repositories...
DashboardMyAccountedTimes
Fail.
This indicates that the DashboardMyAccountedTimes module was not found in the online repositories and could not be updated.
We manually installed this module a couple of months ago, testing a quick view of accounted times per agent. Although the idea seemed good to us, we needed a "Last Month" accounted time summary as well and moved on (the module remained installed).
Now with this information at hand, we could move on to fix the update.
By using the otrs.Console.pl command we can list existing installed modules (packages) and also uninstall a specific package:
otrs@znuny:~$ bin/otrs.Console.pl Admin::Package::List
Listing all installed packages...
+----------------------------------------------------------------------------+
| Name: DashboardMyAccountedTimes
| Version: 6.0.1
| Vendor: Perl-Services.de
| URL: https://www.perl-services.de
| License: GNU AFFERO GENERAL PUBLIC LICENSE Version 3, November 2007
| Description: Dashboard widget to get an overview of accounted times
+----------------------------------------------------------------------------+
| Name: GeneralCatalog
| Version: 6.5.2
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The General Catalog package.
+----------------------------------------------------------------------------+
| Name: ITSMCore
| Version: 6.5.4
| Vendor: Znuny
| URL: https://www.znuny.org/
| License: GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007
| Description: The Znuny::ITSM Core package.
+----------------------------------------------------------------------------+
Done.
otrs@znuny:~$ bin/otrs.Console.pl Admin::Package::Uninstall DashboardMyAccountedTimes
Uninstalling package...
Done.
With the DashboardMyAccountedTimes module gone, we ran the package upgrade command again:
otrs@znuny:~$ bin/otrs.Console.pl Admin::Package::UpgradeAll
Fetching online repositories...
Freebie Features... Done
Znuny Open Source Add-ons... Done
Znuny::ITSM... Done
Upgrading installed packages...
All installed packages are already at their latest versions.
Done.
This time this worked without a problem.
After another Apache2 restart (systemctl restart apache2), Znuny was working correctly again and the HTTP 500 Internal Server Error was gone.