FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Moderator: crythias

Post Reply
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Hi Community,

Just upgraded Znuny 6.5.0 to 7.0.7 and freaked out when Apache refused to start after the upgrade.

As it turns out, I had to update the "scripts/apache2-perl-startup.pl" script as follows:

Pre-upgrade (v6.5.0) content:
use lib "/opt/otrs/";
use lib "/opt/otrs/Kernel/cpan-lib";
use lib "/opt/otrs/Custom";

Post-upgrade (v7.0.7) content:
use lib "/opt/znuny/";
use lib "/opt/znuny/Kernel/cpan-lib";
use lib "/opt/znuny/Custom";

Since my Znuny installation, which I ported from OTRS ((Community)), lives in /opt/otrs, the v7.0.7 paths were not to be found.
I edited the "scripts/apache2-perl-startup.pl" file, replacing "/opt/znuny" with "/opt/otrs".

I did not have this problem while updating between v6 minor versions. The documentation at https://doc.znuny.org/znuny/releases/in ... e-7.0.html makes no mention of this change in the path.

I got the hint from the "/var/log/httpd/error_log" file (OS is CentOS 7):

[Fri Jun 30 14:11:55.094066 2023] [perl:error] [pid 16293] Can't load Perl file: /opt/otrs/scripts/apache2-perl-startup.pl for server MYSERVER, exiting.

I see two options that would help streamline the upgrade process:
1. Build some logic into the upgrade process to detect the pre-upgrade home directory and suggest configuration changes where appropriate.
2. Document such changes in the version update process documentation.

Hope someone will find it useful.
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Oops... The interface isn't loading correctly, and even though I use the latest Edge and Chrome versions, it tells me that my browser is too old.

Back to the drawing board.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by root »

zerszenyi wrote: 30 Jun 2023, 13:59 The documentation at https://doc.znuny.org/znuny/releases/in ... e-7.0.html makes no mention of this change in the path.
Really?
SCR-20230630-mukm.png
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 ?
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Thanks Roy for bringing it out.

Yes, I saw that. However...

"If you decide to change,..." - I decided NOT to, so I kept my old path (/opt/otrs) and old user (otrs). According to the IMPORTANT section, I only need to reconfigure the path and user if I choose to go with the new user and new path. If I keep the path as /opt/otrs and the otrs user then I need not reconfigure anything.

The httpd daemon failed to start. As it turns out, the scripts/apache2-perl-startup.pl script has "/otrs/znuny" hardcoded.

I changed the paths in the script and the httpd daemon started. However I got this in my browser:

Znuny7_Error.png

Then I went on to create the /opt/znuny symlink and updated the Alias and ScriptAlias entries in my /etc/httpd/conf.d/zzz_otrs.conf file as suggested at viewtopic.php?f=53&t=43565

Same result: my latest browser seems to be too old, and all controls/buttons/hyperlinks are inactive.

Clearly the IMPORTANT section in the update document doesn't tell the full story, at least not to someone like me coming from the Microsoft world.

Your help would be greatly appreciated.

Thank you :-)
You do not have the required permissions to view the files attached to this post.
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

OK, restored the before-the-upgrade version from backup and tried a couple more things.

Wherever I saw <HOME_DIR> I substituted it with /opt/otrs. However some of the commands have /opt/znuny hardcoded, such as:

for f in $(find -L /opt/znuny -maxdepth 1 -type f -name .\* -not -name \*.dist); do cp -av "$f" /opt/znuny-7.0.7/; done

I suspect there are other instances where the path is hardcoded according to the new product name. An example that I encountered is the scripts/apache2-perl-startup.pl script.

To cater for all possibilities I created an /opt/znuny symlink pointing to my working /opt/znuny-6.5.2 folder in addition to the existing /opt/otrs symlink, then when all update steps have been completed, I re-pointerd both /opt/otrs and /opt/znuny to /opt/znuny-7.0.7.

Unfortunately I am getting the same error; my browser is deemed too old and nothing works.

Has anyone else had this problem? If so, did you manage to resolve, and if so, how?

Thanks.
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

OK, restored the before-the-upgrade version from backup and tried a couple more things.

Wherever I saw <HOME_DIR> I substituted it with /opt/otrs. However some of the commands have /opt/znuny hardcoded, such as:

Code: Select all

for f in $(find -L /opt/znuny -maxdepth 1 -type f -name .\* -not -name \*.dist); do cp -av "$f" /opt/znuny-7.0.7/; done
I suspect there are other instances where the path is hardcoded according to the new product name. An example that I encountered is the scripts/apache2-perl-startup.pl script.

To cater for all possibilities I created an /opt/znuny symlink pointing to my working /opt/znuny-6.5.2 folder in addition to the existing /opt/otrs symlink, then when all update steps have been completed, I re-pointerd both /opt/otrs and /opt/znuny to /opt/znuny-7.0.7.

Unfortunately I am getting the same error; my browser is deemed too old and nothing works.

Has anyone else had this problem? If so, did you manage to resolve, and if so, how?

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

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by root »

Hi,

Put these line into your Kernel/Config.pm:

Code: Select all

$Self->{'Frontend::WebPath'} =  '/otrs-web/';
$Self->{'ScriptAlias'} =  'otrs/';
Or change these settings via znuny.Console.pl

- 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 ?
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Thank Roy, they were already set to these values.
root
Administrator
Posts: 3968
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by root »

Hi,

Please delete the browser cache and open the login page again. The browser console/inspector should tell you which requested files are missing (error 404).

- 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 ?
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Hi Roy, see attached.

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

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by root »

HI,

I would need one of the URLs where the response code is 404.

- 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 ?
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Hi Roy,

Excerpt from the /etc/httpd/conf.d/zzz_otrs.conf file:

etc-httpd-conf.d-zzz_otrs.conf.png

The 404 errors in the log:

Error 404 Log.png

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

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by root »

Hi,

The error log shows access to /znuny-web/ This is the values of the system configuration 'Frontend::WebPath if not changed. Please add

Code: Select all

$Self->{'Frontend::WebPath'} =  '/otrs-web/'; 
to your Kernel/Config.pm and execute:

bin/otrs.Console.pl Maint::Cache::Delete
bin/otrs.Console.pl Maint::Loader::CacheCleanup

- 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 ?
zerszenyi
Znuny newbie
Posts: 17
Joined: 27 Sep 2021, 12:41
Znuny Version: 6.0
Real Name: Zoltan Erszenyi

Re: FYI only - Path change in v7.0, Apache won't start after upgrade from v6.5

Post by zerszenyi »

Thanks Roy. Did that and got the logon screen display correctly. However once logged on, I am getting an internal server error:
Internal server error.png

I noticed a double-slash in the Apache ssl_error.log, not sure of its significance:

Double-slash.png
You do not have the required permissions to view the files attached to this post.
Post Reply