为什么无法远程访问glassfish管理控制台? [英] Why can't access to glassfish admin console remotely?

查看:1576
本文介绍了为什么无法远程访问glassfish管理控制台?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个虚拟机中有Centos7的虚拟机。我从这里安装了glassfish 5.0:完整平台 - glassfish 5.0 。我只是解压缩/ opt中的文件夹。我正在使用仅限主机。

I have a virtual machine with Centos7 in virtual box. I have installed there glassfish 5.0 from here: Full platform - glassfish 5.0. I simply unzipped the folder in /opt. I'm using "host-only".

以下是我的java版本:

The following is my java version:

java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)

我使用以下命令启用了安全管理员:

I have enabled secure admin with the following command:

asadmin --host localhost --port 4848 enable-secure-admin

我进入vm shell并用数字ifconfig来知道ip。
然后,我进入我的Windows主机的电源shell(win + x)并键入,通过ssh连接:

I go in vm shell and digit "ifconfig" to know the ip. Then, I go in power shell (win + x) of my windows host and type, to connect via ssh:

ssh user@x.x.x.x

然后:

cd /opt/glassfish5/bin
./asadmin start-domain domain1

然后我回到我的主人,我打开谷歌浏览器并且:

Then I come back to my host, I open google chrome and:


  1. http:// xxxx:8080 似乎很好

  2. http:// xxxx:4848 强制要求https然后浏览器告诉我无法访问该网站

  1. http://x.x.x.x:8080 seems fine
  2. http://x.x.x.x:4848 forces to https and then the browser tells me it's impossible to reach the website

我试图卸载安全管理员(至少在glassfish之前给了我一个例外,说DAS或类似的东西需要安全管理员):

I have tried to uninstall secure-admin (at least before glassfish gave me the exception which said that secure-admin was needed for DAS or anything like that):

./asadmin --host localhost --port 4848 disable-secure-admin

但我得到以下例外:

NCLS-ADMIN-00010
javax.net.ssl.SSLHandshakeException: Remote host closed connection during handshake
Command disable-secure-admin failed.

调用管理控制台后,我的日志中出现以下异常:

I get the following exception in my log after calling admin console:

[2018-05-16T16:35:59.644+0200] [glassfish 5.0] [WARNING] [] [org.glassfish.grizzly.filterchain.DefaultFilterChain] [tid: _ThreadID=42 _ThreadName=admin-listener(3)] [timeMillis: 1526481359644] [levelValue: 900] [[
  GRIZZLY0013: Exception during FilterChain execution
java.lang.NoClassDefFoundError: sun/security/ssl/SupportedEllipticCurvesExtension
        at sun.security.ssl.HelloExtensions.<init>(HelloExtensions.java:82)
        at sun.security.ssl.HandshakeMessage$ClientHello.<init>(HandshakeMessage.java:362)
        at sun.security.ssl.ServerHandshaker.processMessage(ServerHandshaker.java:223)
        at sun.security.ssl.Handshaker.processLoop(Handshaker.java:984)
        at sun.security.ssl.Handshaker$1.run(Handshaker.java:924)
        at sun.security.ssl.Handshaker$1.run(Handshaker.java:921)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.security.ssl.Handshaker$DelegatedTask.run(Handshaker.java:1379)
        at org.glassfish.grizzly.ssl.SSLUtils.executeDelegatedTask(SSLUtils.java:274)
        at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:708)
        at org.glassfish.grizzly.ssl.SSLBaseFilter.doHandshakeStep(SSLBaseFilter.java:622)
        at org.glassfish.grizzly.ssl.SSLBaseFilter.handleRead(SSLBaseFilter.java:334)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.portunif.PUFilter.handleRead(PUFilter.java:231)
        at org.glassfish.grizzly.filterchain.ExecutorResolver$9.execute(ExecutorResolver.java:119)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeFilter(DefaultFilterChain.java:284)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.executeChainPart(DefaultFilterChain.java:201)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.execute(DefaultFilterChain.java:133)
        at org.glassfish.grizzly.filterchain.DefaultFilterChain.process(DefaultFilterChain.java:112)
        at org.glassfish.grizzly.ProcessorExecutor.execute(ProcessorExecutor.java:77)
        at org.glassfish.grizzly.nio.transport.TCPNIOTransport.fireIOEvent(TCPNIOTransport.java:539)
        at org.glassfish.grizzly.strategies.AbstractIOStrategy.fireIOEvent(AbstractIOStrategy.java:112)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.run0(WorkerThreadIOStrategy.java:117)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy.access$100(WorkerThreadIOStrategy.java:56)
        at org.glassfish.grizzly.strategies.WorkerThreadIOStrategy$WorkerThreadRunnable.run(WorkerThreadIOStrategy.java:137)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:593)
        at org.glassfish.grizzly.threadpool.AbstractThreadPool$Worker.run(AbstractThreadPool.java:573)
        at java.lang.Thread.run(Thread.java:748)
]]


推荐答案

答案是您的Java版本对于GlassFish来说太新了。我已在此处回答: https://stackoverflow.com/a/49998266/212224

The answer is your version of Java is too new for GlassFish. I already answered this here: https://stackoverflow.com/a/49998266/212224

该答案被低估了,但答案是正确的。要停止 java.lang.NoClassDefFoundError ,您需要使用不高于 8u151 <的Java版本/ strong>

That answer was downvoted, but the answer is correct. To stop the java.lang.NoClassDefFoundError you need to use a version of Java no higher than 8u151


这是由于Grizzly用于
HTTP / 2的内部JDK类的更改。

This is due to a change in internal JDK classes which Grizzly uses for HTTP/2.

GlassFish 5.0 使用最新版本的Grizzly,它与最新的Java 8更新兼容
。如果你使用GlassFish
5.0并看到这些错误,你有两个选择:

GlassFish 5.0 does not have the latest version of Grizzly which is compatible with the latest Java 8 updates. If you are using GlassFish 5.0 and see these errors, you have 2 choices:


  1. 将Java降级为 8u152 或更早

  2. 每晚下载最新的GlassFish 5.0.1 ,这应该修复

  1. Downgrade Java to 8u152 or earlier
  2. Download the latest GlassFish 5.0.1 nightly, where this should be fixed

Ref:
< a href =https://github.com/javaee/glassfish/issues/22436#issuecomment-374829430\"rel =nofollow noreferrer> https://github.com/javaee/glassfish/issues/22436#issuecomment-374829430

这篇关于为什么无法远程访问glassfish管理控制台?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆