Glassfish 管理控制台加载缓慢
今天我停止/启动了 GlassfishV3 实例,现在我无法访问位于 http://servername:4848/ 的管理控制台。屏幕显示:“管理控制台正在加载...”这种情况将永远持续下去。
我尝试如下:
我尝试将以下条目添加到位于 /glassfishv3/glassfish/domains/domain1/config 的 domain.xml 中,如建议的那样另一个堆栈溢出问答,但重新启动服务器后仍然没有运气。
-Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true 我还在本地计算机上安装了 glassfishv3,无法重现该问题.我可以毫无问题地访问 http://localhost:4848。
- 我还查看了位于 /glassfishv3/glassfish/domains/domain1/logs 下的 server.log 和 jvm.log 文件,但什么也没有那里有一些启示。
任何帮助将非常感激
Today I stopped/started my GlassfishV3 instance and now I cannot access the addmin console located at http://servername:4848/. The screen says: "The admin console is loading..." This is going on forever now.
I have tried as follows:
I have tried adding the following entry to my domain.xml located at /glassfishv3/glassfish/domains/domain1/config as suggested in another Stack Overflow Q&A but after restarting the server still no luck.
<java-options>-Dcom.sun.enterprise.tools.admingui.NO_NETWORK=true</java-options>
I have also installed glassfishv3 on my local machine and cannot recreate the problem.I can go to http://localhost:4848 without any problem.
- I have also looked at the server.log and jvm.log files located under the /glassfishv3/glassfish/domains/domain1/logs and nothing there that shed some light.
Any help would be very much appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
我也有类似的症状,我也尝试了达里奥建议的一些方法,但没有效果。我的开发环境可能有一个独特的配置:我在 Windows 7 64 位主机上的 VirtualBox Ubuntu 11.04 64 位客户机上运行 Glassfish 3.1。很偶然地,我发现了一个额外的症状:如果我关闭 Ubuntu 客户机上的网络,控制台将在本地主机浏览器实例上成功加载。也就是说,在网络关闭的 Ubuntu 客户机上,我可以成功导航到 http://localhost:4848 并显示Glassfish 管理控制台符合预期。但是,如果 Ubuntu 来宾的网络已打开,则我的行为与原始海报建议的完全相同: http://localhost:4848 将永远停留在初始加载页面上。
长话短说,我发现将以下参数添加到服务器配置的 JVM 选项中可以解决该问题:
-Djava.net.preferIPv4Stack=true
当我进行更改并重新启动 Glassfish 服务器时,一切正常。
(请注意,我还设置了上面推荐的一些其他设置,即 NO_NETWORK=true,并且我调整了 JVM 内存占用并将其设置为 -server 而不是 -client。可能需要这些设置同样,尽管就我而言,它们本身还不够。)
I had similar symptoms, and I tried some of what Dario had suggested as well, but it didn't work. It could be that I had a unique configuration for my dev env: I'm running Glassfish 3.1 on a VirtualBox Ubuntu 11.04 64-bit guest on a Windows 7 64-bit host. Quite by accident, I discovered an additional symptom: if I turned off the network on the Ubuntu guest, the console would load successfully on a localhost browser instance. That is, on the Ubuntu guest with the network off, I could successfully navigate to http://localhost:4848 and show the Glassfish admin console as expected. However, if the Ubuntu guest's network was on, I had the exact behavior suggested by the original poster: http://localhost:4848 would just sit forever on the inial loading page.
To make a long story short, I found that adding the following argument to the JVM options for server-config fixed the problem:
-Djava.net.preferIPv4Stack=true
When I made that change and restarted the Glassfish server, everything worked.
(Note that I also had in place some of the other settings recommended above, i.e., NO_NETWORK=true, and I'd adjusted the JVM memory footprint and set it to -server instead of -client. It could be that these settings are required as well, though they weren't sufficient on their own in my case.)
我遇到了同样的问题。我可以在运行模式下部署,但在调试模式下它将永远挂起。 IntelliJ 挂在断点上。我将断点静音,glassfish3 工作得像新的一样。我不必更改任何domain.xml 设置。 检查你的断点!
I was having this exact same problem. I could deploy in run mode, but it would hang forever in Debug mode. IntelliJ was hanging on the breakpoints. I muted the breakpoints, and glassfish3 worked good as new. I didn't have to change any domain.xml settings. Check your breakpoints!
我找到了解决问题的方法。将 java-option 的 NO_NETWORK 设置为 true 不起作用,所以我从 3.0.1 升级到 3.1,它得到了修复。不过,不是立即,我必须停止/启动 Glassfish 服务器几次,然后才能进入管理控制台,没有任何长时间的延迟。
解决方案
解决方案是使用 pkg 实用程序从命令行进行升级。
您可以在此链接中找到步骤:
http://download.oracle.com/docs /cd/E18930_01/html/821-2437/gkthu.html#gktjf
或执行以下操作:
更新
我再次遇到性能问题,我在 Joshi 的技术博客中找到了另一个解决方案:
http://joshitech.blogspot.com/2009/09/glassfish-application -server.html
基本上在domain.xml中添加以下jvm选项。它应该会提高 Glassfish 的启动和部署性能:
I found a solution to my problem. Setting the java-option to NO_NETWORK to true did not work so I upgraded from 3.0.1 to 3.1 and it got fixed. Not immediately though, I had to stop/start the Glassfish server a couple of times before I got into the admin console without any really long delays.
Solution
The solution was to upgrade from the command line using the pkg utility.
You can find the steps in this link:
http://download.oracle.com/docs/cd/E18930_01/html/821-2437/gkthu.html#gktjf
Or do as follows:
UPDATE
I had peformance issues again and I found this other solution in Joshi's tech blog:
http://joshitech.blogspot.com/2009/09/glassfish-application-server.html
Basically add the following jvm options in the domain.xml. It should increase Glassfish boot up and deployment performance:
我不知道您是否引用这个答案< /a>,但描述了第二步(禁用更新模块)。
还有两个想法:
检查
NO_NETWORK=true
选项是否真的有效(GF管理控制台中不应有广告)在启动过程中观看server.log (glassfish-install-dir/glassfis/domains/domain1/logs) 并查找延迟发生之前的最后一个日志条目。这可能是延迟来源的提示。
I don't know if you are referencing this answer, but there is a second step described (disabling update module).
Two more ideas:
Check if the
NO_NETWORK=true
option really works (there should be no ads in GF admin console)Watch the server.log (glassfish-install-dir/glassfis/domains/domain1/logs) during startup and look for the last log entry before the delay occurs. This could be a hint for the source of the delay.
小心不要盲目追随达里奥的例子,除非你有比大多数人更多的内存。
-Xms3000m 为 Glassfish 提供 3GB。你有那么多空闲内存吗?
我在我的 4GB Mac 上尝试了这个,其中 1GB 用于 Glassfish。根本没有明显的区别...性能仍然很好。
Beware of blindly following Dario's example unless you've lots more RAM than most do.
-Xms3000m gives 3gb to Glassfish. Do YOU have that much spare RAM?
I tried this on my 4gb Mac with 1gb for Glassfish. Made no discernable difference at all...performance still sux.