I deployed a node app "typically prerender server" to two different places and tested prerender with a get request to a url contains Arabic letters
1. Heruko: working perfectly
2. Azure App Service on linux plan failed with HTTP Error 400. The request URL is invalid.
here is the respond body from Postsman
<html>
<head>
<title>Bad Request</title>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css">.cf-hidden { display: none; } .cf-invisible { visibility: hidden; }</style>
</head>
<body>
<h2>Bad Request - Invalid URL</h2>
<hr>
<p>HTTP Error 400. The request URL is invalid.</p>
</body>
</html>
Notice that the response head/meta contains charset=us-ascii
here is how the prerender node app see part of the url
u008aÙ\u0088Ù\u0085_Ù\u0085Ù\u0083رÙ\u0088Ù\u0086ع
i even created a node docker image to set language and locale to en_US.UTF-8 and changed Azure App to use this Docker image but still get error.
Any help please ?!
Unfortunately, after some investigation, I still don't understand why this issue occurred.
Actually App Service on Linux are still in Preview and not in Production yet. In this case, I would suggest you use an alternative offering, like Cloud Service or VM instead.
I have also tried to create prerender server on an Azure Linux Virtual Machine (Ubuntu Server 16.04 LTS), and it worked well.
Related
(I already asked in the Microsoft Forum but didn't get an answer.)
I have an App Service using a private registry with Continuous Deployment enabled. The app is running totally fine but the Webhook URL for the Continuous Deployment doesn't work.
Here's the output of an HTTP GET request to the webhook:
$ curl https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook
"No route registered for '/docker/hook'"
Someone in the Microsoft Forum told me to try a POST request, so here's the output of that:
$ curl -X POST https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">
<HTML><HEAD><TITLE>Length Required</TITLE>
<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>
<BODY><h2>Length Required</h2>
<hr><p>HTTP Error 411. The request must be chunked or have a content length.</p>
</BODY></HTML>
I haven't found anywhere in the Microsoft Azure docs how to use the webhook.
After more searching, I found this answer.
The answer suggests to do the following:
curl https://\$MySiteName:SomeLongPassword#mysite.scm.azurewebsites.net/docker/hook -H "" -d ""
No idea why this works and I wish there was something in the Azure docs.
I have a MEAN app deployed on Google Cloud (GAE). POST requests work locally but not in the cloud. Anything I need to do, specifically, to get this working on GAE?
GETs work fine.
Thanks.
ERROR that I get when hit from Postman:
<html>
<head>
<title>502 Bad Gateway</title>
</head>
<body bgcolor="white">
<center>
<h1>502 Bad Gateway</h1>
</center>
<hr>
<center>nginx</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
Not using NGINX locally, which is why it probably works fine.
What response do you get?
GAE is pretty strict and requires Content-Length on POST.
I deployed same code on Heroku and it worked first shot. I'm sure there is some config issue between NGINX and Node on GAE, but I don't have the time to figure out someone else's issues.
Maybe when Google Cloud is a little more baked, I'll come back to it.
I am Pretty new in windows IIS server. i have successfully upload cakephp3.0 project.
when i access the website from windows IIS server it displays me following url in every page
**C:\inetpub\wwwroot**
I have also checked my header.My header part look Like this:-
enter code here
<!DOCTYPE html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//MY Html Code
Even i have checked my all ctp but i don't know where th url comes from C:\inetpub\wwwroot. Can anyone help me. How to resolve this problem.
C:\inetpub\wwwroot is the default local path for websites in IIS. You can change it by right clicking on your website > Manage Web Site > Advanced settings > Physical Path:
I have a rather strange problem with TeamCity. I have a TeamCity installation, with local and remote build agents. The TeamCity server is hidden behind IIS with Application Request Routing (ARR), to enable SSL, etc. I have a feeling this might be part of the problem, but I am not sure. Another reason to suspect IIS being part of the problem is, I tried to host TeamCity on an Azure Web App, and got exactly the same behaviour.
The trouble is, after building, when the build agents try to publish the artifacts to the server, I get a 404 back from the TeamCity server. TeamCity thinks it is a recoverable error (see log), and keeps trying again some times. Eventually, the publishing fails.
If I configure the local agents to access TeamCity via http://localhost, everything works smooth. But, when accessing via the public address (which is served via IIS), I get 404s. The 404 content looks like a standard IIS 404 page.
I have tries setting agent logging verbosity to DEBUG, but it still doesn't output the actual URL it is trying to call.
Does anyone have any clues on how to troubleshoot this? Getting the TeamCity agent to output the URL for which it gets the 404 would be a good start.
[Publishing artifacts] Publishing 1 file [F:/tc/ba3/temp/buildTmp/out/_PublishedWebSites/**/* => dist.zip] using [WebPublisher]
[15:34:15][Publishing artifacts] Publishing 1 file [F:/tc/ba3/temp/buildTmp/out/_PublishedWebSites/**/* => dist.zip] using [ArtifactsCachePublisher]
[15:35:10]
[Publishing artifacts] Recoverable problem publishing artifacts (will retry): <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">;
<html xmlns="http://www.w3.org/1999/xhtml">;
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
<title>404 - File or directory not found.</title>
<style type="text/css">
<!--
body{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}
fieldset{padding:0 15px 10px 15px;}
h1{font-size:2.4em;margin:0;color:#FFF;}
h2{font-size:1.7em;margin:0;color:#CC0000;}
h3{font-size:1.2em;margin:10px 0 0 0;color:#000000;}
#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:"trebuchet MS", Verdana, sans-serif;color:#FFF;
background-color:#555555;}
#content{margin:0 0 0 2%;position:relative;}
.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}
-->
</style>
</head>
<body>
<div id="header"><h1>Server Error</h1></div>
<div id="content">
<div class="content-container"><fieldset>
<h2>404 - File or directory not found.</h2>
<h3>The resource you are looking for might have been removed, had its name changed, or is temporarily unavailable.</h3>
</fieldset></div>
</div>
</body>
</html>
EDIT: Found this documented on the TeamCity pages as well:
https://confluence.jetbrains.com/display/TCD9/Known+Issues#KnownIssues-FailuretopublishartifactstoserverbehindIISreverseproxy
Failed Request Tracing (as Terri Rougeou Donahue mentioned) was the tool to help me. I had two errors.
Firstly, the StaticFileHandler was not turned off. So, when trying to POST to the /httpAuth/artefactUpload.html URL, the StaticFileHandler tried to handle the request before ARR could handle it.
When I turned off StaticFileHandler, the RequestFiltering module kicked in, and returned an error code of 404.13, which is "Content Length Too Large". After a bit of googling, I found this, http://www.iis.net/configreference/system.webserver/security/requestfiltering/requestlimits, describing the parameter maxAllowedContentLength, and says "The default value is 30000000, which is approximately 28.6MB."
The solution was:
Turn off StaticFileHandler for the web site (Handler mappings)
Edit the properties of "Request filtering" settings on the Web site, set "Maximum allowed content length" to something sensible. I added a 0 (makes it approximately 286MB, as artifacts can get quite large).
You could enable Failed Request Tracing on the IIS server that TeamCity is deploying to. This would provide the location where the 404 is occuring.
I installed modx Revolution and everything is working fine in the manager, except the front end, when i browse to the local website nothing shows up, just a
<html>
<head>
<title>MODX Revolution - Home</title>
<base href="http://evosoccer.loc/EvoSoccer/" />
</head>
<body>
</body>
</html>
I checked the error log in/cache/logs and the log page from the manager and it has zero records, how do i troubleshoot this?
--
Regards.
Yehia
you have no template or content installed... by default a modx installation is completely empty.
you can install a demo site from the package management if you just wanted to kick the tires.... otherwise in the resource manager just place some content in the home template. then you should see something.
-sean