tag:support.appharbor.com,2010-11-23:/discussions/problems/375-502-bad-gateway-nginx0854AppHarbor: Discussion 2011-07-25T11:36:43Ztag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T19:45:50Z2011-04-03T19:45:50Z502 Bad Gateway nginx/0.8.54<div><p>I have just deployed my site :<a href=
"http://bloggurpreetsohalcom.apphb.com/">http://bloggurpreetsohalcom.apphb.com/</a></p>
<p>Build successful and I even put in a index.htm file, but it just
keeps on showing the same error 502 Bad Gateway nginx/0.8.54</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T19:55:33Z2011-04-03T19:55:33Z502 Bad Gateway nginx/0.8.54<div><p>Ok now I'm seeing :</p>
<p>Service Unavailable</p>
<p>HTTP Error 503. The service is unavailable.</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T20:20:47Z2011-04-03T20:20:47Z502 Bad Gateway nginx/0.8.54<div><p>Are you trying to deploy Orchard by any chance? It's pretty
tempremental, here are some suggested posts:<br>
<a href=
"http://support.appharbor.com/discussions/problems/203-orchard-support">
http://support.appharbor.com/discussions/problems/203-orchard-support</a><br>
<a href=
"http://support.appharbor.com/discussions/problems/153-deploying-and-running-orchard-cms">
http://support.appharbor.com/discussions/problems/153-deploying-and...</a></p></div>friismtag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T20:35:34Z2011-04-03T20:35:34Z502 Bad Gateway nginx/0.8.54<div><p>I am trying to deploy orchard. However I have not run into the
issue mentioned in the first discussion.</p>
<p>The second discussion is private</p>
<p>------Original Message------ From: Michael Friis<br>
To: <a href=
"mailto:gurpreet@gurpreetsohal.com">gurpreet@gurpreetsohal.com</a><br>
ReplyTo: <a href=
"mailto:support@appharbor.com">support@appharbor.com</a><br>
Subject: Re: 502 Bad Gateway nginx/0.8.54 [Support]<br>
Sent: 3 Apr 2011 21:20</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T21:15:39Z2011-04-03T21:15:39Z502 Bad Gateway nginx/0.8.54<div><p>Does it work when you run locally? If so, please invite <a href=
"mailto:support@appharbor.com">support@appharbor.com</a> so that we
can take a look.</p></div>friismtag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T23:45:28Z2011-04-03T23:45:28Z502 Bad Gateway nginx/0.8.54<div><p>How do I invite you to see it working locally?</p>
<p>Gurpreet</p>
<p>On Sun, Apr 3, 2011 at 10:15 PM, Michael Friis <<br>
<a href=
"mailto:tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com">
tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com</a>>
wrote:</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-03T23:48:54Z2011-04-03T23:48:54Z502 Bad Gateway nginx/0.8.54<div><p>is there anyway for me to see the compiled files?</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T00:19:46Z2011-04-04T00:19:46Z502 Bad Gateway nginx/0.8.54<div><p>So I'm curious to know whether the contents of the repository
you are pushing to AppHarbor works when you run it locally, i.e.
either in the development web server or on you local IIS?</p>
<p>You cannot get the build output, but it is something we might
add.</p></div>friismtag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T07:01:01Z2011-04-04T07:01:01Z502 Bad Gateway nginx/0.8.54<div><p>It does indeed work locally.<br>
Sent from my BlackBerry® wireless device</p>
<p>-----Original Message----- From: "Michael Friis" <a href=
"mailto:tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com">
tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com</a><br>
Date: Sun, 03 Apr 2011 20:19:49<br>
To: <a href=
"mailto:gurpreet@gurpreetsohal.com">gurpreet@gurpreetsohal.com</a><a>gurpreet@gurpreetsohal.com</a><br>
Reply-To: <a href=
"mailto:support@appharbor.com">support@appharbor.com</a><br>
Subject: Re: 502 Bad Gateway nginx/0.8.54 [Support]</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T07:12:12Z2011-04-04T07:12:12Z502 Bad Gateway nginx/0.8.54<div><p>Could you invite <a href=
"mailto:support@appharbor.com">support@appharbor.com</a> as a
collaborator, then we can take a look?</p></div>friismtag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T07:30:04Z2011-04-04T07:30:44Z502 Bad Gateway nginx/0.8.54<div><p>Hi,</p>
<p>It seems like some unhandled exceptions are thrown during
application start up. These causes the application pool to crash
(most likely because they happen in a thread outside the request
context) and the 502 is displayed because the website isn't
responding to the request from the load balancer.</p>
<p>Here's the stack trace:</p>
<p>An unhandled exception occurred and the process was
terminated.</p>
<p>Application ID: /LM/W3SVC/276/ROOT</p>
<p>Process ID: 11532</p>
<p>Exception: System.NullReferenceException</p>
<p>Message: Object reference not set to an instance of an
object.</p>
<p>StackTrace: at Orchard.Startup.WarmupHttpModule.Signal() in
C:\code\gurpreetsohal.com\Orchard.Startup\WarmupHttpModule.cs:line
33<br>
at
Orchard.Startup.Starter.<>c<strong>DisplayClass1.b</strong>0(Object
state) in C:\code\gurpreetsohal.com\Orchard.Startup\Starter.cs:line
60 at
System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(Object
state) at System.Threading.ExecutionContext.Run(ExecutionContext
executionContext, ContextCallback callback, Object state, Boolean
ignoreSyncCtx) at
System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
at System.Threading.ThreadPoolWorkQueue.Dispatch() at
System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()</p></div>runetag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T09:09:42Z2011-04-04T09:09:42Z502 Bad Gateway nginx/0.8.54<div><p>I don't get this error on my local machine at all, hosted in IIS
or casini.<br>
How can I debug this, if I can't reproduce the error</p>
<p>On Mon, Apr 4, 2011 at 8:30 AM, Rune Sørensen <<br>
<a href=
"mailto:tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com">
tender+d65c21b990792c29395c33470dc228426ef50354a@tenderapp.com</a>>
wrote:</p></div>gsohaltag:support.appharbor.com,2010-11-23:Comment/64113882011-04-04T14:02:19Z2011-04-04T14:02:19Z502 Bad Gateway nginx/0.8.54<div><p>I think the problem may be related to the fact that only your
App_Data folder is writable.. Orchard requires that other folders
are writable under certain conditions. If you want to reproduce the
issue locally you can try and make sure that the user account under
which the web site runs (set it up under your application pool)
only has read access to all folders except the App_Data folder.</p>
<p>You can also try and bin-deploy the modules which may be the
cause of this issue. You can read more about it here: <a href=
"http://www.orchardproject.net/docs/Default.aspx?Page=Orchard-module-loader-and-dynamic-compilation&NS=&AspxAutoDetectCookieSupport=1">
http://www.orchardproject.net/docs/Default.aspx?Page=Orchard-module...</a>
- you should be able to use the "Referenced Module" and
"Precompiled Module" for loading modules.</p>
<p>We are aware that there are certain kinks to running various
CMS' and will work on improving support for these. If you figure it
out and get it up and running we would love to hear more about
it!</p>
<p>Best,<br>
Rune</p></div>rune