1. Help Center
  2. Getting Started

Setting up multiple servers on the same machine

Steps

C:\Users\Amritha\Downloads>java -jar diffusion-installer-6.7.2.jar

article17_image1

  • Select the path where you want to get your Diffusion installed.

article17_image2

  • ‘Deploy Demos’ is unchecked by default. You may check it before you proceed.

article17_image3

article17_image4

  • Proceed and complete the installation.

article17_image5

article17_image6

  • Go to the directory where Diffusion is installed.
C:\Work>cd "Diffusion 6.7.2"
  • To start Diffusion, run the Windows batch file in the bin folder. You may use diffusion_java11 if your java version is not 8.
C:\Work\Diffusion 6.7.2\bin>diffusion.bat
2021-11-12 12:26:06.528|INFO|main|PUSH-000578|||Diffusion 6.7.2 "Russell" - Build #4fbb8bff, 9156@PTLT72, Oracle Corporation Java HotSpot(TM) Client VM 1.8.0_311.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 12:26:06.628|INFO|main|PUSH-000166|||Diffusion server 'PTLT72' starting.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 12:26:06.628|INFO|main|PUSH-000159|||The maximum message size is 32768 bytes.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 12:26:07.014|WARN|main|PUSH-000676|||This system has 16 available cores which exceeds the license limit of 8 cores. The server thread pools have been constrained to degrade performance.|com.pushtechnology.diffusion.licence.agent.c
2021-11-12 12:26:07.245|WARN|main||||
*******************************************************************************
Thank you for choosing Diffusion. This server is using a restricted default
license. It is limited to 1000 topics, 5 user sessions, and 8 CPU cores.
Production use is explicitly prohibited.

Get a more capable license for this server by joining the Push Technology
Developer Community at https://community.pushtechnology.com. Registration is
free and allows you to generate a community license that supports single
server production deployments and up to 1000 user sessions. You can also
generate an evaluation license that grants trial access to premium features
available with a commercial license including multi-server clusters for
high-availability and scale, topic persistence, and inter-server connections
across wide area networks.

For a commercial license that supports larger numbers of topics and sessions
and production use of the premium features, please contact our sales team.

https://www.pushtechnology.com/ [email protected] +44 20 3588 0900
*******************************************************************************
|com.pushtechnology.diffusion.licence.agent.LicenceLoaderImpl
2021-11-12 12:26:09.318|INFO|main|PUSH-000808|||JMX has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2\etc\sample.keystore'.|com.pushtechnology.diffusion.management.RemoteJMXService
2021-11-12 12:26:09.657|INFO|main|PUSH-000216|||Remote JMX management service has started. Listening to service:jmx:rmi://localhost:1100/jndi/rmi://localhost:1099/jmxrmi.|com.pushtechnology.diffusion.management.RemoteJMXService
2021-11-12 12:26:09.735|INFO|main|PUSH-000193|||Connector 'Client Connector' has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2\etc\sample.keystore'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:09.789|INFO|main|PUSH-000362|||Started HTTP service for 'default-prometheus-service'.|com.pushtechnology.diffusion.webserver.services.HTTPService
2021-11-12 12:26:09.804|INFO|main|PUSH-000337|||Added file service virtual host 'default' to serve files from 'html' to requests where the host header matches '.*'.|com.pushtechnology.diffusion.webserver.services.fileservice.FileService
2021-11-12 12:26:09.820|INFO|main|PUSH-000072|||Connector 'Client Connector' started, listening on 0.0.0.0/0.0.0.0:8080.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:09.820|INFO|main|PUSH-000712|||Connector 'Client Connector' has scheduled pings every 90000ms.|com.pushtechnology.diffusion.comms.connector.PingScheduler
2021-11-12 12:26:10.065|INFO|main|PUSH-000806|||The file service is serving files at https://192.168.1.156:8080 .|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:10.065|INFO|main|PUSH-000193|||Connector 'High Volume Connector' has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2\etc\sample.keystore'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:10.065|INFO|main|PUSH-000072|||Connector 'High Volume Connector' started, listening on 0.0.0.0/0.0.0.0:8090.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:10.065|INFO|main|PUSH-000712|||Connector 'High Volume Connector' has scheduled pings every 90000ms.|com.pushtechnology.diffusion.comms.connector.PingScheduler
2021-11-12 12:26:10.327|INFO|main|PUSH-000806|||The file service is serving files at https://192.168.1.156:8090 .|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 12:26:10.358|INFO|main|PUSH-000165|||Diffusion server started.|com.pushtechnology.diffusion.DiffusionController

article17_image7

  • Scroll down for Management Console

article17_image8

Credentials: admin/password

article17_image9

You've thus got one Diffusion instance running successfully on your machine.

How to run a second Diffusion instance on the same machine?

  • Download any version of Diffusion as you wish.  If you are using the same version, then install it again at a new path just as you did for your first instance.
  • Complete the installation.

article17_image10

article17_image11

  • To run the newly installed version, open Command Prompt and issue the command just as you did previously.
C:\Work\Diffusion 6.7.2_2\bin>diffusion.bat
2021-11-12 13:27:57.952|INFO|main|PUSH-000578|||Diffusion 6.7.2 "Russell" - Build #4fbb8bff, 15000@PTLT72, Oracle Corporation Java HotSpot(TM) Client VM 1.8.0_311.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:27:58.037|INFO|main|PUSH-000166|||Diffusion server 'PTLT72' starting.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:27:58.037|INFO|main|PUSH-000159|||The maximum message size is 32768 bytes.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:27:58.322|WARN|main|PUSH-000676|||This system has 16 available cores which exceeds the license limit of 8 cores. The server thread pools have been constrained to degrade performance.|com.pushtechnology.diffusion.licence.agent.c
2021-11-12 13:27:58.554|WARN|main||||
*******************************************************************************
Thank you for choosing Diffusion. This server is using a restricted default
license. It is limited to 1000 topics, 5 user sessions, and 8 CPU cores.
Production use is explicitly prohibited.

Get a more capable license for this server by joining the Push Technology
Developer Community at https://community.pushtechnology.com. Registration is
free and allows you to generate a community license that supports single
server production deployments and up to 1000 user sessions. You can also
generate an evaluation license that grants trial access to premium features
available with a commercial license including multi-server clusters for
high-availability and scale, topic persistence, and inter-server connections
across wide area networks.

For a commercial license that supports larger numbers of topics and sessions
and production use of the premium features, please contact our sales team.

https://www.pushtechnology.com/ [email protected] +44 20 3588 0900
*******************************************************************************
|com.pushtechnology.diffusion.licence.agent.LicenceLoaderImpl
2021-11-12 13:28:00.478|INFO|main|PUSH-000808|||JMX has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2_2\etc\sample.keystore'.|com.pushtechnology.diffusion.management.RemoteJMXService
2021-11-12 13:28:00.510|WARN|main|PUSH-000656|||Unable to start connector 'Management' on port 1099, address already in use.|com.pushtechnology.diffusion.management.ManagementServiceImpl
2021-11-12 13:28:00.545|INFO|main|PUSH-000193|||Connector 'Client Connector' has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2_2\etc\sample.keystore'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:28:00.594|INFO|main|PUSH-000362|||Started HTTP service for 'default-prometheus-service'.|com.pushtechnology.diffusion.webserver.services.HTTPService
2021-11-12 13:28:00.610|INFO|main|PUSH-000337|||Added file service virtual host 'default' to serve files from 'html' to requests where the host header matches '.*'.|com.pushtechnology.diffusion.webserver.services.fileservice.FileService
2021-11-12 13:28:00.625|INFO|main|PUSH-000072|||Connector 'Client Connector' started, listening on 0.0.0.0/0.0.0.0:8080.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:28:00.625|WARN|main|PUSH-000656|||Unable to start connector 'Client Connector' on port 8080, address already in use.|com.pushtechnology.diffusion.comms.connector.ConnectorManager
2021-11-12 13:28:00.625|ERROR|main|PUSH-000571|||Failed to start required connector, 'Client Connector'.|com.pushtechnology.diffusion.comms.connector.ConnectorManager
2021-11-12 13:28:00.625|WARN|main|PUSH-000168|||Diffusion stopping, reason='Failed to start required connector, 'Client Connector'.' by administrator='anonymous'.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:28:00.647|INFO|main|PUSH-000566|||Daily statistics have been written in the ConnectionCount file.|com.pushtechnology.diffusion.statistics.SessionCountsImpl
2021-11-12 13:28:00.663|INFO|main|PUSH-000549|||Stopping selector thread 'SelectorThreadPool Thread_0'.|com.pushtechnology.diffusion.io.nio.AbstractUnifiedSelector
2021-11-12 13:28:00.678|INFO|main|PUSH-000167|||Diffusion stopped.|com.pushtechnology.diffusion.DiffusionController

This diffusion instance fails to run. The log shows the reason explicitly as its failing to start the Client connector on the given port. Because your first instance is already using it. Hence, we need to change that before starting another instance. There is also an other port that needs to be changed just like Client Connector, which is being used by the first instance and that is High Volume Connector.

Where to change the ports?

Connectors.xml

This can be found in the etc folder.

  • Let’s change Client Connector port, say, 8081 and High volume connector to say, 8092.

article17_image12

  • Save the changes.
  • Run the batch file from Command Prompt. The second Diffusion server starts.
2021-11-12 13:52:27.654|INFO|main|PUSH-000578|||Diffusion 6.7.2 "Russell" - Build #4fbb8bff, 13360@PTLT72, Oracle Corporation Java HotSpot(TM) Client VM 1.8.0_311.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:52:27.754|INFO|main|PUSH-000166|||Diffusion server 'PTLT72' starting.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:52:27.754|INFO|main|PUSH-000159|||The maximum message size is 32768 bytes.|com.pushtechnology.diffusion.DiffusionController
2021-11-12 13:52:27.993|WARN|main|PUSH-000676|||This system has 16 available cores which exceeds the license limit of 8 cores. The server thread pools have been constrained to degrade performance.|com.pushtechnology.diffusion.licence.agent.c
2021-11-12 13:52:28.224|WARN|main||||
*******************************************************************************
Thank you for choosing Diffusion. This server is using a restricted default
license. It is limited to 1000 topics, 5 user sessions, and 8 CPU cores.
Production use is explicitly prohibited.

Get a more capable license for this server by joining the Push Technology
Developer Community at https://community.pushtechnology.com. Registration is
free and allows you to generate a community license that supports single
server production deployments and up to 1000 user sessions. You can also
generate an evaluation license that grants trial access to premium features
available with a commercial license including multi-server clusters for
high-availability and scale, topic persistence, and inter-server connections
across wide area networks.

For a commercial license that supports larger numbers of topics and sessions
and production use of the premium features, please contact our sales team.

https://www.pushtechnology.com/ [email protected] +44 20 3588 0900
*******************************************************************************
|com.pushtechnology.diffusion.licence.agent.LicenceLoaderImpl
2021-11-12 13:52:30.154|INFO|main|PUSH-000808|||JMX has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2_2\etc\sample.keystore'.|com.pushtechnology.diffusion.management.RemoteJMXService
2021-11-12 13:52:30.176|WARN|main|PUSH-000656|||Unable to start connector 'Management' on port 1099, address already in use.|com.pushtechnology.diffusion.management.ManagementServiceImpl
2021-11-12 13:52:30.223|INFO|main|PUSH-000193|||Connector 'Client Connector' has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2_2\etc\sample.keystore'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.276|INFO|main|PUSH-000362|||Started HTTP service for 'default-prometheus-service'.|com.pushtechnology.diffusion.webserver.services.HTTPService
2021-11-12 13:52:30.292|INFO|main|PUSH-000337|||Added file service virtual host 'default' to serve files from 'html' to requests where the host header matches '.*'.|com.pushtechnology.diffusion.webserver.services.fileservice.FileService
2021-11-12 13:52:30.308|INFO|main|PUSH-000072|||Connector 'Client Connector' started, listening on 0.0.0.0/0.0.0.0:8081.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.308|INFO|main|PUSH-000712|||Connector 'Client Connector' has scheduled pings every 90000ms.|com.pushtechnology.diffusion.comms.connector.PingScheduler
2021-11-12 13:52:30.544|INFO|main|PUSH-000806|||The file service is serving files at https://192.168.1.156:8081 .|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.544|INFO|main|PUSH-000193|||Connector 'High Volume Connector' has loaded a TLS keystore from 'C:\Work\Diffusion 6.7.2_2\etc\sample.keystore'.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.544|INFO|main|PUSH-000072|||Connector 'High Volume Connector' started, listening on 0.0.0.0/0.0.0.0:8092.|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.544|INFO|main|PUSH-000712|||Connector 'High Volume Connector' has scheduled pings every 90000ms.|com.pushtechnology.diffusion.comms.connector.PingScheduler
2021-11-12 13:52:30.778|INFO|main|PUSH-000806|||The file service is serving files at https://192.168.1.156:8092 .|com.pushtechnology.diffusion.comms.connector.ConnectorImpl
2021-11-12 13:52:30.809|INFO|main|PUSH-000165|||Diffusion server started.|com.pushtechnology.diffusion.DiffusionController

You can also view the Management Console.

article17_image13

Similarly, you can setup as many instances as you want on your local machine. Ensure that you supply different ports for Client connector and High Volume connectors and you should be good to go!