Thursday, February 20, 2014

Production tips#1 : Glassfish admin page not loading

Running a random web application on test in one thing but when on production a new consistent mind set is needed. In  line with this principle I starting today a series of production tips that I hope will be useful to someone out there. That said, today I am going to talk about the importance of making your Glassfish server independent . What do I mean by independent ?
Yes, you don't have to depend on any online repository on internet in order to start your server.
Yes, you don't need any automatic update as it may cause more damage that good.
Yes, you need to have a total control of your server, by deciding what to update.
Yes , ...etc

When your server is dependent you will need to be connected to the internet in order to log in in your admin panel. Even when you are connected and your internet slow, you still need to waste sometimes before getting access. The reason is that the admin web application loads the available module updates from java.net during the log-in. Worse if the java.net server is down you are almost dead !

What to do:

  1. Disable Automatic Update Checks
    Rename $GLASSFISH_INST/glassfish/modules/console-updatecenter-plugin.jar to console-updatecenter-plugin.jar.disabled
  2. Disable News and other Internet-Dependent Admin GUI Features
    Set the following System Property (you can do that in the Admin GUI -provided that you can open it- in Configuration > JVM Settings > JVM Options > Add JVM Option : to get an empty textfield entry.
    -Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true

Now restart your server (but if GF is embedded with an IDE like netbeans restart netbeans instead)and enjoy it. Special thank goes to Mike for his inspiring Idea. If you have anything to share regarding this article please feel free to drop a comment.

No comments:

Post a Comment