- Install the software (unzipping a zip or installing a native package).
- Optionally create a new domain.
- Start the domain.
To my surprise, when I tried to connect to the Admin Console, the browser got stuck just after inserting my user credentials. I tried to restart the domain over and over again but I had no luck.
The domain logs (that you can find in $YOUR_DOMAIN/logs/server.log) were telling nothing interesting: the domain was starting up correctly and the admin console application was logging no errors. The last line of the logs always was:
[#|[snip]|admin console: initSessionAttributes()|#]
After a while, it appeared a line such as this:
[#|[snip]|Cannot refresh Catalog: Connection timed out: Connect|#]
This was the clue! Glassfish is able to check for updates automatically from an IPS repository: do you remember that fancy update icon in the upper left corner of the Admin Console that shows up to suggest you the available updates? This server is behind a proxy: maybe I was experiencing a glitch related to this.
A quick search indeed revealed that other users were experiencing the same problem when Glassfish sat behind a proxy server. The workarounds I tested to work are the following:
- Have Glassfish use your proxy.
- Use Glassfish updatetool to disable automatic updates (which is something I would always suggest for a production environment).
- Remove the console-updatecenter-plugin.jar.
The third suggestion comes from a thread published in the java.net Forums. Unfortunately the link is broken now and I could only read it using Google's cache.
Have Glassfish Use Your ProxyTo setup Glassfish to use a proxy you can use the following Java system properties:
You can either use the asadmin program or the admin console to do that. Using asadmin is as simple as:
asadmin> create-jvm-options "-Dhttp.proxyXXX=value"
asadmin> create-jvm-options ...
If you prefer using the Admin Console, just navigate to Enterprise Server/System Properties and use the web interface to add the values.
The values you set will be reflected in the domain.xml domain configuration file:
Use Glassfish updatetool To Disable Automatic UpdatesYou can use the updatetool program to update Glassfish and configure the autoupdate feature:
The first time you launch updatetool, it will ask you to install this feature. Since you're behind a proxy, you need to setup some environment variables. If you're using an HTTP proxy, you can just set the http_proxy variable:
$ export http_proxy=http://user:firstname.lastname@example.org:port
When updatetool finished installing the required packages, you can start it again and the updatetool windows will show up. In the Preferences window you can tune the update behaviour or disable it at all.
Remove the console-updatecenter-plugin.jarThe last thing you can do is removing the guilty plugin. The Glassfish plugins are deployed in the $GLASSFISH_INST/glassfish/modules directory. You can just move the console-updatecenter-plugin.jar to console-updatecenter-plugin.jar.old and Glassfish won't use it.
"No Network Access" for the Admin Console
As pointed out in a comment, Glassfish can be configured to have "no network access" by setting the
property to true. As usual, this can be done adding the
to the JVM parameters list or using the asadmin tool:
$ asadmin create-jvm-options \