OTRS Migration Windows > CentOS 7

Moderator: crythias

Post Reply
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Dear all,

I am currently trying to migrate an OTRS 3.3.13 installation from Windows to CentOS 7, the plan is that after this is successful i will upgrade OTRS to the latest version.

I'm currently following this tutorial to clone database from windows > linux;
https://otrs.github.io/doc/manual/admin ... ndows.html
Database Cloning Section

Actions Taken so far:
Installed 3.3.13 on CentOS 7 (works fine)
Checked remote connectivity to otrs database from windows machine
dropped and re-created otrs database on centos
Installed and configured OTRSCloneDB on windows installation

The problem is that when i'm running the command to start with the cloning, it creates the structure and stops unsuccesfully (see attached screenshot for more information).

I appriciate any help on the topic.

Thanks in advance,
Mike
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Migration Windows > CentOS 7

Post by root »

Check the OTRSCloneDB/OTRS settings regarding regarding the path /tmp/ ;-) I suggest on Windows there is not \tmp\

Do you really need to run CloneDB? Idf you don't change the database type you can use a dump.
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 ?
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Thanks for the prompt reply, will have a look at the highlighted setting. With regards to the database dump, windows is using mysql while centos is using mariadb. I know that both are mysql variants but im not an expert on the subject.

When you say a dump, can i just make a copy of the database move it over to centos and latch it over to centos otrs installation?

Thanks again for your time and looking forward to your feedback.

Regards,
Mike
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Migration Windows > CentOS 7

Post by root »

mdemicoli wrote: When you say a dump, can i just make a copy of the database move it over to centos and latch it over to centos otrs installation?
I've made the experience that a

Code: Select all

mysqldump otrs | gzip > otrs.sql.gz
executed at the old server creates a file you copy to the new server and import it via

Code: Select all

zcat otrs.sql.gz | mysql otrs
work without problems.
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 ?
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Thanks, will test and revert back with feedback.
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Hey root,

First of all I apologize for the late reply, the problem is that this is a side project and only work on it during weekends. With regards to the instructions given i followed them but could not succeed.

The problem is that when i'm executing show databases in mysql it is showing only two, one is named test and another one information_schema. No database otrs is to be found, is there a way to know what is the name of the database and its current location via otrs itself?

The installation of otrs in windows is different than the one in linux, the database and everything is created by the installer itself so no details about it.

Thanks again for your time and looking at your feedback.

Regards,
Mike
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Migration Windows > CentOS 7

Post by root »

Use the parameter -B when creating the dump and the import will look like this:

Code: Select all

zcat otrs.sql.gz | mysql
Or create the otrs database on the new server by using the proper SQL statement:

Code: Select all

mysql -e 'CREATE DATABASE otrs;'
This is all not OTRS related ;-)
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 ?
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

I believe their is a misunderstanding or i haven't explained myself correctly.

The problem is with the mysql database of OTRS on windows; I cannot find a database on this system named otrs to extract, from mysql when I execute show databases it does not display any database named OTRS, instead it lists the ones i mentioed in my previous post. Could it be that OTRS windows installer names OTRS database as test?

Mind you that OTRS on windows still works fine, so the database which ever and wherever it is works fine. Is there a way to check its path directly from otrs settings?

In the meantime thanks for your support, i know this is not OTRS related however I'm not into mysql :P or a database administrator so bare with me.
wurzel
Znuny guru
Posts: 3232
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS Migration Windows > CentOS 7

Post by wurzel »

Hi,

you might consider buy professional support.
Finding a mysql database on windows should be easy, dump -> restore and you'll be fine.
Check Config.pm for your database settings.

If you have a mysql database on Windows, you do not need the CloneDB.

regards,
Florian
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Thanks Florian will consult the config.pm file.

Regards,
Mike
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Hi Guys,

After several attempts, and browsing through loads of documentation i managed to migrate the database, using the following approach;

-> Installed MySQL Workbench
-> Connected to both databases (Windows/CentOS)
-> Used Database Migration Wizard

After the above was complete staring otrs using service otrs start greeted me with a database incompababilty. Looks like my windows version was using MyISAM and CentOS installation used innoDB.

So i converted all the tables from MyISAM -> innoDB using the following within mysql;
ALTER TABLE table_name ENGINE=InnoDB;

Upon converting all tables, otrs service started fine, having said so now i'm having problem accessing it via web.

http://localhost/otrs/index.pl greets me with the following;

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator at root@localhost to inform them of the time this error occurred, and the actions you performed just before this error.
More information about this error may be available in the server error log.

httpd log file:

::1 - - [26/Feb/2017:08:40:49 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:08:40:49 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:08:40:49 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:08:40:49 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:08:40:49 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:13:45 +0100] "GET /otrs/index.pl HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
::1 - - [26/Feb/2017:09:13:45 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
::1 - - [26/Feb/2017:09:14:00 +0100] "GET /otrs/index.pl HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
::1 - - [26/Feb/2017:09:14:23 +0100] "GET /otrs/installer.pl HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
127.0.0.1 - - [26/Feb/2017:09:14:39 +0100] "GET /otrs/index.pl HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
127.0.0.1 - - [26/Feb/2017:09:14:39 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
127.0.0.1 - - [26/Feb/2017:09:14:39 +0100] "GET /favicon.ico HTTP/1.1" 404 209 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:38 +0100] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.4.6 (CentOS) mod_perl/2.0.9dev Perl/v5.16.3 (internal dummy connection)"
::1 - - [26/Feb/2017:09:31:54 +0100] "GET /otrs/index.pl HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"
::1 - - [26/Feb/2017:09:42:55 +0100] "GET /otrs/index.pl?Action=AdminPackageManager HTTP/1.1" 500 527 "-" "Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Firefox/45.0"

Therefore i turn back to you old wise man from OTRS, appriciate any help to have this solved.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Migration Windows > CentOS 7

Post by root »

this looks like the access_log and not error_log (/var/log/httpd)
Please take a look there. Typical checK: what's the output of the command

Code: Select all

sestatus
?
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 ?
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

Here is the last error log for /var/log/httpd

GNU nano 2.3.1 File: error_log-20170326

[Sun Mar 26 18:09:49.053558 2017] [core:notice] [pid 15373] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Sun Mar 26 18:09:49.060133 2017] [suexec:notice] [pid 15373] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using fe80::a00:27ff:fe96:6742. Set the 'ServerName' directive globally to suppress this message
[Sun Mar 26 18:09:49.488543 2017] [auth_digest:notice] [pid 15373] AH01757: generating secret for digest authentication ...
[Sun Mar 26 18:09:49.489400 2017] [lbmethod_heartbeat:notice] [pid 15373] AH02282: No slotmem from mod_heartmonitor
[Sun Mar 26 18:09:49.497298 2017] [mpm_prefork:notice] [pid 15373] AH00163: Apache/2.4.6 (CentOS) mod_perl/2.0.10 Perl/v5.16.3 configured -- resuming normal operations
[Sun Mar 26 18:09:49.497316 2017] [core:notice] [pid 15373] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'
[Sun Mar 26 18:10:32 2017] -e: Use of uninitialized value in shmctl at /opt/otrs//Kernel/System/Log.pm line 305.
ERROR: OTRS-CGI-58 Perl: 5.16.3 OS: linux Time: Sun Mar 26 18:10:32 2017

Message: Can't remove shm for log: Identifier removed

RemoteAddress: ::1
RequestURI: /otrs/index.pl

Traceback (15377):
Module: Kernel::System::Log::CleanUp (OTRS 3.3.13) Line: 306
Module: Kernel::System::Log::new (OTRS 3.3.13) Line: 103
Module: Kernel::System::Web::InterfaceAgent::new (OTRS 3.3.13) Line: 73
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 38
Module: (eval) (v1.99) Line: 207
Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
Module: ModPerl::Registry::handler (v1.99) Line: 32

[Sun Mar 26 18:10:32 2017] -e: Use of uninitialized value in shmread at /opt/otrs//Kernel/System/Log.pm line 282.
[Sun Mar 26 18:10:32.830885 2017] [:error] [pid 15377] [Sun Mar 26 18:10:32 2017] -e: Identifier removed at /opt/otrs//Kernel/System/Log.pm line 281.\n
[Sun Mar 26 18:12:20 2017] -e: Use of uninitialized value in shmctl at /opt/otrs//Kernel/System/Log.pm line 305.
ERROR: OTRS-CGI-58 Perl: 5.16.3 OS: linux Time: Sun Mar 26 18:12:20 2017

Message: Can't remove shm for log: Identifier removed

RemoteAddress: ::1
RequestURI: /otrs/index.pl

Traceback (15382):
Module: Kernel::System::Log::CleanUp (OTRS 3.3.13) Line: 306
Module: Kernel::System::Log::new (OTRS 3.3.13) Line: 103
Module: Kernel::System::Web::InterfaceAgent::new (OTRS 3.3.13) Line: 73
Module: ModPerl::ROOT::ModPerl::Registry::opt_otrs_bin_cgi_2dbin_index_2epl::handler (unknown version) Line: 38
Module: (eval) (v1.99) Line: 207
Module: ModPerl::RegistryCooker::run (v1.99) Line: 207
Module: ModPerl::RegistryCooker::default_handler (v1.99) Line: 173
Module: ModPerl::Registry::handler (v1.99) Line: 32

[Sun Mar 26 18:12:20 2017] -e: Use of uninitialized value in shmread at /opt/otrs//Kernel/System/Log.pm line 282.
[Sun Mar 26 18:12:20.682185 2017] [:error] [pid 15382] [Sun Mar 26 18:12:20 2017] -e: Identifier removed at /opt/otrs//Kernel/System/Log.pm line 281.\n
[Sun Mar 26 18:22:51.712390 2017] [mpm_prefork:notice] [pid 15373] AH00170: caught SIGWINCH, shutting down gracefully

Output from sestatus command:

[root@hestia httpd]# sestatus
SELinux status: enabled
SELinuxfs mount: /sys/fs/selinux
SELinux root directory: /etc/selinux
Loaded policy name: targeted
Current mode: enforcing
Mode from config file: enforcing
Policy MLS status: enabled
Policy deny_unknown status: allowed
Max kernel policy version: 28
[root@hestia httpd]#

Please let me know if you notice anything, i'm new to all this so your help is highly appriceated.
mdemicoli
Znuny newbie
Posts: 25
Joined: 26 Jan 2011, 17:28
Znuny Version: 3.3.13
Real Name: Michael Demicoli
Location: Malta

Re: OTRS Migration Windows > CentOS 7

Post by mdemicoli »

If anyone is able to help i highly appreciate.
root
Administrator
Posts: 3965
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: OTRS Migration Windows > CentOS 7

Post by root »

What's your SELinux status? Check the output of sestatus?
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 ?
wurzel
Znuny guru
Posts: 3232
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: OTRS Migration Windows > CentOS 7

Post by wurzel »

Hi,

hi wrote
[root@hestia httpd]# sestatus
SELinux status: enabled

see the docs
http://doc.otrs.com/doc/manual/admin/st ... -on-centos


disable SELINUX

Flo
OTRS 8 SILVER (Prod)
OTRS 8 auf Debian 11 (Test)
Znuny 7.x latest version testing auf Debian 11

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Post Reply