Glassfish 3.1.2.2: admin console won't load

calculon102 picture calculon102 · May 7, 2013 · Viewed 10.4k times · Source

When I try to access the admin-console with

http://localhost:4848

it says the admin console is loading, but it won't go further. If I refresh the the page as advised, I get a HTTP 404.

There are several other answered questions on Stack Overflow with similar issues, but none of the answers helped. So I set the global logging-level to FINEST and looked at the server.log.

The first and most prominent exception I get is:

[#|2013-05-07T11:04:52.187+0200|FINE|glassfish3.1.2|com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter|_ThreadID=81;_ThreadName=Thread-2;ClassName=com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter;MethodName=initRest;|java.io.IOException: Server returned HTTP response code: 401 for URL: http://0.0.0.0:4848/management/domain
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1625)
at com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter.initRest(AdminConsoleAdapter.java:557)
at com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter$1.run(AdminConsoleAdapter.java:372)

(here the complete log from starting glassfish to accessing admin-console)

This happens on my development machine (Windows XP). Tried several re-installations to different locations. My JVM is from JDK 7u21.

This does not happen on my other development machine (Ubuntu 13.04) with similar configuration. The main difference - apart from OS - is the proxy-configuration. It is set to a proxy for all protocols, port 8080, except localhost.

I'm really out of answers myself...

EDIT

Additional weird behaviour. At times (every second restart of glassfish) it is possible to access to login to the admin console via

http://127.0.0.1:4848/j_security_check

I may then log in and edit any setting there. When I log off I get a HTTP 500:

javax.servlet.ServletException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'sun_html53'.

root cause

java.lang.RuntimeException: java.lang.reflect.InvocationTargetException while attempting to process a 'beforeCreate' event for 'sun_html53'.

root cause

java.lang.reflect.InvocationTargetException

root cause

java.lang.IllegalStateException: REST Server Name not set!

After that I cannot login anymore via the above trick until restart of glassfish.

Also at time access via

http://localhost:4848/login.jsf

is possible, but then I may not alter any value but get directly a log error that says the same as above.

Answer

WAN picture WAN · Aug 15, 2014

Good afternoon !!!!

I had the same exact problem the publisher described, and tried everything !!!, but after having feedback from different friends, I did the next steps:

Before starting... my environment was working OK (everything, if possible was installed in 64bits), until some web page required 32bits JRE, I downloaded it and installed it, after this, glassfish just went crazy and started doing what is described in this discussion. I did lots of test, installing, uninstalling, unzipping and deleting JDK, Glassfish versions.... nothing worked until one friend told to search in the users (due to thar every version of glassfish just crashed) folder; In here I searched for every folder names "java" or "Oracle" and I found in the route:

  • C:\Users\\AppData\LocalLow\Sun\Java\Deployment

The file "deployment.properties", Inside I found a properties:

1. deployment.javaws.jre.0.path=C\:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe
2. deployment.javaws.jre.1.path=C\:\\Program Files\\Java\\jre7\\bin\\javaw.exe

Then I deleted property 1

(deployment.javaws.jre.0.path=C\:\\Program Files (x86)\\Java\\jre7\\bin\\javaw.exe) 

and modified property 2 to:

+ deployment.javaws.jre.0.path=C\:\\Program Files\\Java\\jre7\\bin\\javaw.exe

That just resolved the problem !! Hope this can help you guys.