Is there any way to specify a backup / redundant gateway when using these scripts?
I have a use case where there will be PI3s needing access to the redundant failover mechanism.
Thanks
Is there any way to specify a backup / redundant gateway when using these scripts?
I have a use case where there will be PI3s needing access to the redundant failover mechanism.
Thanks
Sure, you should be able to add -Djavaws.sr.gateway.addr.1=${BACKUP_ADDRESS}
to the launch command when targeting the legacyClient.sh
Thanks,
Jonathan C
How would I modify it to look for the backup server if the main server isnât available at runtime?
It should do so automatically; the sr.gateway.addr
prop is the list of addresses to check. Theyâll be evaluated in order; so .0
, then .1
, etc, until a successful connection is made.
The script specifically downloads the .jar file each time from the master. Would there be a simple way to let it time out and check the backup?
edit: This type of code doesnât help because it sets the primary as the server that the jar file is downloaded from.
curl -o .......
if [ 7 -eq $? ] ; then
curl -o backupserver
my bash-fu isnât quite up to speed yet, but I think you use the âorâ double-pipe ( || ).
Example:
curl -k -o "$CURRENT_DIR/launchclient.jar" "$GATEWAY_ADDRESS/system/launchbin/launchclient.jar" ||
curl -k -o "$CURRENT_DIR/launchclient.jar" "$BACKUP_ADDRESS/system/launchbin/launchclient.jar"
The problem is that if the client runs the launchclient.jar from the backup machine, it wonât target the master when it comes back online. It will show trying to connect.
When launching a client which must fallback to the backup are you still including the master in the launch command? Even when launching using the backup gatewayâs launchclient.jar you should include both addresses (for example: -Djavaws.sr.gateway.addr.0=${MASTER} -Djavaws.sr.gateway.addr.1=${BACKUP}
)
When the master comes back on the client will be notified and the client will automatically switch over to the master.
Yes, Iâm still using the master in the launch command. The problem stems from the launchclient.jar being downloaded from the backup server earlier in the script.
It appears that when the launchclient.jar is downloaded from the backup server, the master location is already set to the backup IP address. So when the master comes back online and resumes control, the client that was launched from the backup will show that the master is offline (trying to go to backup IP) and the backup (correct IP) is available but not in use.
You may have to modify the script so that the master address is stored before download and referenced in the launch command?
Hereâs my script verbatim. As you can see, GATEWAY_ADDRESS="$1"
doesnât depend on successful curl
of launchclient.jar
.
#! /bin/bash
CURRENT_DIR=$(cd "$( dirname "$; thenBASH_SOURCE[0]fi")" && pwd)
JAVA_CMD="/usr/lib/jvm/bellsoft-java11-arm32-vfp-hflt/bin/java"
GATEWAY_ADDRESS="$1"
SCOPE="$2"
PROJECT="$3"
BACKUP_ADDRESS="$4"
DESIGNER_MAIN=com.inductiveautomation.ignition.designer.DesignerStartupHook
VISION_MAIN=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook
MAIN=$VISION_MAIN
BOOTSTRAP_MAIN=com.inductiveautomation.ignition.client.launch.BootstrapSwingFS
if [ "$GATEWAY_ADDRESS" == "" ]; then
echo Must declare a gateway address
usage
fi
if [ "$GATEWAY_ADDRESS" == "" ] ; then
echo Must declare a scope of either "D" or "C"
usage
else
true=0
if [ "$SCOPE" == "d" ] ; then
true=1
fi
if [ "$SCOPE" == "D" ] ; then
true=1
fi
if [ $true == 1 ] ; then
MAIN=$DESIGNER_MAIN
else
if [ "$SCOPE" == "c" ] ; then
true=1
fi
if [ "$SCOPE" == "C" ] ; then
true=1
fi
if [ $true == 1 ] ; then
if [ "$PROJECT" == "" ] ; then
echo Must declare a Vision project when using Vision Client scope.
usage
fi
MAIN=$VISION_MAIN
else
echo Must declare a scope value of 'D' or 'C'
goto :usage
fi
fi
fi
if [ -f "$CURRENT_DIR/launchclient.jar" ]; then
rm "$CURRENT_DIR/launchclient.jar"
fi
curl -o "$CURRENT_DIR/launchclient.jar" $GATEWAY_ADDRESS/system/launchbin/launchclient.jar
if [ 7 -eq $? ] ; then
curl -o "$CURRENT_DIR/launchclient.jar" $BACKUP_ADDRESS/system/launchbin/launchclient.jar
fi
if [ "$PROJECT" != "" ] ; then
"$JAVA_CMD" -cp "$CURRENT_DIR/launchclient.jar" -Djavaws.sr.gateway.addr.0=$GATEWAY_ADDRESS -Djavaws.sr.gateway.addr.1=$BACKUP_ADDRESS -Djavaws.sr.scope=$SCOPE -Djavaws.sr.main=$MAIN -Djavaws.sr.project=$PROJECT -Djavaws.sr.runtimeOverride=true $BOOTSTRAP_MAIN
else
"$JAVA_CMD" -cp "$CURRENT_DIR/launchclient.jar" -Djavaws.sr.gateway.addr.0=$GATEWAY_ADDRESS -Djavaws.sr.gateway.addr.1=$BACKUP_ADDRESS -Djavaws.sr.scope=$SCOPE -Djavaws.sr.main=$MAIN -Djavaws.sr.runtimeOverride=true $BOOTSTRAP_MAIN
fi
usage() {
echo Usage: legacyClient.sh GATEWAY_ADDRESS SCOPE PROJECT BACKUP_ADDRESS
}
I just tested your script locally with a down master. The client launched (targeting the backup in the backup slot with a master status of âunknownâ) and when the master came back online the client received a push notification and successfully connected to the master gateway.
Also, there were some fixes in ignition for gateway connections in 8.0.10 which may affect this? Double check that you are on the latest version.
Ok, it appears to be working as of now. Iâll update if this changes. Not sure what the issue was.
I tried launching the Designer and Client in Window and Full Screen but I keep getting the error message below. Any ideas?
...and then three years later, new problems arise.
Configured a Pi4 running Debian GNU/Linux 12 to run a Vision Client using the previously mentioned legacyClient.sh laucher with BellSoft JDK-11-full.
I ran this successfully on my developement gateway. When I moved it over to the live ignition gateway for the facility, it broke with the error:
UnsupportedClassVersionError: com/inductiveautomation/factrorypmi/application/runtime/ClientLaunchHook has been compiled by a more recent version of the Java Runtime (class file version 61.0), this version of the Java Runtime only recognizes class file version up to 55.0
My Developement Gateway was v8.1.23, while the Live Gateway is v8.1.33.
I upgraded Java to BellSoft JDK-17-full to correct the class file version issue, but now get the error:
ValidationException: JPMS Module opens/export check failed! check your --add-opens and --add-exports clauses
From what I have read they are trying to tighten the security of Java JDK with v17+
I found that I will need to add a series of "--add-opens=" and "--add-exports" clauses to make the JDK work, but I am not a Java expert, and am not entirely sure where these clauses need to be added nor exactly which clauses need to be added.
Please advise on how to resolve this issue.
Doug
\m/
Normally, the Launcher will query the gateway to retrieve the proper lists of opens/exports clauses for the Client/Designer.. You can query the list from your gateway via:
curl http://localhost:8088/system/clientJavaModules
Nifty. I run this command and get a list of add-opens and a list of add-expports, so they do exist at the gateway.
Question 1: Why does the Launcher not perform this task?
Question 2: How do I modify the Launcher to perform this task?
I appreciate the help and quick response,
Doug
\m/
Hi @Doug_Jones,
The Launcher does perform this task. You are using the stop-gap 32-bit launch scripts which don't do a lot of things the supported Launchers do. We don't ship a 32-bit arm launcher since 8.0 as support for 32-bit arm clients was dropped. This script is and has always been meant as a way to buy time to upgrade these devices to ones which support 64-bit architecture, so they no longer receive updates. However, you are free to update these scripts as you see fit, though I would recommend upgrading those systems in the near future.
Hope that sheds some light.
Also keep in mind that the gateway service doesn't use a launcher itself. Only the Vision clients need a launcher.
This is helpful. This Pi4b is a 64bit ARM. I was running the 32bit launcher because it was recommended in another thread. Given that this is a 64bit Pi, I have downloaded the Ignition Gateway for 64bit ARM, and successfully /easily established a Gateway on this PI. From that Gateway, have downloaded the Vision Client Launcher for Linux that was offered. Following the instructions associated to that download, I have not had success launching the vision client.
digging into the launch shell, it should be creating a log file for errors that it experiences, but it is not doing that. It appears that it is terminating without fault, but is not launching a vision client.
Question1: Is there a separate linux vision client launcher for 64bit ARM that I am not finding?
Question2: If not, is there any plan to develope such a thing?
Question3: Should I move this line of questions to another thread, as I am no longer pursuing a 32-bit vision client?