[FYI] Apache behind an IIS Reverse Proxy

Moderator: crythias

Post Reply
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

[FYI] Apache behind an IIS Reverse Proxy

Post by MichaelR »

Hey,

I have OTRS installed on a server on the network, and have seperate IIS server that is our web server. I have installed the Reverse Proxy & ARR stuff, and set up the reverse proxy
Now it looks to be working ok, links work, logins work, all good!

Only issue is, if I click on a link twice really quickly (it sends off 2 requests to OTRS before it has a chance to answer), IIS throws a 502 Bad Gateway error because supposedly Apache has thrown an error...
At the exact same time, Apache throws these errors and restarts a child process?

Code: Select all

ModPerl::Util::exit: (120000) exit was called at C:/PROGRA~2/OTRS/OTRS/Kernel/cpan-lib/CGI/Carp.pm line 561
[Wed Apr 06 15:58:22 2011] [notice] Parent: child process exited with status 255 -- Restarting.
[Wed Apr 06 15:58:24 2011] [notice] Server built: Oct 18 2010 01:58:12
[Wed Apr 06 15:58:24 2011] [notice] Parent: Created child process 2436
Scalars leaked: 1 Scalars leaked: 1 Scalars leaked: 1
[Wed Apr 06 15:58:28 2011] [notice] Child 2436: Child process is running
[Wed Apr 06 15:58:28 2011] [notice] Child 2436: Acquired the start mutex.
[Wed Apr 06 15:58:28 2011] [notice] Child 2436: Starting 64 worker threads.
[Wed Apr 06 15:58:28 2011] [notice] Child 2436: Starting thread to listen on port 80.
Looking at the section of code in Carp.pm and a bit of googling, I learnt that the code deals with content-lengths when replying to a request.
Now not knowing the damage this could cause, I commented out the block of code, and whola! IIS/Apache doesn't throw errors/quit when you double click a link within OTRS really fast.

The lines I commented out in the file (OTRS/Kernal/cpan-lib/CGI/Carp.pm) are

Code: Select all

if ($r->bytes_sent) {
  $r->print($mess);
 $mod_perl == 2 ? ModPerl::Util::exit(0) : $r->exit;
} else {
  # MSIE won't display a custom 500 response unless it is >512 bytes!
  if ($ENV{HTTP_USER_AGENT} =~ /MSIE/) {
    $mess = "<!-- " . (' ' x 513) . " -->\n$mess";
  }
  $r->custom_response(500,$mess);
}
Let me know if anyone has a proper solution to this, knows if there needs to be any configuration to Apache/Perl to get it to run behind a ReverseProxy, or just has any feedback!


Cheers,
Michael
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
gumboot
Znuny newbie
Posts: 8
Joined: 22 Mar 2011, 21:58
Znuny Version: 3.0.9

Re: [FYI] Apache behind an IIS Reverse Proxy

Post by gumboot »

I was having this problem, constantly getting "This page could not be found" and hit refresh and carry on.

Commenting out these lines has made the problem disappear.

Cheers
OTRS 3.0.9 on Ubuntu with MySQL database. Active Directory for Authentication
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: [FYI] Apache behind an IIS Reverse Proxy

Post by MichaelR »

Yeah, it seems as OTRS does a few sanity checks that it has sent the right amount of bytes or something like that. And because it's behind a proxy, that makes it all go down in a giant fireball.

Glad it helped :)
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
MichaelR
Znuny expert
Posts: 250
Joined: 12 Oct 2010, 01:35
Znuny Version: 3.0.9
Company: LRS Health

Re: [FYI] Apache behind an IIS Reverse Proxy

Post by MichaelR »

A weird error I had recently, which might or might not be related to this code change:

I was changing a value in sysconfig, and double clicked on the Submit button at the bottom. This somehow caused OTRS to blank out half my ZZAuto.pm file and blow everything up!
OTRS: 3.0.9 & ITSM 3.0.4 - OS: Windows 7 - DB: MySQL - Heaps of random/useful hacks :)
[Major Code Changes]
ArticleFreeTime1-3
Ability to search ArticleFreeText
guillo
Znuny newbie
Posts: 98
Joined: 16 May 2012, 20:05
Znuny Version: 3.0.7

Re: [FYI] Apache behind an IIS Reverse Proxy

Post by guillo »

So I'm experiencing the same error here... also behind a proxy but diffrent configuration. I'll be checking this out and post my results.

You are saying that the OTRS deleted half your zzzauto file?????? :shock:
OTRS V 3.0.7 Windows 2008 x64 going for 3.1.7
OTRS 3.1.12 on LINUX UBUNTU SERVER
Post Reply