Trouble with 2 OTRS 2.3.4 instances

Hi list, I have 2 OTRS instances and they both are accessing the same database !!! :( I don’t know how to solve itt. Red Hat 6.0 with Apache 2.2.11 with mod_perl, MySql 5.0.45. Each instance is running in different directory (/otrs1 and /otrs2) of course. I created both databases (of course) from scratch and load with initial data script (only one OTRS user). I created the otrs MySql user. When I login to the second instance it access (and shows) data from the first data base !!! I did note that when in Apache config I exchange the order of: /opt/www/data/otrs1/scripts/apache2-perl-startup.pl /opt/www/data/otrs2/scripts/apache2-perl-startup.pl both OTRS instances access data base pointed by the first line. And if I disable one line, both OTRS instances access data pointed by the line enabled. Tests: I did try with 2 mysql users (otrs1 and otrs2). It is not clear to me if I must enable apache2-perl-startup.pl script only once for both otrs instances of if I must enable apache2-perl-startup.pl twice, one for each instance.

Each Installation should have it's own config.pm, Check the Database in that file.
But i would recommend to use two seperate Systems, just to make sure you have no Problems with file permissions and cronjobs.
Regards
Daniel Litzbach
Am 07.07.2014 um 03:14 schrieb "Karlos Jelez"

Thanks Daniel
My 2 OTRS instances are separated, working on their own directory (/otrs1
and /otrs2) with separated Config.pm, Kernel.pm and Defaults.pm files,
separated scripts into httpd.conf Apache config and separated cronjobs.
I did try with 1 and with 2 MySql users to each OTRS instance, with 1 and
with 2 operating system users, but it did not solve the problem.
I think the problem is in how I am using apache2-perl-startup.pl script:
Each script was modified to point to a different directory; I dont know .
Additionally, this instances will be migrated from a FreeBSD box where
currently both 2 OTRS instances are running ok with the same configuration
(Apache, MySql, Perl) I did set up on my new Red Hat.
Any other ideas will be apreciated.
2014-07-06 23:48 GMT-05:00 Daniel Litzbach
Each Installation should have it's own config.pm, Check the Database in that file.
But i would recommend to use two seperate Systems, just to make sure you have no Problems with file permissions and cronjobs.
Regards
*Daniel Litzbach*
Am 07.07.2014 um 03:14 schrieb "Karlos Jelez"
: Hi list,
I have 2 OTRS instances and they both are accessing the same database !!! :(
I don’t know how to solve itt.
Red Hat 6.0 with Apache 2.2.11 with mod_perl, MySql 5.0.45.
Each instance is running in different directory (/otrs1 and /otrs2) of course.
I created both databases (of course) from scratch and load with initial data script (only one OTRS user).
I created the otrs MySql user.
When I login to the second instance it access (and shows) data from the first data base !!!
I did note that when in Apache config I exchange the order of:
/opt/www/data/otrs1/scripts/apache2-perl-startup.pl
/opt/www/data/otrs2/scripts/apache2-perl-startup.pl
both OTRS instances access data base pointed by the first line.
And if I disable one line, both OTRS instances access data pointed by the line enabled.
Tests:
I did try with 2 mysql users (otrs1 and otrs2).
It is not clear to me if I must enable apache2-perl-startup.pl script only once for both otrs instances of if I must enable apache2-perl-startup.pl twice, one for each instance.
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs

Hi.
Am 07.07.2014 um 17:15 schrieb Karlos Jelez

Yeah, the problem is mod_perl -> you'll only have one 'scope' in
which the perl modules are loaded. This means you'll have one
"Kernel::Config" object and thus one database connection.
Of course you could use CGI but this would be slow, and you could use
FastCGI but this is cumbersome, at least in my opinion.
The solution is to set up multiple virtualhosts on the server, for
instance 'otrsprod.example.com' and 'otrstest.example.com' and use
PerlOptions +Parent in the virtualhost configuration. See this blog
post for an explanation:
http://blog.otrs.org/2010/08/11/how-to-run-multiple-mod_perl-supported-otrs-...
--
Mike
On Tue, Jul 8, 2014 at 3:40 PM,
Hi.
Am 07.07.2014 um 17:15 schrieb Karlos Jelez
: My 2 OTRS instances are separated, working on their own directory (/otrs1 and /otrs2) with separated Config.pm, Kernel.pm and Defaults.pm files, separated scripts into httpd.conf Apache config and separated cronjobs.
I did try with 1 and with 2 MySql users to each OTRS instance, with 1 and with 2 operating system users, but it did not solve the problem.
I think the problem is in how I am using apache2-perl-startup.pl script: Each script was modified to point to a different directory; I dont know
Problem is that you are using mod_perl for both instances. Together with DBD (afair) this leads to only one DB connection for both. Try to either disable mod_perl for one instance (you may use fastcgi instead) or find a configuration that allows for two separate perl environments with mod_perl.
Regards — Jan Dreyer
--------------------------------------------------------------------- OTRS mailing list: otrs - Webpage: http://otrs.org/ Archive: http://lists.otrs.org/pipermail/otrs To unsubscribe: http://lists.otrs.org/cgi-bin/listinfo/otrs
participants (4)
-
Daniel Litzbach
-
Jan.Dreyer@bertelsmann.de
-
Karlos Jelez
-
Michiel Beijen