Upgrading to OTRS 6 - Perl Version Problem (Resolved)

Moderator: crythias

Post Reply
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Upgrading to OTRS 6 - Perl Version Problem (Resolved)

Post by traibr »

Hi Guys,

This is my first post on the form.

I've been administrating OTRS for the past year & a half. I had no prior knowledge of OTRS itself; this is my first time administrating it..... yippee :)

Now it looks like this specific OTRS system started on version 3.2.0 & Debian 3.2.63.

The OTRS Appliance had been upgraded to 4.0.8 by the time i took over the system a year and a half ago.

I have now upgraded the system to the below info;

System Description:
----------------------------------------------------------------------------------------------------------------
root@otrs:/# uname -ar
Linux otrs 3.2.0-0.bpo.4-amd64 #1 SMP Debian 3.2.63-2+deb7u1~bpo60+1 x86_64 GNU/Linux
root@otrs:/# cat /opt/otrs/RELEASE
PRODUCT = OTRS
VERSION = 5.0.1
BUILDDATE = Tue Oct 20 01:26:23 CEST 2015
BUILDHOST = otrsbuild.otrs.com
root@otrs:/#
----------------------------------------------------------------------------------------------------------------

I would like to upgrade the system to version 6.0.8 if possible. However I've run into a problem with the Perl version on this Debian system.

The required version of Perl for OTRS 6 is 5.16.0 & the system I'm running at the moment is 5.10.0.

----------------------------------------------------------------------------------------------------------------
## nofilter(TidyAll::Plugin::OTRS::Perl::LayoutObject)

package Kernel::Config::Defaults;

use strict;
use warnings;
use utf8;

# Perl 5.10.0 is the required minimum version to use OTRS.
use 5.010_000;
----------------------------------------------------------------------------------------------------------------

Now I've tried to upgrade the version of Perl through the OS, however only the following source string can be found in the /etc/apt/source.list.

----------------------------------------------------------------------------------------------------------------
root@otrs:/# cat /etc/apt/sources.list
deb http://ftp.otrs.org/pub/otrs/appliance-update/otrs-4.1/ appliance current
root@otrs:/#
----------------------------------------------------------------------------------------------------------------

Which doesn't exist "http://ftp.otrs.org/pub/otrs/appliance-update/otrs-4.1/". Only the following two directory's are present: "otrs-4.0" & "otrs-3.3".....

Which is slightly confusing :-?

Looking at the way in which OTRS has been built into this Debian system. It looks to me to be a very bespoke installation..... symlinks everywhere....

Possible reason Harding of the OS & OTRS integration :shock:

I'm left thinking the following; either leave the system as it is now, on 5.0.1 & upgrade to 5.0.28 or build a new SUSE environment (10 year Support Cycle with an optional 3 year LTSS extension) with OTRS 5.0.1. Then upgrade to 6.0.8.

Seeing as this is a production system (P1 System) & customer facing.... My manager is a little reluctant to move forward with the latter option & prefers the former.

Personally I'd like to move forward with the latter option; with a possibly of integrating ITSM, Freebie Feature & in time Community Edition in the near future.....

What are the pro's & con's of either option?

Would like to get OttHuns opinion on this :mrgreen:

traibr
Last edited by traibr on 04 Sep 2018, 16:50, edited 1 time in total.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by wurzel »

Hi,

you have some issues, not only one. The appliance is not available any more. So the first option is not possible.

Patching the appliance with a new perl, was never intended (it is a 'blackbox')

My approach would be: leave the existing installation as it is

You should set up a new linux server first.
Try to get OTRS 6.0.8 running (new install) without issues in /opt/otrs-6.0.8 directory with a new symbolic link /opt/otrs

Once it is running delete the link /opt/otrs
Try to get OTRS 5.0.xx (latest) running (new install) without issues in /opt/otrs-5.0.xx directory with a new symbolic link /opt/otrs

Once this is running delete the link /opt/otrs
Try to get OTRS 4.0.x running (new install) without issues in /opt/otrs-4.0.x directory with a new symbolic link /opt/otrs

delete all databases, you created


get the database and the config from the appliance to the new server (4.0.x) directory

Now follow the steps from
http://doc.otrs.com/doc/manual/admin/5. ... ading.html
(should be easy with the symbolic links)

Once you did all the steps, follow the next updgrade doc
http://doc.otrs.com/doc/manual/admin/st ... ating.html


you should be fine

It might be hard, but it's worth it.

regards
Florian
Last edited by wurzel on 19 Jul 2018, 17:35, edited 1 time in total.
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.
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by wurzel »

Hi,

traibr wrote: 19 Jul 2018, 17:17 Possible reason Harding of the OS & OTRS integration :shock:
Yes, that was the reason for the appliance. It is a black box. Nothing should be done on the OS level.

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.
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by traibr »

Thanks for the reply Florian, my appreciated!

Looks like my suspiciousness were correct, I'll follow your methodology above and update accordingly

Kind Regards,
Traibr
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by traibr »

Hi Florian,

I'm probably being a little over cautious, however I need to ask the question for peace of mind.

Seeing as I'm on 5.0.1 already, I shouldn't need to follow this part right?

"Quote: Once this is running delete the link /opt/otrs
Try to get OTRS 4.0.x running (new install) without issues in /opt/otrs-4.0.x directory with a new symbolic link /opt/otrs"

Kind Regards,
Traibr
wurzel
Znuny guru
Posts: 3224
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by wurzel »

Hi,

right. If you have a running 5.0.x you do not have to downgrade to a previous version. You start with a 5

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.
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by traibr »

Great thanks!

Kind Regards,
Richard
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by traibr »

Following the steps suggested by Florian; I managed to upgrade our OTRS Appliance (BlackBox) system from 4.0.8 to 6.0.10 Generic system.

First of all, you'll need to backup your original system........ Please follow the Guide provided: http://doc.otrs.com/doc/manual/admin/4. ... store.html & move the following files to a network share or slaved HDD.

Code: Select all

root@HOSTNAME:~# ls /opt/backup/2018-08-07_15-37/
Application.tar.gz  Config.tar.gz  DatabaseBackup.sql.gz
Also make sure to note the encryption/authentications details found in Config.pm file "vi /opt/otrs/Kernel/Config.pm".

Code: Select all

 # ---------------------------------------------------- #
    # database settings                                    #
    # ---------------------------------------------------- #

    # The database host
    $Self->{DatabaseHost} = '127.0.0.1';

    # The database name
    $Self->{Database} = 'otrs';

    # The database user
    $Self->{DatabaseUser} = 'otrs';

    # The password of database user. You also can use bin/otrs.CryptPassword.pl
    # for crypted passwords
    $Self->{DatabasePw} = 'PPPPPPPaaaaassssssswwwwwwooooorrrrddddd';
        $Self->{SecureMode}=1;
        $Self->{"Package::Timeout"}=120;
        $Self->{'SystemID'}=49;
        $Self->{'SessionName'}='OTRSAgentInterface';
### MARKER ###
Now build a new system, I've chosen Debian.

Code: Select all

root@HOSTNAME:~# cat /etc/*release
PRETTY_NAME="Debian GNU/Linux 9 (stretch)"
NAME="Debian GNU/Linux"
VERSION_ID="9"
VERSION="9 (stretch)"
ID=debian
HOME_URL="https://www.debian.org/"
SUPPORT_URL="https://www.debian.org/support"
BUG_REPORT_URL="https://bugs.debian.org/"
Make sure to update/upgrade the system.

Code: Select all

root@HOSTNAME:~# apt update && apt upgrade
Now install the required Database software: Ours being Postgresql.

Code: Select all

root@HOSTNAME:~# apt install postgresql-9.6
Create a "Database User" called "otrs". To do so you will need to login to the "postgres" account. This account was built automatically when installing the postgresql software.

Code: Select all

root@HOSTNAME:~# su - postgres
Now assign a password to this account.

Code: Select all

postgres@HOSTNAME:~$ passwd postgres
Enter new UNIX password: 
Retype new UNIX password: 
passwd: password updated successfully
Now that you've moved into the postgres account, here is were you create the "Database user" called "otrs". Make sure to answer "no" to "Superuser, Create Database & Create more new roles".

Code: Select all

postgres@HOSTNAME:~$ createuser --interactive otrs
Shall the new role be a superuser? (y/n) n
Shall the new role be allowed to create databases? (y/n) n
Shall the new role be allowed to create more new roles? (y/n) n
Next you'll need to set a password for the "Database User" - "otrs". This password will be the password noted in the "Config.pm" file above.

Type the following to access the postgresql console.

Code: Select all

postgres@HOSTNAME:~$ psql
Password:
psql (9.6.10)
Type "help" for help.

postgres=# 
Display the "Database Users" with the following command. As you can see in the below list you will find the "otrs" user you created earlier.

Code: Select all

postgres=# \du
                                   List of roles
 Role name |                         Attributes                         | Member of
-----------+------------------------------------------------------------+-----------
 otrs      |                                                            | {}
 postgres  | Superuser, Create role, Create DB, Replication, Bypass RLS | {}

postgres=#


Set the password for the "otrs" user by typing the following. Now use the password from the Config.pm file.

Code: Select all

postgres=# \password otrs
Enter new password:
Enter it again:
postgres=#
Now we've completed the pre-build for our database import, we can move on to OTRS install itself.

Exit out of the "postgres" account.

Code: Select all

postgres@HOSTNAME:~$ su - root
Password:
root@otrsdev:~#
Install OTRS 6.0.10 & all prerequisites http://doc.otrs.com/doc/manual/admin/st ... -on-debian.

On the following "Step 7: File Permissions" make sure to use the below code or you'll run into permission issues with Apache.

Code: Select all

bin/otrs.SetPermissions.pl --web-group=www-data
Step 8: Database Setup and Basic System Configuration. Make sure you can browse to the following link within step 8, however do not configure the system via the installer link.

If this is successful, you should be good to go with the below steps.

Stop The following processes.

Code: Select all

root@HOSTNAME:~# service cron stop && service apache2 stop && service postgresql stop
Now change the directory to something like "otrs<version>".

Code: Select all

root@HOSTNAME:~# mv /opt/otrs /opt/otrs6010
Make a new directory in /opts/ called "otrs".

Code: Select all

root@HOSTNAME:~# mkdir /opt/otrs
Then create a symlink between the two folders.

Code: Select all

root@HOSTNAME:~# ln -s /opt/otrs6010/* /opt/otrs/
The result should look like the following.

Code: Select all

root@HOSTNAME:~# ls -al otrs
total 8
drwxr-xr-x 2 root root 4096 Sep  3 15:35 .
drwxr-xr-x 5 root root 4096 Sep  3 15:35 ..
lrwxrwxrwx 1 root root   21 Sep  3 15:35 ARCHIVE -> /opt/otrs6010/ARCHIVE
lrwxrwxrwx 1 root root   24 Sep  3 15:35 AUTHORS.md -> /opt/otrs6010/AUTHORS.md
lrwxrwxrwx 1 root root   17 Sep  3 15:35 bin -> /opt/otrs6010/bin
lrwxrwxrwx 1 root root   24 Sep  3 15:35 CHANGES.md -> /opt/otrs6010/CHANGES.md
lrwxrwxrwx 1 root root   29 Sep  3 15:35 CONTRIBUTING.md -> /opt/otrs6010/CONTRIBUTING.md
lrwxrwxrwx 1 root root   21 Sep  3 15:35 COPYING -> /opt/otrs6010/COPYING
lrwxrwxrwx 1 root root   33 Sep  3 15:35 COPYING-Third-Party -> /opt/otrs6010/COPYING-Third-Party
lrwxrwxrwx 1 root root   20 Sep  3 15:35 Custom -> /opt/otrs6010/Custom
lrwxrwxrwx 1 root root   17 Sep  3 15:35 doc -> /opt/otrs6010/doc
lrwxrwxrwx 1 root root   18 Sep  3 15:35 i18n -> /opt/otrs6010/i18n
lrwxrwxrwx 1 root root   24 Sep  3 15:35 INSTALL.md -> /opt/otrs6010/INSTALL.md
lrwxrwxrwx 1 root root   20 Sep  3 15:35 Kernel -> /opt/otrs6010/Kernel
lrwxrwxrwx 1 root root   23 Sep  3 15:35 README.md -> /opt/otrs6010/README.md
lrwxrwxrwx 1 root root   21 Sep  3 15:35 RELEASE -> /opt/otrs6010/RELEASE
lrwxrwxrwx 1 root root   21 Sep  3 15:35 scripts -> /opt/otrs6010/scripts
lrwxrwxrwx 1 root root   25 Sep  3 15:35 UPDATING.md -> /opt/otrs6010/UPDATING.md
lrwxrwxrwx 1 root root   17 Sep  3 15:35 var -> /opt/otrs6010/var
Now start the following services.

Code: Select all

root@HOSTNAME:~# service cron start && service apache2 start  && service postgresql start
Test the following link once again http://localhost/otrs/installer.pl to make sure the system is still working.

Now stop the following services & repeat the process with OTRS 5.0.0 & OTRS 4.0.8.

Code: Select all

root@HOSTNAME:~# service cron stop && service apache2 stop  && service postgresql stop
Now delete delete the symlink.

Code: Select all

root@HOSTNAME:~# rm -rf /opt/otrs
Start with the next installation guide; http://doc.otrs.com/doc/manual/admin/5. ... -on-debian, once you've completed that install move to the next; http://doc.otrs.com/doc/manual/admin/4. ... -on-debian

Once you've install OTRS 5.0.0 & 4.0.0 and managed to get all 3 working via the symlink setup shown above. The "/opt/" directory should look something like this.

Code: Select all

root@HOSTNAME:~# ls -al /opt/
total 28
drwxr-xr-x  7 root root     4096 Sep  4 13:34 .
drwxr-xr-x 22 root root     4096 Aug 17 15:31 ..
drwxr-xr-x  3 root root     4096 Sep  3 13:55 backup
drwxr-xr-x  2 root root     4096 Sep  3 15:35 otrs
drwxr-xr-x  2 otrs www-data 4096 Sep  4 13:34 otrs408
drwxr-xr-x  2 otrs www-data 4096 Sep  4 13:34 otrs500
drwxr-xr-x  9 otrs www-data 4096 Jul 24 16:47 otrs6010
Copy the backup you did at the beginning of this process into the following folder "/opt/backup/" if this folder does not exist, create it. My backup being - folder "2018-08-07_15-37".

Now follow the Restore process found here; http://doc.otrs.com/doc/manual/admin/4. ... store.html

When performing the Restore Process, make sure there is no symlink, I ran into problems for some reason.......

Change the "otrs408" folder to "otrs" & do the restore, then change it back to "otrs408", with a symlink attached to "otrs".

This will inject the backup database into the postgresql system under the database name "otrs". You can check this by running the following command in psql.

Code: Select all

postgres@HOSTNAME:~$ psql
Password:
psql (9.6.10)
Type "help" for help.

postgres=# \list
                                  List of databases
   Name    	|  Owner   | Encoding |   Collate   	|    Ctype       |   Access privileges
-----------+----------+----------+-------------+-------------+-----------------------
 otrs      	| otrs     	| UTF8     | en_GB.UTF-8 | en_GB.UTF-8 |
 postgres  	| postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 |
 template0| postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres          +
           	|          	|          	|           	      |                     | postgres=CTc/postgres
 template1| postgres | UTF8     | en_GB.UTF-8 | en_GB.UTF-8 | =c/postgres          +
           	|          	|          	|             	      |             	     | postgres=CTc/postgres
(4 rows)

postgres=#
Make sure the "otrs" user is also the OWNER of the "otrs" database. If this is not the case, do the following.

Code: Select all

postgres=# ALTER DATABASE otrs OWNER TO otrs;
ALTER DATABASE
postgres=# 
The restore process will also pull over all the required config files to the new system.

Now start the following services.

Code: Select all

root@HOSTNAME:~# service cron start && service apache2 start  && service postgresql start
And use the following link http://<hostname>/otrs/index.pl

This should now access your old installation & database on a new system, using your admin credentials from the old system.

Lastly, following these steps to upgrade the otrs version from 4 to 5.

https://doc.otrs.com/doc/manual/admin/5 ... ading.html

And from OTRS 5 to 6.

https://doc.otrs.com/doc/manual/admin/6 ... ating.html

I've had to write most of this from memory, so there may be mistakes in this process, however the methodology worked a treat and I've managed to get our OTRS Appliance 4.0.8 (Blackbox) upgraded to OTRS 6.0.10 Generic.

@Florian you were right, that was one hell of a long process & upgrade..... Glad it's all done now :D . Again thanks for the help!

Kind Regards,
Richard
traibr
Znuny newbie
Posts: 10
Joined: 17 Jul 2018, 12:21
Znuny Version: 4.0.8
Real Name: Richard Biart

Re: Upgrading to OTRS 6 - Perl Version Problem

Post by traibr »

Problem Resolved

Kind Regards,
Richard
Post Reply