Jboss multiple instances in Standalone mode on same pc - jboss

We are using Jboss 7 App Server and we are trying run multiple server nodes on a single box and also on other box *basically 2 boxes which will have 2 each nodes of Jboss servers running).
My question is to have multiple nodes of Jboss Servers on a single box in Standalone mode. Should I have to copy server folder twice with port offsets?
Or is it ok to start servers just via port offset without having to copying server folder?
What is the best practice to have multiple server nodes running on the same box? Any advice would be greatly appreciated.
Thank you.

Just create multiple copies of standalone directory(Example: standalone_PROD,standalone_SIT) so that we will have separate log files and deployment directories for each instance. And use below option while starting server instance:
-Djboss.server.base.dir=/path/to/standalone_SIT <-- Location of standalone dir
-Djboss.socket.binding.port-offset=10 <-- PortOffset to avoid port conflict

We have had two instances of jboss on the same computer over several years. Both instances were in the same domain. Each instance had its own port and of course lay in its own path. Our experiences were good.

You can have as many standalone instances you want on a machine, depending upon the resources available.
All you need to do is copy over the same folder twice and make changes in all the ports to be used in the standalone mode. Also If you are setting any parameters make sure they are according to the memory available on the machine.

Related

Orient DB Distributed Database

I have been trying for hours now to set up a distributed database with Orient DB. I have followed their instructions here https://orientdb.com/docs/last/Tutorial-Setup-a-distributed-database.html but have had no luck. I am able to start a server on the first node. I then copy the directory and start a server in that copied directory, but the two nodes won't communicate with each other. They each just are acting as the first node. I tried using tcp instead of multicast in the hazelcast.xml file but that didn't seem to help. Any help would be greatly appreciated.
If you really want to setup a distributed environment that way, just copy the OrientDB folder before you setup any nodes or just download a fresh new installation.

How to test autodiscovery with just one computer?

I'm trying to write a Kotlin server with auto discovery, however I only have one computer to develop. My server uses a port and I just can't figure it out myself how to successfully test my application. Thanks for your help!
JVMs
You may be able to run copies of the app in different JVMs, but would have to run them on different ports.
VMs
This may be slow, but may be an option
Docker
Using Docker (and optionally compose) you been run multiple copies of the app on the same port, with less overhead than using full VMs.

Per-host or per-deployment subsystem configuration in WildFly

I have a number of demo environments that I would like to setup for different groups of customers. These would contain the same deployment apps (WAR's) but requiring different configurations. currently I'm using:
3 datasources (accessed by JNDI) per application (so each environment would need different databases)
some Naming/JNDI simple bindings which would need to be different by environment.
one activeMQ queue for environment, also identified via JNDI.
Would it be possible, on Wildfly 11, to configure the Naming, Datasources and ActiveMQ subsystems on a non-global manner ? Maybe by either configuring the subsystems on a server, host or deployment level? I don't mind having multiple Server or Hosts definitions with different network ports (8080, 8081, etc...)
I know that I can setup multiple instances of standalone running on the same machine, each with a different configuration file, but I would realy like to use the same Wildfly instance to manage this scenario. Is this at all possible ?
Thank you,
You should be using domain mode where you can manage several servers and assign to them different configuration profile https://docs.jboss.org/author/display/WFLY/Domain+Setup

How to start WildFly server without joining a cluster

We have five Wildfly (8.2.0-Final) servers running in different machines on the same network. When I start them, by default they come under a single cluster.
But I don't want this to happen. I want each of them act as a standalone server. I believe in JBoss-5 we can achieve this by passing -g option which would create a separate partition and thus a separate cluster.
Is there any similar option for WildFly? Please suggest. I don't want to run them in a cluster.
Thanks in advance.
If you do not want JBoss Wildfly to start in a cluster, use the non-HA standalone profiles such as standalone.xml or standalone-full.xml if you require messaging/JMS.
Hope it helps.
If you are particular to start with clustering mode and exclude clustering of two instance, change the jgroups address (udp/tcp) while starting

How to Run Two applications on single JBoss without creating multiple instance

I have one application which listen to 1099 port.
I also have another application which refer to same port(1099).
I have deploy this two application in single JBoss.
When i run JBoss(Using jboss-6.1.0.Final) it throws an error.
Is there any other way to do this without creating another instance of JBoss?
Two processes should not be listening to the same port. You should make the ports configurable in the applications, and then use different ports for them.