當我試着使用Glassfish的3.1.2.2:管理控制檯將不會加載
http://localhost:4848
它說的管理控制檯進行加載訪問管理控制檯,但它不會走得更遠。如果我作爲刷新勸的頁面,我得到一個HTTP 404
有堆棧溢出其他幾個回答問題,類似問題,但沒有答案的幫助。所以我將全局日誌級別設置爲FINEST並查看server.log。
第一個和最突出的例外,我得到的是:
[#|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)
出現這種情況我的機器(Windows XP中)上。嘗試了幾次重新安裝到不同的地點。我的JVM來自JDK 7u21。
這並不是我的其他開發機器(Ubuntu的13.04),與類似配置發生。主要的區別 - 除了操作系統 - 是代理配置。它被設置爲所有協議的代理,端口8080,localhost除外。
我真的出答案的自己...
編輯
其他怪異的行爲。有時(GlassFish中的每一秒重新啓動)它可以訪問通過
http://127.0.0.1:4848/j_security_check
登錄到管理控制檯,然後我可以登錄並修改任何設置那裏。當我註銷時,我得到一個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!
之後,我不能通過上面的技巧登錄,直到glassfish重新啓動。
在時間而且通過
http://localhost:4848/login.jsf
訪問是可能的,但後來我可能不會改變任何值,而是直接拿到,說上面一樣日誌錯誤。
改爲嘗試'http://127.0.0.1:4848'。 – Raptor 2013-05-07 09:22:55
@ShivanRaptor試過了。同樣的結果。 – calculon102 2013-05-07 10:37:22
哇....我試過@Raptor解決方案,它的工作..這真的很奇怪。 – DeanMWake 2015-05-06 20:10:52