Thursday 7 November 2013

MapGuide tidbits: MgConnectionFailedException

Here's another one for the newbies

If you can't connect to MapGuide with Maestro


Or you're getting a message like this when you run your MapGuide application


It means your Web Tier to Server Tier connectivity is broken. Or to explain visually



MapGuide is a 3-tier system. When you're "connecting to a MapGuide Server", you are asking the Web Tier middleman to ask the Server Tier to do something (render a map, query a Feature Source, read an XML resource, etc, etc). If this Web Tier <-> Server Tier connectivity is broken, then the Web Tier is unable to forward any commands or operations to the MapGuide Server, hence it throws this error message back to the client application.

So what is the resolution for this? Simply restarting the MapGuide Server is enough to re-establish this broken connection.

Why did the MapGuide Server go down? Analyzing MapGuide's various log files may give you a clue as to why it went down.

On the other hand, what if you try to restart the MapGuide Server and it doesn't come back up? This is where it helps to run the MapGuide Server in interactive mode. To run the MapGuide Server in interactive mode, go to the directory where the MapGuide Server executable is located (generally C:\Program Files\OSGeo\MapGuide\Server\bin on windows and /usr/local/mapguideopensource-x.y.z/Server/bin on Linux where x.y.z is your MapGuide version number), and run the following from the command line

On Windows:
mgserver.exe run
On Linux:
./mgserver.sh

If something is preventing MapGuide Server from starting up, it will most likely spit out some error message about it to the command-line 99% of the time. This should give you more information to work with.

2 comments:

dartmind said...

Sir Good day! I am Mark Torrefranca from the Philippines,a beginner in mapguide/mapserver, I would like to ask if you have 300 concurrent users connecting to my Mapguide/Mapserver, do I have to edit any of the configuration files on the webconfig.ini or at the serverconfig.ini? Thank you very much and God bless!

Jackie Ng said...

I have made a post on this topic:

http://themapguyde.blogspot.com.au/2012/06/thoughts-on-mapguide-scalability.html

Extrapolate those numbers to suit 300 users.