Ziti tunneler not installing on rPi4

Hi community,

I am new to ziti and working on a POC test of using Ziti for industrial OT. I started with a personal setup, with the controller and ZAC running on a VM. I managed to install the Ziti Desktop Edge on my PC without any issues and establish first connections. With significantly more hassle, I got the ziti-edge-tunnel running on a Raspberry Pi 5, following the instructions here for Debian.

Now I try to repeat the process on an older Raspberry Pi 4. Attempting to add the repositories and install using apt or running the installation script both give the similar result:

E: Unable to locate package ziti-edge-tunnel

or respectively

E: Unable to locate package openziti

Downloading the .deb-package from JFrog and attempting to install with dpkg gives:

sudo dpkg -i ziti-edge-tunnel-1.2.10-585.deb
dpkg: error processing archive ziti-edge-tunnel-1.2.10-585.deb (--install):
package architecture (arm) does not match system (armhf)
Errors were encountered while processing:
 ziti-edge-tunnel-1.2.10-585.deb

So it seems the packages in the armhf folder are of the wrong type and therefore all methods fail. My architecture is armhf and distribution is Raspbian GNU/Linux 11 (bullseye).

Could you please help me out?

Just dropping a note here on your post. I don't have time to help out personally on this one but the end of year is here and much of the OpenZiti team is enjoying time off. Support for posts will likely be delayed. We will reply when we can but it might not be until next week. If we can help sooner, we will. Cheers

No worries, this was a remote instance that I will not have physical access to before April. It seems that my attempt to install ziti killed it, because after a scheduled reboot it has not been seen for two days. I suspect that it was the enabling of systemd-resolved (which I had to fight with on the rPi5) that I now did in advance of the install that has caused the reboot to fail, at least with respect to network connections.

Hi @kastrom!

Setting up a Ziti tunneler on a Raspberry Pi will occasionally require an extra step, but we can help you get it working.

You're correct! The 32-bit package was built incorrectly for the older, generic "arm" package architecture, which does not assume hardware support for floating-point operations, which is prevalent in modern 32-bit ARM devices (armhf).

Still, the binary inside the package has the correct interpreter, /lib/ld-linux-armhf.so.3, so, in this case, I think you can work around the architecture mismatch with dpkg --install --force-architecture.

Alternatively:

Install a 64-bit OS

You have a 32-bit Debian OS installed on a device with a 64-bit CPU. If you cannot find software for your OS architecture, you can install a 64-bit OS. All Raspberry Pi v4 and v5 models have 64-bit armv8 CPU architecture.

You can confirm the OS and CPU architecture. The package manager will report the target architecture for which the OS was compiled, and the kernel will report the actual CPU architecture.

# ask the package manager
dpkg --print-architecture
# ask the kernel
uname -m

I assume dpkg will, as before, say the target architecture is armhf (i.e., 32-bit armv7), and uname will report aarch64 (i.e., 64-bit armv8), which means your device supports 64-bit Raspbian, which may not have the same problem installing the Linux package.

Build the Debian package for armhf

I've sent a pull request in GitHub to change the target architecture for 32-bit Debian package to armhf. In the meantime, here are the steps to build the package.

  1. Clone the tunneler SDK repo on your x86_64 Linux system and change to the directory containing your working copy. Then, check out the latest stable release and perform the following steps to cross-compile ziti-edge-tunnel and build the Debian package for armhf.

    git checkout v1.2.10
    
  2. Patch the 32-bit arm toolchain.

    patch -p1 <<EOF
    diff --git a/toolchains/Linux-arm.cmake b/toolchains/Linux-arm.cmake
    index 3d75c76..ad0cc03 100644
    --- a/toolchains/Linux-arm.cmake
    +++ b/toolchains/Linux-arm.cmake
    @@ -6,7 +6,7 @@ set(triple arm-linux-gnueabihf)
     set(CMAKE_C_COMPILER ${triple}-gcc)
     set(CMAKE_CXX_COMPILER ${triple}-g++)
    
    -set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE arm)
    +set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE armhf)
     set(CPACK_RPM_PACKAGE_ARCHITECTURE armv7l)
    
     set(ENV{PKG_CONFIG_PATH} /usr/lib/${triple}/pkgconfig)
    EOF
    
  3. Build the Ubuntu Focal builder image.

    cd ./.github/actions/openziti-tunnel-build-action/ubuntu-20.04/;
    docker buildx build -t focal-builder . --load;
    
  4. Run the Ubuntu Focal builder.

    docker run --name focal-builder --rm --volume "${PWD}:/github/workspace" --workdir "/github/workspace" focal-builder ci-linux-arm Release
    
  5. Verify the artifact's architecture.

    dpkg-deb -I ./build/ziti-edge-tunnel-*.deb
    

    gets:

    ...
    Architecture: armhf
    ...
    
  6. Finally, copy the package file to the 64-bit Raspberry Pi running 32-bit Raspbian and install it.


This package repo appears to have the same problem for arm or arm64 or both. I'll send a pull request to fix the architecture strings.