Sidebar

Is it possible to run two (2) instances of QIE on the same machine?

+1 vote
405 views
asked Nov 30, 2015 by ben-s-7515 (12,640 points)
Is it possible to run two different instances of QIE on the same machine?

1 Answer

+3 votes
 
Best answer

Yes it is possible to run two instances of QIE on the same machine.  The easiest way to do this is under linux.  In this example configuration we will use Ubuntu.

1) Under the root directory create the following folders

# mkdir /java
# mkdir /java/qie
# mkdir /java/qie2

2) Download the war to your linux system.  The war can be downloaded from https://www.qvera.com/qiedownloadwar.html

3) Place copy of zip file in the '/java/qie' and '/java/qie2' directories.

4) Extract zip files in both directories.

5) Copy '/java/qie/qie.conf' to '/etc/init/qie.conf'

6) Edit '/java/qie2/qie.conf and make it:

description "Qvera (2) Interface Engine Service"
author      "Qvera (2) <info@qvera.com>"

start on local-filesystems
stop on runlevel [!2345]

exec /java/qie2/start.sh

7) Rename '/java/qie2/qie.conf' to '/java/qie2/qie2.conf'

8) Copy '/java/qie2/qie2.conf' to '/etc/init/qie2.conf'

9) Copy '/java/qie/start.sh.dist' to '/java/qie/start.sh'

10) Copy '/java/qie2/start.sh.dist' to '/java/qie2/start.sh'

11) Edit '/java/qie2/start.sh' and make it:  NOTE: The key here is that the 'qie' directory is replaced with 'qie2', the jetty.port is changed from 80 to 8080, and there is a new 'qie.rmiPort' java option that changes the default port (51494) to 51495.

#!/bin/sh
# With the autoupdate feature, the order of arguments and options has changed.
# We split the program into two portions: qieLauncher.jar and qie.war
#   1. qieLauncher.jar  - This is what stops, updates, and restarts the QIE as it auto updates.
#                         Its only java option (which is before the "-jar /java/qie/qieLauncher.jar" line) should be
#                         the reference to qie.home ("-Dqie.home=/java/qie").
#
#                         qieLauncher.jar uses its java arguments (which are after the "-jar /java/qie/qieLauncher.jar" line)
#                         as java options in starting up QIE.  QIE runs in a separate JVM from the qieLauncher.jar.
#                         For any additional java options you want to pass to the qie.war, append them as java arguments.
#
#   2. qie.war          - This is the actual QIE service.  The qie.home value only needs to be defined as a java option, and not a
#                         java argument.  The qieLauncher.jar copies that option as it calls the qie.war.

# The line below creates the /java/qie/logs/ directory if it does not exist.
# If your qie.home is a different location, you will need to change this command to represent that change.
[ ! -d /java/qie2/logs/ ] && mkdir /java/qie2/logs/

java -Dqie.home=/java/qie2 \
    -jar /java/qie2/qieLauncher.jar \
    -Xmx512m \
    -XX:MaxPermSize=96m \
    -Dqie.rmiPort=51495 \
    -Djava.endorsed.dirs=/java/qie2/endorsed \
    -Djetty.port=8080 \
    -Dhttp.proxyHost= \
    -Dhttp.proxyPort= \
    -Dhttp.nonProxyHosts=

12) Add database connection information to both '/java/qie/start.sh' and '/java/qie2/start.sh' as needed.

13) Start both services with the following command

# start qie;
# start qie2;

Now you can connect to QIE with the following URL's:

http://{linux-server} (this will be for the '/java/qie' instance)

http://{linux-server}:8080 (this will be for the '/java/qie2' instance)

answered Nov 30, 2015 by ben-s-7515 (12,640 points)
selected Nov 30, 2015 by brandon-w-8204
...