The controller is not available at localhost JBOSS.7.1.1.FINAL
Asked Answered
D

5

10

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

[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.

Native management interface is :9999 in standalone.sh

Please throw light on this issue.

#
                                     EDITED 
#

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

[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.

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.

Decigram answered 23/1, 2014 at 14:4 Comment(0)
D
6

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.

Second and the most important one controller not available @localhost or @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,

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

Decigram answered 24/6, 2014 at 15:46 Comment(2)
Port offset was the culprit!! Was driving me crazy! Great answer.Cangue
the admin console no longer accessible but localhost:8080 is still working. Why port 8080 is not stopped?Hydrosphere
I
5

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

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

./jboss-cli.sh --controller=YOUR_IP:9999
Irrefragable answered 26/1, 2015 at 13:16 Comment(1)
I have the same issue but when I try this, it says I am disconnected... given I get the earlier error while I try to connect...Tmesis
I
1

Use netstat -anp |grep 9999 to 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.

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

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

./jboss-cli.sh --controller=localhost:9999 --connect
Illsorted answered 23/1, 2014 at 14:21 Comment(3)
Hi Phil, I am getting this error with sh jboss-cli.sh [root bin]# FATAL ERROR in native method: JDWP No transports initialized, jvmtiError=AGENT_ERROR_TRANSPORT_INIT(197) -bash: syntax error near unexpected token (' [root@Vivacom bin]# jboss-cli.sh: line 72: 9165 Aborted (core dumped) "/usr/java/jdk1.7.0_25/bin/java" -Dspring.profiles.active=dev -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -jar "/usr/share/jboss-as/jboss-modules.jar" -mp "/usr/share/jboss-as/modules" org.jboss.as.cli "$@" -bash: syntax error near unexpected token ('Decigram
netstat -anp |grep 9999 and netstat -anp |grep 8080 , gives same processId as i get from service jboss status. So both ports show process id of JBossDecigram
Is your hostcontroller listening on localhost or on <servername:port>? Have you modified jboss-cli.sh?Illsorted
E
0

You open the debug-port with jboss-cli.sh. Either you activated in 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

echo $JAVA_OPTS

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

netstat -nap | grep 8787
Elwoodelwyn answered 25/1, 2014 at 9:34 Comment(2)
Hi Erhard, True,i solved the problem of 8787 port it was a correction in jboss-cli.sh. My Current problem is, Jboss-as-standalone.pid: No such file or directory and i am unable to connect to server via jboss-cli.shDecigram
The problems are not related. standalone.sh will write a pid-file if you set the environment-variable JBOSS_PIDFILE. For the second. Does your server work normally, does the Web-Console work? What do you get with "telnet localhost 9999" ?Elwoodelwyn
D
0

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.

Dexedrine answered 2/2, 2017 at 22:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.