[Gelöst]DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Hilfe zu OTRS Problemen aller Art
Post Reply
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

[Gelöst]DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hallo zusammen,

ich versuche gerade meine v5.0.20 auf die v6.0.1 zu aktualisieren. Dabei konnte ich mich an die Anleitung halten. Wenn ich das Migrationsskript laufen lasse, bekomme ich eine Fehlermeldung, die ich nicht deuten, bzw. verstehen kann. Ich möchte sie euch zeigen, vielleicht kann mir jemand auf die Sprünge helfen.

Folgendes habe ich getan:

Code: Select all

root@otrs-server:/opt/otrs/# sudo su otrs
otrs@otrs-server:/opt/otrs/$ /opt/otrs/scripts/DBUpdate-to-6.pl
Can't locate object method "Create" via package "Kernel::System::ObjectManager" at /opt/otrs/scripts/DBUpdate-to-6.pl line 89.
otrs@otrs-server:/opt/otrs/$ 
Kann mir jemand bei der Fehlermeldung helfen. Was soll mir das sagen?

(Bei einem ähnlichen Fehler, wurde beschrieben dass die Default.pm verändert wurde. Ich gehe davon aus, aber war mir nicht zu 100% sicher, das sie original ist. Daher habe ich die Default.pm nochmal mit der aktuellen Datei aus der Quelle 6.0.1 überschrieben. Somit ist die Default.pm Original bei mir.)

Danke für eure Hilfe und Grüße
Chris
Last edited by ChrisIAS on 05 Dec 2017, 16:58, edited 1 time in total.
OTRS 5.0.x mit ITSM, LAMP Ubuntu
skullcat2x
Znuny newbie
Posts: 20
Joined: 22 Apr 2016, 18:52
Znuny Version: 6.0.1

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by skullcat2x »

Hallo,

hast du noch ein Backup von der DB die du wieder einspielen könntest?
Ich hatte mal das Problem das dass Migrationsscript ebenfalls abgebrochen ist, nach dem ich den eigentlichen Fehler behoben hatte (hatte die ZZZAuto falsch kopiert) musste ich auch die DB wieder restoren da dass Script doch schon irgendwas damit gemacht hat und somit nicht mehr funktioierte.

Wäre mal ein Versuch wert, also komplett zurück rudern und noch einmal erneut starten.

/opt/otrs wird ja komplett mit der neuen OTRS 6.0.1 überschrieben also:

Code: Select all

sudo mv -R /opt/otrs/ /opt/otrs-old
sudo mv  -R ~/otrs-6-0-1 /opt/otrs
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hi skullcat2x
Ich arbeite gerade auf einer Testmaschine in einer VM. Ja ich kann nochmal komplett neu anfangen. Ich denke, das Teste ich auch gleich nochmal und dann auch direkt mit der druckfrischen v6.0.2. :)

Ich werde berichten.

Viele Grüße
Chris
OTRS 5.0.x mit ITSM, LAMP Ubuntu
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hmm Okay, das Problem von vorhin habe ich nicht mehr, jetzt sieht es so aus :shock: :

Code: Select all

it@otrs-server:/$ sudo /opt/otrs/bin/otrs.SetPermissions.pl
Setting permissions on /opt/otrs
it@otrs-server:/$

it@otrs-server:/$ sudo su otrs
otrs@otrs-server:/$ /opt/otrs/scripts/DBUpdate-to-6.pl
Can't locate DateTime.pm:   ./DateTime.pm: Permission denied at /opt/otrs/Kernel/System/DateTime.pm line 27.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/DateTime.pm line 27.
Compilation failed in require at /opt/otrs/Kernel/Language.pm line 20.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/Language.pm line 20.
Compilation failed in require at /opt/otrs/Kernel/Output/HTML/Layout.pm line 18.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/Output/HTML/Layout.pm line 18.
Compilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 25.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/ObjectManager.pm line 25.
Compilation failed in require at /opt/otrs/scripts/DBUpdate-to-6.pl line 31.
BEGIN failed--compilation aborted at /opt/otrs/scripts/DBUpdate-to-6.pl line 31.
otrs@otrs-server:/$
Die Dateiberechtigungen sehen für mich gut aus. Z.B:

Code: Select all

-rwxrwx---  1 otrs www-data   2963 Dec  5 09:59 DBUpdate-to-6.pl*
Oder hier die DateTime.pm

Code: Select all

-rw-rw----  1 otrs www-data  58963 Dec  5 09:59 DateTime.pm
OTRS 5.0.x mit ITSM, LAMP Ubuntu
root
Administrator
Posts: 3956
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by root »

Hi,

was liefert denn

Code: Select all

getent passwd otrs
und

Code: Select all

ls -l /opt/
?

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hi Roy,

Das kommt dabei raus:

Code: Select all

it@otrs-server:~$ getent passwd otrs
otrs:x:999:33:OTRS user:/opt/otrs/:
it@otrs-server:~$

Code: Select all

it@otrs-server:~$ ls -l /opt/
total 16
drwxr-xr-x 11 otrs www-data 4096 Aug 25 08:41 otrs
drwxr-xr-x 11 otrs www-data 4096 Dec  5 09:44 otrs-Backup
it@otrs-server:~$
Was sagt dir die Rückmeldung des "getent" ?

Danke für deine Hilfe und Grüße
Chris
OTRS 5.0.x mit ITSM, LAMP Ubuntu
root
Administrator
Posts: 3956
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by root »

Hi,

getent Ausgabe sagt mir a) das die primäre Gruppe (33) www-data ist (Ubuntu Standard) und der User OTRS keine Shell hat. Das muss nicht die Ursache sein, aber ich würde es mit

Code: Select all

usermod -s /bin/bash otrs
fixen. Und ich würde das su stets mit dem Parameter - aufrufen um eine Loginshell zu nutzen.

Evtl. ist es das schon.

- Roy
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hi Roy,
Okay, ich habe die bash mitgegeben:

Code: Select all

it@otrs-server:~$ getent passwd otrs
otrs:x:999:33:OTRS user:/opt/otrs/:/bin/bash
it@otrs-server:~$
Die Fehlermeldung hat sich auch etwas verändert, wenn ich nun auch die Shell beim "su" mit übergebe:

Code: Select all

it@otrs-server:~$ sudo su -s /bin/bash otrs
otrs@otrs-server:/home/it$ /opt/otrs/scripts/DBUpdate-to-6.pl
Can't locate DateTime.pm in @INC (you may need to install the DateTime module) (@INC contains: /opt/otrs/Custom /opt/otrs/Kernel/cpan-lib /opt/otrs /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.22.1 /usr/local/share/perl/5.22.1 /usr/lib/x86_64-linux-gnu/perl5/5.22 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.22 /usr/share/perl/5.22 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base .) at /opt/otrs/Kernel/System/DateTime.pm line 27.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/DateTime.pm line 27.
Compilation failed in require at /opt/otrs/Kernel/Language.pm line 20.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/Language.pm line 20.
Compilation failed in require at /opt/otrs/Kernel/Output/HTML/Layout.pm line 18.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/Output/HTML/Layout.pm line 18.
Compilation failed in require at /opt/otrs/Kernel/System/ObjectManager.pm line 25.
BEGIN failed--compilation aborted at /opt/otrs/Kernel/System/ObjectManager.pm line 25.
Compilation failed in require at /opt/otrs/scripts/DBUpdate-to-6.pl line 31.
BEGIN failed--compilation aborted at /opt/otrs/scripts/DBUpdate-to-6.pl line 31.
otrs@otrs-server:/home/it$
Ich deute jetzt daraus "(you may need to install the DateTime module)", dass das Modul nicht installiert ist oder nicht zu finden. Das ist ein Ansatz wo ich mal danach suchen kann, wie man das installiert.
Ich schau mal was ich rausbekomme, dazu.

schon einmal Dankeschön,
Chris
OTRS 5.0.x mit ITSM, LAMP Ubuntu
ChrisIAS
Znuny newbie
Posts: 55
Joined: 12 Jul 2017, 09:43
Znuny Version: 5.0.20 / 3.2.12

Re: DBUpdate-Problem, Bitte um Hilfe bei Deutung der Fehlermeldung

Post by ChrisIAS »

Hi,

Ich habe gerade das DateTime Module nachinstalliert. Mit dem Befehl:

Code: Select all

cpan install DateTime
Das hat furchtbar viel gemacht und ich habe 5Min durchlaufenden Text gesehen, aber scheinbar ist das Modul nun registriert. DBUpdate-to-6.pl läuft und gibt mir nun den Fehler aus, dass mein character_set_database nicht utf8 ist. Aber es läuft ;-)
Das ist eine andere Geschichte und gehört nicht in diesen Thread.

Danke euch beiden für eure Hilfe.

Viele Güße
Chris
OTRS 5.0.x mit ITSM, LAMP Ubuntu
Post Reply