Page Index Toggle Pages: [1] 2 
Topic Tools
Hot Topic (More than 10 Replies) I get 502.2 error when running setup.pl (Read 200 times)
Spitball
YaBB Newcomer
*
Offline



Posts: 20
Location: Charlotte, NC

None
I get 502.2 error when running setup.pl
Nov 30th, 2010 at 10:15pm
Post Tools
"HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are ": /default/default.html at ./Sources/Subs.pl line 214. HTTP/1.0 404 Not Found Content-Type: text/html ".

I get this message trying to install YaBB 2.5.  Our website host (Web.com / Interland) recently upgraded their servers and YaBB 2.1 quit working after re-installing FrontPage Extensions.  Working with their Help Desk is painful!  Ultimately, I deleted the CGI-BIN/YaBB2 folders (kept the stuff in the HTDOCS folders) and tried a new install of 2.5.  The host is a Windows server with IIS.

What's next?
website is http://www.bradfieldfarms.com/cgi-bin/yabb2/setup.pl
« Last Edit: Nov 30th, 2010 at 10:35pm by Spitball »  

Thanks!
Back to top
WWW  
IP Logged
 
Captain John
Ex Member


Re: I get 502.2 error when running setup.pl
Reply #1 - Dec 1st, 2010 at 3:23am
Post Tools
This "usually" happens instead of a 500IE on Linux/Unix servers and caused "usually" by a corrupt file that was incorrectly uploaded.  It is VERY important NOT to use the Auto transfer mode in an FTP program.  ALL files under the yabb2 folder MUST be uploaded in Ascii Transfer mode.
  
Back to top
 
IP Logged
 
Spitball
YaBB Newcomer
*
Offline



Posts: 20
Location: Charlotte, NC

None
Re: I get 502.2 error when running setup.pl
Reply #2 - Dec 1st, 2010 at 5:52am
Post Tools
OK, I'll blow those away and re-upload the YaBB files, ensuring that I'm in ASCII mode.
  

Thanks!
Back to top
WWW  
IP Logged
 
Meta4XYZ
YaBB Newcomer
*
Offline



Posts: 17

None
Re: I get 502.2 error when running setup.pl
Reply #3 - Jul 2nd, 2011 at 8:08pm
Post Tools
Sorry to drudge up a zombie post, but I'm running into the exact same issue.  I'm attempting to install YaBB v2.5AE on a Windows Server 2008 R2 box running IIS 7.5.  I've tried with both 64-bit and 32-bit ActivePerl and get the same results.  When I run Setup.pl, the login screen appears just fine.  When I enter the password ("admin" or anything else), I get the following error:

Quote:
HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are ": /default/default.html at ./Sources/Subs.pl line 214. HTTP/1.0 404 Not Found Cache-Control: no-cache, must-revalidate Pragma: no-cache Content-Type: text/html ".


Here is line 214 of Subs.pl:

Quote:
fopen(TEMPLATE, $yytemplate) || die("$maintxt{'23'}: $yytemplate");


If it helps, here is a snapshot of the request from the IIS logs:

Quote:
2011-07-02 18:37:43 W3SVC1 TWN-WEB 10.1.1.51 POST /Forum/cgi-bin/yabb2/Setup.pl action=adminlogin2 80 - 10.1.1.51 HTTP/1.1 Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+6.1;+WOW64;+Trident/5.0;+SLCC2;+.N
ET+CLR+2.0.50727;+.NET+CLR+3.5.30729;+.NET+CLR+3.0.30729;+.NET4.0C;+.NET4.0E) - http://www/Forum/cgi-bin/yabb2/setup.pl www 502 2 259 5452 532 171


Is there a way to track down the 404 referenced in the error page?  The request doesn't appear in the IIS log.

For the record, I'm unzipping and dropping the files directly from the zip file, not FTP'ing them.  I've re-downloaded and replaced the entire forum package (cgi-bin and public_html) a couple times and have even uninstalled an reinstalled IIS, all to no avail.
  
Back to top
 
IP Logged
 
Captain John
Ex Member


Re: I get 502.2 error when running setup.pl
Reply #4 - Jul 3rd, 2011 at 2:27am
Post Tools
JonB is are Windows expert ... but until he sees this Post, see the YaBB Codex here for help - http://www.yabbforum.com/codex/YaBB.pl?board=windows
  
Back to top
 
IP Logged
 
Meta4XYZ
YaBB Newcomer
*
Offline



Posts: 17

None
Re: I get 502.2 error when running setup.pl
Reply #5 - Jul 3rd, 2011 at 4:44pm
Post Tools
Thanks for the response, Captain John.  I've looked through each item on the Codex page and can't find anything that does the trick for me.  Based on the error message I'm getting, it seems like Setup.pl bombs out when Subs.pl returns the URL of default.html.  I can navigate directly to default.html, so it appears to be a lookup/reference issue, not a permissions issue.

I ran Process Monitor while attempting to load Setup.pl, and I didn't see a lookup attempt for Default.html.  I've got a couple screenshots, the first depicts the failure page from IIS and the second shows the results from Process Monitor.  They're sizable, so I'll hyperlink them:

http://www.TWNCommunications.Net/Other/YaBBTrouble.jpg
http://www.TWNCommunications.Net/Other/YaBBTrouble2.jpg

Thanks again, guys!
« Last Edit: Jul 3rd, 2011 at 4:45pm by Meta4XYZ »  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: I get 502.2 error when running setup.pl
Reply #6 - Jul 11th, 2011 at 4:15pm
Post Tools
What Perl distribution and version are you running?

Smiley
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Meta4XYZ
YaBB Newcomer
*
Offline



Posts: 17

None
Re: I get 502.2 error when running setup.pl
Reply #7 - Jul 12th, 2011 at 2:20am
Post Tools
ActivePerl 5.12.4.1205.  I've tried both the 32-bit and 64-bit flavors.
  
Back to top
 
IP Logged
 
binary
YaBB Newcomer
*
Offline



Posts: 25
Re: I get 502.2 error when running setup.pl
Reply #8 - Jul 27th, 2011 at 9:13pm
Post Tools
Exact same issue here Sad

Platform:
Server 2008 Standard
64 bit ActivePerl 5.14.1 Build 1401
IIS 7


HTTP Error 502.2 - Bad Gateway
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are ": /default/default.html at ./Sources/Subs.pl line 214. HTTP/1.0 404 Not Found Cache-Control: no-cache, must-revalidate Pragma: no-cache Content-Type: text/html ".
  
Back to top
 
IP Logged
 
bhushan
YaBB Newcomer
*
Offline



Posts: 1

None
Re: I get 502.2 error when running setup.pl
Reply #9 - Jul 29th, 2011 at 5:45am
Post Tools
You might have used perl.exe in handler mapping

use perlex30.dll instead without any parameters

I got it solved that way
  
Back to top
 
IP Logged
 
binary
YaBB Newcomer
*
Offline



Posts: 25
Re: I get 502.2 error when running setup.pl
Reply #10 - Jul 29th, 2011 at 9:57am
Post Tools
Indeed - I am using perl.exe
C:\Perl\bin\perl.exe "%s" %s

I don't even have a perlex30.dll - Isn't that just for the 32bit ActivePerl build?
  
Back to top
 
IP Logged
 
binary
YaBB Newcomer
*
Offline



Posts: 25
Re: I get 502.2 error when running setup.pl
Reply #11 - Jul 29th, 2011 at 7:17pm
Post Tools
Well - I took a leap of faith and installed x86 ActiveState, and associated perlex30.dll instead of Perl.exe

And something definetely happened.. Something weird.
Now, when opening setup.pl and clicking "submit".. This happens..


Everytime i click on submit, a duplicate form shows up..
I don't get it..
« Last Edit: Jul 29th, 2011 at 7:18pm by binary »  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: I get 502.2 error when running setup.pl
Reply #12 - Aug 4th, 2011 at 1:25pm
Post Tools
Yep, I have seen that.

yes, it was on a 64 bit version of Server 2008 (mine) running Active Perl.

nope, I was not able to solve it.  It was not a production server, and not one I planned to use, so I abandoned the effort. That was over two years ago, and I know a bit more about the issue now.

AFAIK, the underlying problem is related to the way the processes run in the Windows core.  I was not able to resolve that issue. I have replied as such several times before.  

The prior poster I believe is somewhat correct, you need to use the Active States DLL as the handler.  in reality, you want the IIS Process to call Perl.  The IIS process runs as a driver in the Windows core now, so you want everything to run within that.  An 'outside' executable (such as a Perl exe file) will be unaware of what IIS is really doing, IIS (since IIS6) has an elaborate internal timing model, which is what allows it to run FastCGI.  

First question - did you use the 64bit ActiveStates installer???? (jump to bottom for a bit more on this)
That might be the issue.

I have YaBB running on several Windows servers, and I know others have it running on Hosting operations that run IIS 7, so its do-able.  Whether they are running 64 bit or not , I don't know.

I do have several suggestions for you -

I have found this site VERY useful in the past -

Try the setup instructions for installing Active Perl here:
http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx

lol - you are not the only one with issues -
http://forums.iis.net/p/1165965/1938014.aspx

This last one has a whole batch of troubleshooting suggestions.

Here's the official dope:
http://docs.activestate.com/activeperl/5.10/faq/Windows/ActivePerl-Winfaq6.html

Are you only using IIS to run YaBB, or are there other things cooking???

If not, you might consider XAMMP or ApacheLounge's Apache servers for Windows.  If you go that route DISABLE mod-perl (YaBB is NOT mod_perl compatible) before attempting to install YaBB AND be sure to put it in cgi-bin (unless you want to become an expert in the Apache httpd.conf. In those cases, you will use the perl\bin\perl.exe in the shebang.  Apache on Windows is a thread-safe variant, so we sidestep the timing issues.

I suggest this Google search "activestate's perl on IIS".


I'm actually fairly expert on IIS, I have had it running since Windows Server 4.0 (expansion kit), and I have had several Windows Servers running IIS since about 1998-1999 and I have 3 chugging away, very reliably right now.

Unfortunately, Perl is a 'red-headed step-child' on Windows.  All the Open Source development resources in the MS camp are aimed at PHP and ZEND, ActiveStates is pretty much out on its own hook. Many key Perl Modules that support the Windows system calls are not updated with the dll's needed for newer versions of Windows/Perl.  Compiling these from source is over even most MCSE's head, plus you need the right C compiler (and a knowledge of the right options to invoke).  I think MS may now have an Express version that doesn't cost $800 any longer.  Add to that, the fact that 'most' Perl programmers are getting old-in-the-tooth, really only ever knew Linux/Unix, and are getting scarcer every day; along with the ease of development in PHP and the popularity of Ruby (and ROR) for those who want an object-oriented cryptic, few primitives methodology; and you have the root cause for the current dearth of developers for mature tools written in Perl, such as YaBB (and Webmin on Windows -- hasn't worked for two years) .

(Bottom)
I think the key is to get Perl set up as an Application handler (if it isn't already). BTW, 32 bit and 64 bit binaries have to be in different directories (WoW).  So you probably should go with the 64bit version of the ActiveStates installer, rather than the 32bit variant.

http://en.wikipedia.org/wiki/WoW64

http://blogs.msdn.com/b/gauravseth/archive/2006/04/24/582091.aspx

So YOU might be looking for a different DLL (or location).

Lastly - once you have the Perl Application handler working correctly, you should not use a shebang line. The reason is this -- the IIS executable will call the perl handler internally, there is no need for an executable. DLL's aren't executables.  Shebang lines are for CGI implementations (you call an executable on the server).  This also means that YaBB's cgi-bin can be ANYWHERE in the root of an IIS virtual server.

OTAY???  Grin

Good Luck
Cool
« Last Edit: Aug 4th, 2011 at 1:37pm by JonB »  

I find your lack of faith disturbing.
Back to top
IP Logged
 
binary
YaBB Newcomer
*
Offline



Posts: 25
Re: I get 502.2 error when running setup.pl
Reply #13 - Aug 4th, 2011 at 4:59pm
Post Tools
Phew.. Amazing post JonB - let's work through it Smiley

Quote:
First question - did you use the 64bit ActiveStates installer???? (jump to bottom for a bit more on this)
That might be the issue.

I used the 64bit MSI installer and followed this link, to the letter:
http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx

Quote:
I have YaBB running on several Windows servers, and I know others have it running on Hosting operations that run IIS 7, so its do-able.  Whether they are running 64 bit or not , I don't know.

Agreed - my existing forum is running on another (32bit) Server 2008.

Quote:
Try the setup instructions for installing Active Perl here:
http://blogs.iis.net/wadeh/archive/2009/04/13/running-perl-on-iis-7.aspx

I also found it immensely usefull Smiley
As said above, i used it for installation. This should be in the support Codex IMO [/quote]

Quote:
Are you only using IIS to run YaBB, or are there other things cooking???

Purely YaBB - absolutely nothing else.

Quote:
If not, you might consider XAMMP or ApacheLounge's Apache servers for Windows...

Might be worth a shot - I just prefer IIS a whole whole lot Undecided

Quote:
I'm actually fairly expert on IIS, I have had it running since Windows Server 4.0 (expansion kit), and I have had several Windows Servers running IIS since about 1998-1999 and I have 3 chugging away, very reliably right now.

IIS is indeed epic - I don't care what anyone says Wink

Quote:
Unfortunately, Perl is a 'red-headed step-child' on Windows.

Aww Jon - I'm a ginger myself.. You don't like us?  Embarrassed
.. Quote:
Webmin on Windows -- hasn't worked for two years) .

I never knew that'd existed.. But have wished for it so many times !!! [/quote]

Quote:
Lastly - once you have the Perl Application handler working correctly, you should not use a shebang line...

Roger that, just removed all shebang lines. It didn't help though.

Quote:
OTAY???  Grin


Otay Wink

Quote:
Good Luck
Cool



Thanks  Roll Eyes


For now - the next experiment will be a virtual (box is running VMware Server 2) 32bit 2008 server, identical to the existing working server.. See if that helps
« Last Edit: Aug 4th, 2011 at 5:00pm by binary »  
Back to top
 
IP Logged
 
JonB
YaBB Administrator
YaBB Next Team
Operations Team
Beta Testers
Support Team
*****
Offline



Posts: 4,031
Location: Land of the Blazing Sun!

YaBB 2.6.1
Re: I get 502.2 error when running setup.pl
Reply #14 - Aug 6th, 2011 at 5:04pm
Post Tools
Quote:
Aww Jon - I'm a ginger myself.. You don't like us?


Not the case at all - if you read carefully, I'm accusing Microsoft.  Wink

Anyway, no gingers were harmed making the comment, LOL. In point of fact, my mother and several of my aunts were redheads, as is one of the loves of my life.  I have a great weakness for 'redheads' (as we say in the US of A for the most part)   I only recently have been exposed to the term 'ginger', and it is growing on me,  I'm Scottish/Irish of descent, so it's all in the family.

I don't think that term is common outside the U.S., but if you Google it you will find many alternate explanations, however the 'most correct' one is that of describing an adulterine bastard.  It means 'neglected/unacknowledged' in the sense I used it.

One more point, there are other  "Perl's for Windows". There's Strawberry and the 'pure Perl' that comes from Larry Wall's source, and others I don't know anything about. I don't know anything about making those other variants work with IIS however.  I have run them with Apache, but only in 32bit mode.

Let us know if it run son the Virtual Machine.  I ran YaBB in a VirtualBox VM with SUSE on that Xeon machine (just an experiment).  It runs Fedora Leonidas currently.

Good Luck
Cool
  

I find your lack of faith disturbing.
Back to top
IP Logged
 
Page Index Toggle Pages: [1] 2 
Topic Tools