Vision on ARM64

So the general consensus so far has been that in order to run on ARM (raspberry pi), you need to use the legacy launcher, and rather than using the packaged Java that is normally downloaded with the launcher, you need to install java ahead of time. Since on the Raspberry Pi, raspian has only been 32-bit (even though hardware is 64 bit), there have been some compatibility issue with some modules (like JxBrowser for example only supports 64 bit ARM architecture).
Now, there are some ready to run 64 bit packages for raspberry pi, so it seems like we should be able to get over this. I went ahead and loaded up a 64 bit ā€˜Raspberry Pi OSā€™ package (no longer called raspbian) and installed Java. When I download and run the .desktop, nothing happens. If I manually try to run the .jar file with this format ā€œjava -cp launcher.jarā€, I get an error message telling me that it is expecting an AMD 64 platform, and not a AARCH64 platform.

So is there another launcher out there that does work with the AARCH64 platform? The legacy launcher still works, but being on 64bit doesnā€™t seem to solve any of the incompatibilities that come along with it (JxBrowser). Or is it that JxBrowser isnā€™t compatible with my Java version? According to their website it should be fine? https://jxbrowser-support.teamdev.com/docs/quickstart/requirements.html

Raspi Client:
Java Version: Open JDK 14.0.2
Debian 10.4

Ignition Server:
Web Browser Module 4.0.15
Ignition 8.0.14

AFAIK there is no JXBrowser support (so no Perspective in the Designer) for ARM and no JavaFX support (launchers) for ARM.

The legacy launcher for Vision trick works because Vision clients use Java Swing, which, at least in some runtimes, does run on ARM right now.

I think weā€™ve got a JXBrowser update coming that may solve the ARM problem, but Iā€™m not sure about JavaFX.

edit: getting someone who knows more to come clarify.

Kevinā€™s response is on target.

Weā€™re working on upgrading to JxBrowser 7.x, which should overcome the lack of support in the 6.x version (aka, the version currently used in Ignition). The 7.x update is a complete rewrite of the JxBrowser library, and only recently released 7.10 which we believe solves some issues that were preventing us from upgrading. Weā€™ll be testing this update and hopefully be able to move forward with it. No ETA, but hopefully in one of the next couple releases.

As far as I understand, there should be appropriate support from Azul and JavaFx, but weā€™ll need to do some verification. If true, then weā€™ll start evaluating any remaining issues/considerations for adding support.

Ok, that makes sense. JxBrowser ARM 64 support was recently added, but it hasnā€™t made itā€™s way into Ignition yet. Looking forward to that!

Iā€™ll do some more playing around to see if I can get the current Linux launcher to work on an ARM system. As of right now, as long as I modify the .sh file so it uses the locally pre-installed java version instead of the packaged version, Iā€™m able to get the application selection window to open. Unfortunately, I canā€™t actually run anything; if I try, it dies pretty much silently. This is all thatā€™s in the log:

INFO  [GatewayConnect                ] [2020/08/20 13:53:50]: Attempting to connect to gateway http://192.168.0.1:8088...
INFO  [LaunchUtil                    ] [2020/08/20 13:53:52]: Starting Java with the following parameters: nohup /home/pi/.ignition/cache/resources/runtimes/11.0.6/bin/java -classpath /home/pi/.ignition/clientlauncher-data/launchclient.jar -Djavaws.sr.gateway.addr.0=http://192.168.0.1:8088 -Djavaws.sr.launchts=1597946032597 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms32M -Xmx256M -Djavaws.sr.memory.init=32M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=RFIDDev com.inductiveautomation.ignition.client.launch.BootstrapSwing & 

Hereā€™s my .sh file that actually opens the application selection box:

#! /bin/bash
##Launches an instance of the Vision Client Launcher
# Get the location of the script.
REALDIR=$(cd "$( dirname "${BASH_SOURCE[0]}")" && pwd)

# Logging if error
LAUNCHER_LOGFILE="${REALDIR}/../visionclientlauncher.log"
LOG_MSG="ERROR [LauncherApplication           ] [$(date +"%Y/%m/%d %T")]:"

#if [ "$(getconf LONG_BIT)" != "64" ]; then
#	"${REALDIR}/../runtime/bin/./java" --version
#	if [ $? -ne 0 ]; then
#		echo "${LOG_MSG} 64-bit OS not detected. This launcher must run on a 64-bit OS." | tee -a "${LAUNCHER_LOGFILE}"
#	fi
#fi

#update the .desktop icon
sed -i 's,Icon=launcher.png,'"Icon=${REALDIR}\/launcher.png"',' "${REALDIR}/../visionclientlauncher.desktop"

#"${REALDIR}/../runtime/bin/./java" -jar "${REALDIR}/launcher-vision-client-linux.jar" $@ >/dev/null 2>&1 &
java -jar "${REALDIR}/launcher-vision-client-linux.jar" $@ >/dev/null 2>&1 &

AFAIK, javafx should be included in the version of java Iā€™m running. Iā€™m now on Liberica Full OpenJDK 64-Bit 14.0.2 + 13

Try running this, but substitute the path to your own Java runtime:

nohup /home/pi/.ignition/cache/resources/runtimes/11.0.6/bin/java -classpath /home/pi/.ignition/clientlauncher-data/launchclient.jar -Djavaws.sr.gateway.addr.0=http://192.168.0.1:8088 -Djavaws.sr.launchts=1597946032597 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms32M -Xmx256M -Djavaws.sr.memory.init=32M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=RFIDDev com.inductiveautomation.ignition.client.launch.BootstrapSwing &

If that works, isnā€™t there a setting in the launcher to use the bundled vs system Java?

I thought that was the whole idea of the workaround here: using the system java and not the bundled Java. I think using the java in the .ignition folder like you suggested would be the same as running the launcher without any modifications?

Well, it's running the Vision client, not the launcher, but yeah, it would be, just as a sanity check.

I'm not sure if the launcher has the ability to actually launch the client or designer using the system Java like I thought it did, though. @jcoffman?

I started a new thread to talk about other ways to get to my goal here (rotating always-up screens):
http://forum.inductiveautomation.com/t/rotating-status-display/37959

Iā€™ll keep plugging away on getting the v8 launcher to work on ARM hardware, that would certainly be an achievement.

Ohhh, I didnā€™t realize what you were trying to tell me here until now. So, this is essentially what the launcher runs when you click the application.

Ok, when I run this:

nohup /usr/lib/jvm/bellsoft-java14-full-aarch64/bin/java -classpath /home/pi/Desktop/visionclientlauncher/app/launcher-vision-client-linux.jar -Djavaws.sr.gateway.addr.0=http://192.168.0.1:8088 -Djavaws.sr.launchts=1598016355007 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms64M -Xmx256M -Djavaws.sr.memory.init=64M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=RFIDDev com.inductiveautomation.ignition.client.launch.BootstrapSwing &

or this:

nohup java -classpath /home/pi/Desktop/visionclientlauncher/app/launcher-vision-client-linux.jar -Djavaws.sr.gateway.addr.0=http://192.168.0.1:8088 -Djavaws.sr.launchts=1598016355007 -Djavaws.sr.main=com.inductiveautomation.factorypmi.application.runtime.ClientLaunchHook -Djavaws.sr.platform.edition= -Djavaws.sr.platform.plugins= -Xms64M -Xmx256M -Djavaws.sr.memory.init=64M -Djavaws.sr.memory.max=256M -Dsun.java2d.d3d=false -Dsun.java2d.noddraw=false -Djavaws.sr.screen=0 -Djavaws.sr.scope=C -Djavaws.sr.project=RFIDDev com.inductiveautomation.ignition.client.launch.BootstrapSwing &

I get this in nohup.out:

Error: Could not find or load main class com.inductiveautomation.ignition.client.launch.BootstrapSwing
Caused by: java.lang.ClassNotFoundException: com.inductiveautomation.ignition.client.launch.BootstrapSwing

However, if I run this, the launcher opens:

nohup java -jar /home/pi/Desktop/visionclientlauncher/app/launcher-vision-client-linux.jar

I think weā€™re talking past each other here. Iā€™m trying to help you open the Vision Client. That command line I posted is what the launcher runs. You can manually run it replacing just the runtime path, not the JAR it points at, and get a Vision Client to launch with your system Java. Thatā€™s all.

Opening the launcher is irrelevant right now because the from what I can tell the launcher canā€™t use the system Java to launch a Vision Client. Itā€™s always trying to use the embedded runtime to launch the Vision Client.

I wouldnā€™t recommend going this route (using the Launchers on ARM) as the javafx required libs may be incomplete or incompatible on some systems.

The latest error you are seeing is because the jar that spins up a client is missing on your system, the launchers (and the legacy launcher) grab this for you from the gateway you are targeting, so you definitely want to use the legacylauncher script in your case.

That being said, the launchers JSON (.ignition/clientlauncher-data/vision-client-launcher.json) has two fields within it for each application that allows you to point it to a locally installed application for launching:

"use.custom.jre": false,
"custom.jre.path": "${JAVA_HOME}/bin/java",

These allow you to override the retrieval and launching against the JRE bundled with the target gateway. It is recommended that you use a current and compatible version of java 11 for this since all of our testing is done against the version we bundle with that gateway.

Hope this helps,
Jonathan C

Ahh, there it is! I thought we had added something, itā€™s just not in the UI.

1 Like

Ok that makes sense now, if I want to use the system java and not the packaged java, I need to open the vision client directly and not through the launcher unless I modify that json file.

Ok, yep, the legacy launch .sh script worked with the v8 linux launcher. Fantastic! Pending just a few items, I think I should be completely finished:

  • Install JRE/JDK v11 for ARM64 instead of v14 (I'll have to check that JavaFX is still supported in those revs)
  • Wait for new rev of JxBrowser that supports ARM64 (Could I possibly get a beta version?)

OK, I'll give it a shot anyway and see if it works out. So far so good though...
Do you have any better suggestions for ARM? Or just avoid vision on ARM entirely? (or keep using swing??)
Thanks so much guys for your help here!

You can definitely use Vision for clients (via the legacy launch script and your own JRE) and your web browser for Perspective, but any designing in the Designer should probably be done on a different machine, at least for now.

Sounds good, it never really crossed my mind to do development on a Piā€¦

Any way I could get an advance copy of the JxBrowser module? This would make my life a lot easierā€¦

That would imply we had one that was finished or functional... :sweat_smile:

1 Like

Thanks you so much for this information