juanluisbaptiste / docker-otrs

The unofficial Znuny/OTRS Ticketing System docker image
https://www.juanbaptiste.tech/category/otrs
GNU Lesser General Public License v3.0
172 stars 101 forks source link

Should container start up take several minutes in the log "Reinstalling OTRS addons..."? #99

Closed pavanfhw closed 3 years ago

pavanfhw commented 3 years ago

Image and OTRS versions

Latest

Describe the issue Container take several minutes to start up at the log "Reinstalling OTRS addons...". My installation doesn't even have addons. Path /opt/otrs/addons is persistent. Running on kubernetes.

Startup output (includes environment variables): https://gist.github.com/pavanfhw/969a7bfb779a6dd73616305b98fe6971

juanluisbaptiste commented 3 years ago

Hi @pavanfhw, it should take some seconds, specially if you don't have any addons installed. I have never tested it on kubernetes.

pavanfhw commented 3 years ago

Hello, thanks for the quick response. I think this behavior is not expected then, I timed the start up and it takes 7 minutes, 99% of the time running su -c "$OTRS_ROOT/bin/otrs.Console.pl Admin::Package::ReinstallAll > /dev/null 2>&1" -s /bin/bash otrs (I assumed it because it is the next command after print_info "Reinstalling OTRS addons..."). I saw that if I set OTRS_UPGRADE to "yes" I'll skip this command. What are the implications of setting this variable? Every time the container is restarted it will try to upgrade OTRS major version?

juanluisbaptiste commented 3 years ago

Yes, you should not use it unless you are upgrading between major versions.

pavanfhw commented 3 years ago

I got the logs from the reinstallation command but they have 13k lines. This is the last part of the logs:

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-304-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-305-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-306-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-307-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-308-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-309-ITSMTicketSolutionTimeAverage.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-400-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-401-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-402-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-403-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-404-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-405-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/stats/ITSMStats-406-ITSMChangeManagement.xml!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

ERROR: OTRS-otrs.Console.pl-Admin::Package::ReinstallAll-10 Perl: 5.16.3 OS: linux Time: Fri Oct 9 10:57:24 2020

 Message: ITSMServiceLevelManagement-6.0.12: No such file: /opt/otrs/var/packagesetup/ITSMServiceLevelManagement.pm!

 Traceback (57): 
   Module: Kernel::System::Package::DeployCheck Line: 1762
   Module: Kernel::System::Console::Command::Admin::Package::ReinstallAll::Run Line: 62
   Module: (eval) Line: 460
   Module: Kernel::System::Console::BaseCommand::Execute Line: 454
   Module: Kernel::System::Console::InterfaceConsole::Run Line: 80
   Module: /opt/otrs//bin/otrs.Console.pl Line: 36

Notice: Install /opt/otrs/var/stats/ITSMStats-001-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-002-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-003-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-004-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-005-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-006-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-007-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-008-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-009-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-010-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-011-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-012-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-013-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-014-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-015-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-016-Ticket.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-100-ITSMConfigItem.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-101-ITSMConfigItem.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-102-ITSMConfigItem.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-103-ITSMConfigItem.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-200-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-201-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-202-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-203-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-204-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-205-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-206-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-207-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-208-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-209-ITSMTicketFirstLevelSolutionRate.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-300-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-301-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-302-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-303-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-304-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-305-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-306-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-307-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-308-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-309-ITSMTicketSolutionTimeAverage.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-400-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-401-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-402-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-403-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-404-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-405-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/stats/ITSMStats-406-ITSMChangeManagement.xml (660)!
Notice: Install /opt/otrs/var/packagesetup/ITSMServiceLevelManagement.pm (660)!
Code: 

        # create the package name
        my $CodeModule = 'var::packagesetup::' . $Param{Structure}->{Name}->{Content};

        $Kernel::OM->Get($CodeModule)->CodeReinstall();

###### IT GETS STUCK HERE FOR MINUTES ############

Reinstalling all OTRS packages that are not correctly deployed...
8 package(s) reinstalled.

Before that are just more errors like the ones in the beginning. Can you help me understand whats is happening, why are those errors happening, why is he reinstalling 8 packages on a first time installation? In the logs there is the line Found empty /opt/otrs/Kernel/, copying default configuration to it...

This also happens every time the container is restarted, is a persistent volume missing? I am setting the kubernetes equivalent to

- './volumes/config:/opt/otrs/Kernel'
- './volumes/skins:/opt/otrs/var/httpd/htdocs/skins/'
- './volumes/backup:/var/otrs/backups'
- './volumes/addons:/opt/otrs/addons'
- './volumes/db_upgrade:/opt/otrs/db_upgrade'
juanluisbaptiste commented 3 years ago

You said you had not installed any addon but you did, you added ITSM, so this is not a standard install and you are not providing a clear description of your installation.

pavanfhw commented 3 years ago

Sorry, that was what was passed to me. We are migrating to a new server. I applied the dump from the old mariadb to the one on the new server. But all paths in the OTRS container are new volumes, I though addons would be in the OTRS files, in /opt/otrs/addons.

juanluisbaptiste commented 3 years ago

Sorry, that was what was passed to me. We are migrating to a new server. I applied the dump from the old mariadb to the one on the new server. But all paths in the OTRS container are new volumes, I though addons would be in the OTRS files, in /opt/otrs/addons.

Tha folder is for new addons, if you are migrating from another install you also need the contents of the /opt/otrs/ folder, not just the db dump.

Closing as this issue is not related to this image.

pavanfhw commented 3 years ago

Thanks for the help! Sorry for any inconvenients.

juanluisbaptiste commented 3 years ago

I would recommend you to create a backup from within OTRS following the official instructions, and then restore it on this image following the restore instructions.