los.adrian
los.adrian

Reputation: 538

Connect to JBoss AS 7 on Oracle Linux 7 in VirtualBox

I installed the Oracle Linux 7 in to the VirtualBox. This is a standard installation, I did not configure anything. The virtual machine network is attached to Bridged Adapter.

[root@localhost ~]# /etc/sysconfig/network-scripts/ifup ifcfg-enp0s3

Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/0)

[root@localhost ~]# ip addr

2: enp0s3: mtu 1500 qdisc pfifo_fast state UP qlen 1000 link/ether 08:00:27:ad:4f:68 brd ff:ff:ff:ff:ff:ff inet 172.24.131.35/24 brd 172.24.131.255 scope global enp0s3 inet6 fe80::a00:27ff:fead:4f68/64 scope link valid_lft forever preferred_lft forever

With winscp I copied the jboss-as-7 and the java to /usr/etc path.

[root@localhost ~]# export JAVA_HOME="/usr/etc/jdk1.7.0_67"

[root@localhost ~]# export PATH=$JAVA_HOME/bin:$PATH

[root@localhost ~]# java -version

-bash: /usr/etc/jdk1.7.0_67/bin/java: Permission denied

[root@localhost ~]# chmod u+x /usr/etc/jdk1.7.0_67/bin/java [root@localhost ~]# java -version

java version "1.7.0_67" Java(TM) SE Runtime Environment (build 1.7.0_67-b01) Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

[root@localhost ~]# chmod u+x /usr/etc/jboss-as-7.1.1.Final/bin/standalone.sh

[root@localhost ~]# /usr/etc/jboss-as-7.1.1.Final/bin/standalone.sh

...

08:46:30,919 INFO [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-2) Initializing Mojarra 2.1.7-jbossorg-1 (20120227-1401) for context '/MyExample'

08:46:32,269 INFO [org.jboss.web] (MSC service thread 1-2) JBAS018210: Registering web context: /MyExample

08:46:32,369 INFO [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "MyExample.war"

After this, I tried to connect with my Host machine to the Guest server with this link http:// 172.24.131.35 : 8080/MyExample/ But it is not connect.

What could be wrong? In the Linux or in the standalone.xml? Or my virtual machine installation in VirtualBox?

The JBoss AS 7 is a standard install too.

Here is the console log.

Upvotes: 0

Views: 554

Answers (2)

los.adrian
los.adrian

Reputation: 538

The problem was the firewall on the Oracle Linux 7.

So i had to stop and disable firewalld using systemd.

systemctl stop firewalld.service systemctl disable firewalld.service

Thanks, ed

Upvotes: 0

Petr Mensik
Petr Mensik

Reputation: 27496

If you want to connect from external machines (which is your Host now) you need to set jboss.bind.address to your IP or to 0.0.0.0. So run it likes this

sh standalone.sh -b 0.0.0.0

Now you should be to connect to your server remotely.

Upvotes: 2

Related Questions