procedure for upgrading OTRS 6.0 to Znuny 6.1

Moderator: crythias

Post Reply
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

I'm running the following:

OTRS 6.0.27
CentOS 7.3.1611
MariaDB 5.5.60
Perl 5.16.3

I need to upgrade it to Znuny 6.1, and eventually to Znuny 6.4 (for OAuth2)

I tried follow the instructions at:
https://doc.znuny.org/manual/releases/i ... e-6.1.html

However, when I ran 'yum update -y https://download.znuny.org/releases/RPM ... noarch.rpm'
I got:
Examining /var/tmp/yum-root-jXNLKW/znuny-6.1.1-01.noarch.rpm: znuny-6.1.1-01.noarch
Package znuny not installed, cannot update it. Run yum install to install it instead.

Also, all article attachments are in /opt/otrs/var/article (mount - /dev/sdb1 on /opt/otrs/var/article type xfs)

If I followed the OTRS 6 Admin manual it would have me move the entire otrs directory to otrs-old. Should I unmount /dev/sdb1 before running any upgrade?

What is the correct way to do this?

Thanks for your help!
root
Administrator
Posts: 4143
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

Hi,
RichH wrote: 01 Nov 2022, 20:48 I tried follow the instructions at:
https://doc.znuny.org/manual/releases/i ... e-6.1.html

However, when I ran 'yum update -y https://download.znuny.org/releases/RPM ... noarch.rpm'
I got:
Examining /var/tmp/yum-root-jXNLKW/znuny-6.1.1-01.noarch.rpm: znuny-6.1.1-01.noarch
Package znuny not installed, cannot update it. Run yum install to install it instead.
if depends what you have installed. If it's an otrs RPM the use yum install, if you alreadu have an znuny (6.0.x) RPM use yum update.
RichH wrote: 01 Nov 2022, 20:48 Also, all article attachments are in /opt/otrs/var/article (mount - /dev/sdb1 on /opt/otrs/var/article type xfs)

If I followed the OTRS 6 Admin manual it would have me move the entire otrs directory to otrs-old. Should I unmount /dev/sdb1 before running any upgrade?

What is the correct way to do this?
I would, especially when using RPMs place this directory outside of the application directory. E.g. something mount it to /opt/data/article or whatever you like and make sure the permissions are properly set:
SCR-20221101-u8b.png
Then set the system configuration Ticket::Article::Backend::MIMEBase::ArticleDataDir to the directory, in my example:

Code: Select all

bin/otrs.Console.pl Admin::Config;:Update --setting-name Ticket::Article::Backend::MIMEBase::ArticleDataDir --value /opt/data/article/
- Roy
You do not have the required permissions to view the files attached to this post.
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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Thanks for the advice!

I'm going to try moving the article partition from /opt/otrs/var/article to /opt/data/article as you suggested before I do any upgrade.

Next I'll run: /opt/otrs/bin/otrs.Console.pl Admin::Config;:Update --setting-name Ticket::Article::Backend::MIMEBase::ArticleDataDir --value /opt/data/article/

Can I just run otrs.SetPermissions.pl to set the permissions on /opt/data/article? Will it need any additional parameters?

Also, before running 'yum -y install' for the rpm, should I move /opt/otrs to /opt/otrs-old first or should I let it install over the old version?

Thanks for your help!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Nevermind about moving the article partition to /opt/data/article.

I did it on my Dev system without any issues - just had to set ownership and perms with chown & chmod.

But if you could tell me whether to move the /opt/otrs to /opt/otrs-old before running yum -y install, it would be greatly appreciated.

Thanks!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

I've successfully upgraded from OTRS 6.0 to Znuny 6.3 on our Dev system, but when I try to upgrade to 6.4 I'm getting an error
when running "otrs.checkmodules.pl --all":

"iCal::Parser.....................Not installed! To install, you can use: 'yum install "perl(iCal::Parser)"'. (required - Required for calendar events.)"

I tried running 'yum install "perl(iCal::Parser)"' and 'yum -y install perl-iCal-Parser', but both say:

"No package perl(iCal::Parser) available" and "No package perl-iCal-Parser available"

I was hoping that it wouldn't matter, but when I ran "scripts/MigrateToZnuny6_4.pl"

I got:
"Error: not all required Perl modules are installed. Please follow the recommendations to install them, and then run the upgrade script again."

My repo list is:

repo id repo name base/7/x86_64 CentOS-7 - Base epel/x86_64 Extra Packages for Enterprise Linux 7 - x86_64 epmel Extra Perl Modules for Enterprise Linux 7 extras/7/x86_64 CentOS-7 - Extras updates/7/x86_64 CentOS-7 - Updates

What do I need to do to get these installed?

Thanks!
root
Administrator
Posts: 4143
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

Hi,

Then use cpan or cpanm to install the missing module.

- 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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Thanks...that worked!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

Things are moving along well, except that I'll have to wait until my company's mail admin gets back from holidays to download a new OAuth2 token...

Meanwhile, could you answer this question?

There is one more field in the 'Exchange Online' OAuth2 template that is not mentioned in the instructions at:

https://www.znuny.org/en/blog/modern-au ... -microsoft

This is the "Access Token Scope" field. The default is "https://outlook.office.com/IMAP.AccessAsUser.All https://outlook.office.com/POP.AccessAsUser.All https://outlook.office.com/SMTP.Send offline_access"

We're connecting to my company's AD Azure. Can I leave this at the default or is this a parameter that has to be unique for out directory? If so, where can I get it?

Thanks!
root
Administrator
Posts: 4143
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

Hi,

Leave the default value for the scope. You need only to change this field for other web services you like to integrate.

- 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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Thanks again!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

I'm still not quite there yet....

Our email admin set all the parameters for creating the OAuth2 Configuration in OTRS, he clicked the 'Request New Token', entered his credentials & MFA info and everything seemed to be working, but when the application tried to connect to the OTRS server with the token, it was unable to connect.

I pretty sure that the problem is that https (ssl) was never configured on the server. So, I've been trying to enable https, but am having problems:

I set the httptype in OTRS to https
I ran yum -y install mod_ssl
I created a self-signed certificate using openssl and put it in the default locations per the ssl.conf file
I set the ServerName parameter to the FQDN of the server in the ssl.conf file
I restarted the httpd service

I can connect to port 443 using 'Telnet %servername% 443, but no browsers can connect via https

The openssl version is:
OpenSSL 1.0.2k-fips 26 Jan 2017

Any idea what I'm missing?

Thanks!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hello again...

I found that I didn't have Crypt::OpenSSL::X509 installed, so I installed it and rebooted, but still no luck...

Any ideas?

Thanks again!
root
Administrator
Posts: 4143
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

Hi Rich,

It's only required if you like to use JWT with X509 certificates to authenticate for outgoing web services. Do you really need that?

- 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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Roy,

Thanks for the Reply. I don't need JWT.

But I still need help figuring out why https isn't working.

Any ideas?

Thanks,
Rich
root
Administrator
Posts: 4143
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

Hi,

https is entirely handled by the web server. Here are the typical questions:

- is there any error message?
- is mod_ssl enabled and configured?
- is the firewall, port 443/tcp, open?
- is there any firewall between clients and the Znuny server?

- 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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

It turned out to be the firewall on the Server - I could have sworn that the firewall (IPTables) was shut off in OTRS, but that was many versions ago.

I entered:
firewall-cmd --permanent --zone=public --add-service=https
firewall-cmd --reload

and it worked!! Yipee!!!

Now I just have to figure out how to install my Companies AD generated certificate & certificate chain...

Thanks again!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hello again!

It looks like we're almost there...but...

We opened port 143 & 993 on our external firewall and the fetchmail seems to connect, but it does not download any emails.

The Znuny system logs shows that it opens the connection, but has an error:

[Fri Jan 13 11:13:44 2023][Error][Kernel::System::MailAccount::IMAP::_Fetch][347] Error while retrieving the messages 'IMAPTLS': Could not select:

As always, your help is greatly appreciated!

Thanks!
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

I ran otrs.Console.pl Maint::PostMaster::MailAccountFetch --debug
MailAccountFetch.debug.txt
To summarize:

ERROR: 3 BAD User is authenticated but not connected. at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1364.
ERROR: 3 BAD User is authenticated but not connected. at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1274.
ERROR: OTRS-otrs.Console.pl-Maint::PostMaster::MailAccountFetch-11 Perl: 5.16.3 OS: linux Time: Fri Jan 13 16:32:48 2023
Message: Error while retrieving the messages 'IMAPTLS': Could not select:
ERROR: 4 BAD User is authenticated but not connected. at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1364.
ERROR: * BYE Connection closed. 14 at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1415.
ERROR: * BYE Connection closed. 14 at /usr/share/perl5/vendor_perl/Mail/IMAPClient.pm line 1274.

Is this an issue with permissions on the Outlook365 mailbox? Do we have to set the permissions on the mailbox to the account that requested the token?

Any other ideas?

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

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by root »

RichH wrote: 13 Jan 2023, 19:13 Do we have to set the permissions on the mailbox to the account that requested the token?
Hi Rich,

Yes, this will probably be the solution.

- 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 ?
RichH
Znuny newbie
Posts: 62
Joined: 13 Mar 2015, 18:34
Znuny Version: 6.4
Real Name: Rich Hagan
Company: Victorinox Swiss Army, Inc.

Re: procedure for upgrading OTRS 6.0 to Znuny 6.1

Post by RichH »

Hi,

Just wanted to say thanks for your help. I've successfully upgraded out Production system to Znuny 6.4, and switched to OAuth2!

Thanks again!
Post Reply