jBoss7 no remote access - linux

i setup a jboss7 server including the standalon.xml for remote access on a debian machine.
But I cant get external remote access.
This is my interface part of the standalone.xml:
<interfaces>
<interface name="management">
<inet-address value="192.168.3.182"/>
</interface>
<interface name="public">
<inet-address value="192.168.3.182"/>
</interface>
</interfaces>
I also tried:
<interfaces>
<interface name="management">
<inet-address value="127.0.0.1"/>
</interface>
<interface name="public">
<any-ipv4-address/>
</interface>
</interfaces>
I tried a lot of possibilities to setting up the standalone.xml but I must forgot something.
I see the jboss7 homepage when I type the ip address in my browser but Im note able to connect with my java test client on the remote port(4447).
The test client works if the client runs local on the machine.
Do you have an idea?
Edit: telnet 192.168.3.182 4447 gives me the ip back with a blink cursor, so i guess waiting for response additional i see a log entry in my jboss server log -> ) JBREM000200: Remote connection failed: java.io.IOException: Received an invalid message length of 1728579688

I would check if the port is listening with the following command under linux "netstat -tulpn | grep -i 4447"
Good luck,

that "Received an invalid message length of 1728579688" error indicates that jboss is listening on the port but that the connector is not using the right kind of protocol.
of course, if you are connecting with telnet then you would expect to see that error since telnet is not a JMX client.
JBoss uses JBoss Remoting for JMX connections. So if you are using an external client, you need to make sure the JBoss Remoting libraries are available to your client.
This is a good description of the issue using VisualVM as the client:
http://blog.akquinet.de/2012/11/01/connecting-visualvm-with-a-remote-jboss-as-7-eap6-jvm-process/

Related

How can I reach Amazon Linux in Hyper-V

I hava Amazon Linux 2 running in a Hyper-V Virtual Machine, I have Wildfly running on it, so when I put
curl http://localhost:8080
It returns an html page as plain text, which is expected, now I want to reach the wildfly instance (running on 8080 port) but when I try to reach it through a browser in windows host, it refuses to connect.
is there a configuration inside Amazon Linux in order to be reachable by other browsers?
I was trying to reach wildfly21 without modifiying the following parameters in standalone.xml:
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
</interfaces>
Those are the values I was looking for, 0.0.0.0 to make wildfly reachable for anyone, also you can make reachable the console too.
Amazon Linux doesn't have a Firewall or something like that, the internal IP address works fine since it's a VM.
For the ssh login this worked for me:
nano /etc/ssh/sshd_config
PasswordAuthentication yes
service sshd restart

The jboss server is not connecting

While I use the connect statement, it shows the following error
The controller is not available at localhost:9999: java.net.ConnectException: JBAS012174:
Could not connect to remote://localhost:9999. The connection failed: JBAS012174: Could not
connect to remote://localhost:9999. The connection failed: Connection refused
[disconnected /]
I had the problem with connecting to the native management interface on port 9999 and all I ended up needing to do was enable the interface by adding the following to the standalone.XML file:
<management-interfaces>
<native-interface security-realm="ManagementRealm">
<socket-binding native="management-native"/>
</native-interface>
:
<management-interfaces>
The actual native management binding (HOST:PORT) is defined in JBoss configuration file as interface name="management" and socket-binding name="management-native". By default they use localhost and 9999.
When install system service, it is necessary to specify the correct /controller host:port values if management binding has been updated.
The error below in the log indicates the CLI command line cannot connect to the management interface when shutting down:
Could not connect to remote://localhost:9999. The connection failed
Confirm the /controller parameter used when configuring system service matches the management interface and socket binding definition in JBoss configuration file (standalone.xml / domain.xml and host.xml).
When configuring system service, if not specified, the default configuration for controller is :
/controller HOST:PORT The host and port of the management interface. If omitted, the default is localhost:9999.
Change this parameter to match the management interface and socket binding settings in the JBoss configuration file:
<interfaces>
<interface name="management">
<inet-address value="192.168.0.1"/>
</interface>
......
</interfaces>
<socket-binding-group name="standard-sockets" default-interface="public" port-offset="${jboss.socket.binding.port-offset:0}">
<socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
With such configuration above you need to specify /controller as below to install the system service
service.bat install /startup /controller=192.168.0.1:9999 /config standalone-customized-1.xml
If jboss.socket.binding.port-offset is set, confirm actual port number (after offset) is passed in /controller parameter. For example, if jboss.socket.binding.port-offset is set as 300 in standalon.xml, you need to use 10299 (default 9999 + 300) as PORT number to install system service:
service.bat install /startup /controller=192.168.0.1:10299 /config standalone-customized-2.xml

Cannot access eclipse orion server from local machine using local IP

I have been given a centos server to lauch eclipse orion code editor. I installed eclipse orion as per the instruction on https://wiki.eclipse.org/Orion/How_Tos/Install_Orion_on_Localhost (steps for linux using jetty server). It works fine on centos browser. The centos os is running on 198.168.1.226. So that I can access the following urls on web browser of centos.
198.168.1.226:8080
localhost:8080
127.0.0.1:8080
0.0.0.0:8080
But when I tried to access the 198.168.1.226:8080 from other local machines on local network, that is not accessible. I searched the StackOverflow Questions like how to make jetty server accessible from LAN? and Unable to access jetty server with local IP address but both are useless for me. How can I fix this situation? Can I fix it editing the code on orion.ini file or need to deal with configuration file or something else?
I have also tried the orion for windows computer but it worked itself for accessing the orion system for any other computer in local network. But I am surprised to face it on centos using the jetty server for setting up eclipse-orion system .
First of all check that have you allowed specific port (8080) from eclispse.
add rule with that port no. in centos iptables as below:-
iptables -A INPUT -p tcp --dport 8080 (adjust according your port no.) -j ACCEPT

Which ports are used by Jgroups?

I'm using Wildfly 8 for my server, in my server I use Infinispan (which use Jgroups) for cluster cache. I want to know which ports that Jgroups/Infinispan uses, so I can open these ports for communicating between server nodes without disable my Linux firewall.
Thank you.
You may find these answers in your wildfly/standalone/configuration/ directory. I assume you are using standalone-full-ha.xml configuration:
<!-- By default you are using UDP stack -->
<subsystem xmlns="urn:jboss:domain:jgroups:2.0" default-stack="udp">
<!-- Those ports are used for communication -->
<socket-binding name="jgroups-udp" port="55200" multicast-address="${jboss.default.multicast.address:230.0.0.4}" multicast-port="45688"/>
<socket-binding name="jgroups-udp-fd" port="54200"/>
Have you checked with basic network command such us
$ netstat -a
you can find more examples in binarytides

Cannot View JBOSS 6 using IP address:port on browser after starting Jboss on HP-ux

I unzipped Jboss application server 6 on hp-ux connecting remotely and started the application server using sh run.sh and it started without error in both the buildup of the starting up as well as in the server.log.
But unfortunately, I cannot view the started application server in the browser using: e.g.
192,168.15.10:8080.
Anyone out there who can help?
Thank you in advanced
By default Jboss 6 binds its service to 127.0.0.1 only. You will need add "-b 0.0.0.0" to the startup script, something like run.bat -b 0.0.0.0.
I'm assuming you're starting JBossAS using the jboss-as-standalone.sh script.
I recently had the same problem. JBoss assumes that accessing the server admin console from other machine is dangerous, so it's bindings are set by default to localhost or 127.0.0.1 at /standalone/configuration/standalone.xml.
Change the 3 interfaces elements to 0.0.0.0 so it can listen requests from all interfaces.
<interfaces>
<interface name="management">
<inet-address value="${jboss.bind.address.management:0.0.0.0}"/>
</interface>
<interface name="public">
<inet-address value="${jboss.bind.address:0.0.0.0}"/>
</interface>
<interface name="unsecure">
<inet-address value="${jboss.bind.address.unsecure:0.0.0.0}"/>
</interface>
</interfaces>
It should work the same way if you're not running JBoss in standalone mode, so edit the /domain/configuration/domain.xml file.

Resources