hgweb.cgi throws a 502 (bad gateway) when pushing [duplicate] - iis-7

I've configured hgweb.cgi behind iis7 on windows server 2008. I can pull the repository just fine. However whenever I push I get a 502 bad gateway. I've found a posting which seems to indicate this is a problem with the mercurial config on the server. mercurial doesnt seem to be picking up an http proxy (fiddler) from my local machine even if its configured.
Questions are:
how do I 'fix' the 502 problem?
failing that how do I make mercurial use the proxy so I can figure out whats going wrong?
how do I adjust the verbosity setting for mercurial 'properly' given that this is running under a webserver?

It sounds like this problem.
I was having the same issues with pushing a repository, but it went away after I had installed a later version of Mercurial (2.0.1). I used the instructions here, (paying attention to the comment to that post by Ethan J Brown).

Related

Next.jsā€”unable to set up proxy

I am trying to make a blog using Storyblok(v2) and Next.js(v13). I've gone through this exact tutorial before, and I was able to get the proxy up and running multiple times. Here is the tutorial for the blog, and here is what I've been using to set up my proxy (on macOS).
The last time that I went through this tutorial, I was using the same versions of Storyblok and Next. I have no problem at all running those commands re: setting up the proxy, and my terminal does say that it's up and running, https://localhost:3010 -> http://localhost:3000.
When I visit both https://localhost:3010 and http://localhost:3000, I get Error: {"message":{}, "status":401, "response":"Unauthorized"}.
Before I created the proxy, everything was working as expected, so I believe that the errors are definitely related to the proxy. Any ideas on what I might be doing wrong here?

ACORE API, assistance with errors and deployment

I'm having trouble with setting up ACORE API's and then having them work on a website.
Background:
Azerothcore running 3.3.5 on a debian standalone server, this has the Database, Core files and runs both the world and auth server basically a standard setup that is shown in the how-to wiki.
I also have a standalone web server, on the same subnet, but it's a separate server running linux and normal web server stuff, this has a wordpress installation with azerothcore plugin for user signup etc.
I'm trying to add the player map (https://github.com/azerothcore/playermap) and the ACORE-API set of functions (server status, arenastats, BG que and wow statistics) (https://github.com/azerothcore/acore-api)
Problem:
I understand the acore-api must be run in a container (docker or whatever) on the server, which I have done and it binds to port 3000, I can then go to the local ip:3000 and it brings up this error. (all db's etc are connecting and soap is working)
error 404 when navigating to IP:3000
I do get a few errors when running NPM install seen here: I'm not sure if they would be causing any issues or not.
screenshot of NPM errors on install
But further that, when I put say 'serverstatus' on the webserver (separate server) and configure the config.ts file I can't seem to get anything to display.
I'm not sure what I'm doing wrong but is the same scenario for all of the different functions for the acore-api
How are these meant to be installed and function? I feel I'm missing a vital step.
Likewise, with PLAYERMAP I have edited the comm_conf.php and set the realmd_id, but when loading the page, I do get the map, but the uptime is missing and no players are shown?
Could someone assist if possible?
Seems like an issue with NodeJS version. Update your NodeJS to latest LTS version 16.13.0 (https://nodejs.org)

A custom proxy yields Incompatible magic value 1012089682

I have a custom http proxy that one worked. I have made some changes to its authentication process. And now when I try to launch an applet I get "Incompatible magic value 1012089682 in class file ...". Regular html files are transferred without any errors.
In my other web research I found this article http://arstechnica.com/civis/viewtopic.php?t=313827 discussing an ascii vs binary transfer issue.
My problem with debugging this is that the get of the jar file doesn't show up in tamper data on the browser nor in the access log of the webserver containing the proxy, nor in my proxy error log. So I am some what baffled. any help in how to get more information to solve this would be appreciated.
The technology is antique, but the company doesn't want to pay for upgrades. The proxy is an NSAPI plugin running in IWS 6 (SunOne webserver)
Thank you.
There was indeed a bug in my proxy code. I am not exactly sure what caused the symptoms described above, but fixing the code so that it didn't re-authenticate every time fixed my issue.

mod_mono: Random CompilationException errors

After a server restart I sometimes get random CompilationException errors like this:
CompilationException: CS0006: Metadata file `/tmp/apache-temp-aspnet-0/ca373c84/assembly/shadow/10cad1cb/02cb7ade_1201ab15_00000001/ZedGraph.dll' could not be found -> HttpException: Single file build failed
and you can't access the application. If I restart the server again then the problem disappears.
The file that triggers the error can be one of my own dll's or a dependency, like mysql.dll for instance.
I am using mono 2.10.2, CentOS release 5.7 (Final), Apache and mod_mono on a Linode VPS.
Any idea of what can be the cause?
Edit: Since my troubles started when I moved to Linode and they use XEN, I have found the option --with-xen_opt=yes that looks promissing:
http://mono-project.com/Advanced_Mono_Compile_Options
Sounds like a bug (race condition?) with the shadow copying and compilation. There have been others found and fixed before... see http://grendello.blogspot.com/2007/08/new-modmono-and-xsp-developments.html
And this is a report of a similar problem in 2006 http://lists.ximian.com/pipermail/mono-list/2006-March/030970.html
Rather than rebooting the system, you can try restarting apache. Note, I have found it can help to stop apache and then start, rather than a restart.
You can also enable the mod_mono control panel and restart the application from there. Add this in apache config.
<Location /monocp>
SetHandler mono-ctrl
Order deny,allow
Deny from all
Allow from 127.0.0.1 <YOURIP>
</Location>
To automate this process take a look at Monit.
FWIW, I had the exact same issue on a dedicated server with no virtualization (8 core i7, x86 Ubuntu Server Edition), so I do not believe this to be a Xen-induced issue. For either the OP (SCL) or anyone else with this issue, I have documented my work around in another SO post here, as well as having filed a bug report with Mono/Xamarin.
It does seem to be a race condition, but not related to virtualization.
It seems that the problems where caused by XEN virtualization and mono precompiled binaries. I compiled mono with the option --with-xen_opt=yes but I wasn't able to compile XSP so I couldn't test if that solved it for sure but I moved exactly the same application to a dedicated server and after 2 million requests I didn't experience any error.
Update: Check Mahmoud answer

Mercurial error when pulling or cloning over

We have a Mercurial clone hosted on IIS7. The clone has grown and now we are getting the following error when pulling or cloning from it over the web:
mpatch.mpatchError: patch cannot be decoded
However, when we host the clone through TortoiseHG's webserver everything works fine. Does anyone know what IIS settings to change to get past this?
(we have opened an issue on the Mercurial site, but that is going way too slow)
We installed Apache Tomcat (took a day, go figure) and all is well. It seems that it's only IIS7 giving problems and that there maybe are some settings I am not aware of. So this is the solution for now. Would be awesome if someone could come up with the IIS solution and let me know.

Resources