Linux 控制器在 localhost JBOSS.7.1.1.FINAL 不可用

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21310407/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-07 01:53:52  来源:igfitidea点击:

The controller is not available at localhost JBOSS.7.1.1.FINAL

linuxjbossjboss7.x

提问by Alind Billore

When i run the jboss-cli.sh, I get this message.

当我运行 jboss-cli.sh 时,我收到此消息。

[root bin]# sh jboss-cli.sh 
You are disconnected at the moment. Type 'connect' to connect to the server or 'help' for the list of supported commands.
[disconnected /] connect localhost
The controller is not available at localhost:9999
[disconnected /] connect
The controller is not available at localhost:9999
[disconnected /] connect localhost:9999  
The controller is not available at localhost:9999
[disconnected /] 

Also i have another installation of jboss5 GA. I hope that is not interfering. Although that is totally shut down for now.

我还安装了 jboss5 GA。我希望这不会造成干扰。虽然现在完全关闭了。

Native management interface is :9999 in standalone.sh

本机管理界面是:standalone.sh 中的 9999

Please throw light on this issue.

请说明这个问题。

#
                                     EDITED 
#

When i stop my service with "service jboss stop" i get this message

当我用“service jboss stop”停止我的服务时,我收到这条消息

[root@ bin]# *** JBossAS process (7302) received KILL signal ***
grep: /var/run/jboss-as/jboss-as-standalone.pid: No such file or directory

I Dont know how to check whether server is listening on the port 9999 or not.

我不知道如何检查服务器是否正在侦听端口 9999。

Few more details

更多细节

[root bin]# netstat -anp |grep 9999
tcp        0      0 127.0.0.1:9999              0.0.0.0:*                   LISTEN      7931/java

[root bin]# netstat -anp |grep 8080
tcp        0      0 0.0.0.0:8080                0.0.0.0:*                   LISTEN      7931/java 

JBoss processs id and the server id acquiring these ports is same.

JBoss 进程 id 和获取这些端口的服务器 id 是相同的。

采纳答案by Alind Billore

This question has two issues ,

这个问题有两个问题,

First, i have provided debuging parameter in the startup script. If you see 8787 that means you have somewhere provided debuging argument.

首先,我在启动脚本中提供了调试参数。如果您看到 8787,则意味着您在某处提供了调试参数。

Second and the most important one controller not available @localhost or @IPADDRESS .

第二个也是最重要的一个控制器不可用 @localhost 或 @IPADDRESS 。

  1. Please check if you have used port offset, as it increments all the ports by the number with with you have set port offset. Suppose port offset is 2 Then try to access connect localhost:10001 Port i.e 9999+2

  2. On my production server sometimes it does not works with localhost , but works with IP address. Then try to access connect IPADDRESS:9999 OR Then try to access connect 127.0.0.1:9999

  3. Please check in the firewall weather the port 9999 or what ever with port offset, if the port is not open in the firewall it gives error,

  1. 请检查您是否使用了端口偏移量,因为它会按您设置的端口偏移量增加所有端口。假设端口偏移量为2然后尝试访问connect localhost:10001端口即9999+2

  2. 在我的生产服务器上,有时它不适用于 localhost ,但适用于 IP 地址。然后尝试访问connect IPADDRESS:9999 OR 然后尝试访问connect 127.0.0.1:9999

  3. 请在防火墙中检查端口 9999 或端口偏移量,如果端口未在防火墙中打开,则会出现错误,

I asked this question 6 months back and the above checks has solved the problem always.

6 个月前我问过这个问题,上面的检查总是解决了这个问题。

回答by phil

Use netstat -anp |grep 9999to find out if port 9999 is in use and by which process id. You could also check the host.xml used by the controller to configure the proper native port.

用于netstat -anp |grep 9999确定端口 9999 是否正在使用以及由哪个进程 ID 使用。您还可以检查控制器使用的 host.xml 以配置正确的本机端口。

In the host xml, you should find the default port:

在主机 xml 中,您应该找到默认端口:

    <native-interface security-realm="ManagementRealm">
        <socket interface="management" port="${jboss.management.native.port:9999}"/>

./jboss-cli.sh --controller=localhost:9999 --connect

回答by Erhard Siegl

You open the debug-port with jboss-cli.sh. Either you activated in jboss-cli.sh:

你用 jboss-cli.sh 打开调试端口。要么你在 jboss-cli.sh 中激活:

# Sample JPDA settings for remote socket debugging
# JAVA_OPTS="$JAVA_OPTS -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"

or you set JAVA_OPTS with such an option in you environment. See

或者您在您的环境中使用此类选项设置 JAVA_OPTS。看

echo $JAVA_OPTS

I guess you did this for two jboss-processes, and you get a port-conflict. See

我猜你为两个 jboss 进程做了这个,你得到了端口冲突。看

netstat -nap | grep 8787

回答by Halil

This is probaby because you have changed your binding configuration and jboss does not bind to 127.0.0.1.

这可能是因为您更改了绑定配置,而 jboss 没有绑定到 127.0.0.1。

In case your jboss instance is not binding to 127.0.0.1, you may use --controlleroption as follows:

如果您的 jboss 实例未绑定到 127.0.0.1,您可以使用--controller如下选项:

./jboss-cli.sh --controller=YOUR_IP:9999

回答by Navdeeds

I recently faced this issue and the root cause that I found was completely different than it is listed above. It is because for some other project I shifted to JDK 1.8 from 1.7. Boom! and error started coming up...I took hell lot of time figuring out why it is coming up before finally realizing I changed my JDK version. It might be because JBOSS 7 doesn't work with 1.8 of which I have limited knowledge but yes this might prove useful for some cases.

我最近遇到了这个问题,我发现的根本原因与上面列出的完全不同。这是因为对于其他一些项目,我从 1.7 转移到了 JDK 1.8。繁荣!并且错误开始出现......我花了很多时间弄清楚为什么会出现它,然后才终于意识到我更改了我的JDK版本。这可能是因为 JBOSS 7 不适用于我所知有限的 1.8,但是这可能对某些情况有用。

回答by yash

I also faced this issue , mine was compatibility issue,i installed lower version of jboss compatible with jdk and it worked.

我也遇到了这个问题,我的是兼容性问题,我安装了与 jdk 兼容的较低版本的 jboss 并且它有效。

For me enter link description here

对我来说,在此处输入链接描述

jboss 6.0.0 worked with jdk 1.7

jboss 6.0.0 与 jdk 1.7 一起使用

in linux simply got to in your downladed folder unzipjboss-6.0.0.M2.zip

在 linux 中只需在您的下载文件夹中 解压jboss-6.0.0.M2.zip

and then update path variable

然后更新路径变量