Cannot connect to remote host using jboss-cli.sh via SOCKS in JBoss 7.1.1.Final
formica Jan 23, 2013 11:25 AMI tried to connect to a remote instance of JBoss AS 7.1.1 (Brontes) which is behind a firewall using jboss-cli.sh command line,
and I did not manage; the cli script launched with
JAVA_OPTS="-DsocksProxyHost=localhost -DsocksProxyPort=3129"
./bin/jboss-cli.sh --connect --controller=<myremote.host>
fails with
org.jboss.as.cli.CliInitializationException: Failed to connect to the controller
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:229)
at org.jboss.as.cli.impl.CliLauncher.main(CliLauncher.java:207)
at org.jboss.as.cli.CommandLineMain.main(CommandLineMain.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jboss.modules.Module.run(Module.java:260)
at org.jboss.modules.Main.main(Main.java:291)
Caused by: org.jboss.as.cli.CommandLineException: The controller is not available at pcsaclay32c.cern.ch:9999
at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:639)
at org.jboss.as.cli.impl.CommandContextImpl.connectController(CommandContextImpl.java:613)
at org.jboss.as.cli.impl.CliLauncher.initCommandContext(CliLauncher.java:227)
I use standalone configuration, containing in standalone.xml the default
{code:xml}
.....
<subsystem xmlns="urn:jboss:domain:jmx:1.1">
<show-model value="true"/>
<remoting-connector/>
</subsystem>
.....
{code}
I have a user in the standalone/configuration/mgmt-users.properties file which has been added using the add-user commands.
As far as I understood, remoting will use the ManagemenRealm.
The connection to the Web admin console using Firefox and Safari works from remote (once I have the socks proxy defined), and the
connection within the remote host (running jboss-cli from the remote host I mean) works also.
Can you suggest me where to look to solve my problem ?
Thanks,
Andrea
PS: I'm using Java version 6