OTRS – Erreurs et Solutions

Vous trouverez ci-dessous les cas rencontrés et les solutions apportées :

Les Emails partent bien mais aucun email reçu ?

Visualiser l’ Erreur :

sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::Daemon::Summary

ou    Se connecter en Admin sur OTRS :  Menu : Administration >  Journaux du Systeme

1) Erreur MailAccountFetch : Unable to register the process in the database


OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-11
There was an error executing Execute() in Kernel::System::Console::Command::Maint::PostMaster::MailAccountFetch:
Error: Unable to register the process in the database. Is another instance still running?
——————————————————————————————————————

Solution 1 : pour débloquer les e-mails : lecture forcée (avec l’option  –force-pid) :  120 emails débloqués …
sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch –force-pid

Solution 2 : Si encore KO sur cette erreur, Se connecter à : http://172.20.0.221/phpmyadmin/
So I looked at the database with phpmyadmin and I’ve seen a row with the pid in the table “process_id”. After emptying this table everything worked again.
(non trouvé ?)

2) Error MailAccountFetch : “Email Too Big”

Solution Param OTRS:
Sysconfig: Core::PostMaster : PostMasterMaxEmailSize
> j’ai augmenté la taille maxi des mails de 16000 à 32000 le 24/2/2017

Relancer la lecture normale POP :
sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::PostMaster::MailAccountFetch

Erreur MySQL ?

  • Pour voir si MySQL tourne et nom des fichiers LOG ? : ps aux | grep mysqld
  • Visu si erreur : more /var/log/musql/error.log
    Si bcp d’erreurs : grep ERROR error.log  
  • Relancer MySQL : /etc/init.d/mysql restart

Relancer OTRS et verif si erreurs ?

  • su otrs
  • /opt/otrs/bin/otrs.Daemon.pl stop
  • /opt/otrs/bin/otrs.Daemon.pl start
  • ou en mode ligne de commande : su -c “/opt/otrs/bin/otrs.Daemon.pl start” -s /bin/bash otrs
  • sudo -u otrs /opt/otrs/bin/otrs.Console.pl Maint::Daemon::Summary  –> O erreur !

Refresh the configuration cache and delete caches

Please run (as user otrs, not as root):
shell> cd /opt/otrs/
shell> bin/otrs.Console.pl Maint::Config::Rebuild
shell> bin/otrs.Console.pl Maint::Cache::Delete

Restart your services

e. g. (depends on used services):
shell> /etc/init.d/apache start
shell> /etc/init.d/postfix start
shell> /etc/init.d/cron start

MySQL : If you use the MySQL table type MyISAM (which is the default), and have deleted a large
part of a table or if you have made many changes to a table with variable-length rows (tables that have VARCHAR, BLOB or TEXT columns), you must defragment the datafile (tables) with the “optimize” command.
You should try this if the mysqld daemon needs a lot of your CPU time

Optimize the tables – ticket, ticket_history and article (see Script below)

shell> mysql -u user -p database
mysql> optimize table ticket;
mysql> optimize table ticket_history;
mysql> optimize table article;

Effacer un seul ticket :

mysql> DELETE FROM ticket WHERE id = 815;

Créer des tâches ponctuelles ou périodiques dans l’Automate Générique :

Réglage de la crontab interne à OTRS :