openhab / openhab-snap

Packaging of openHAB for Ubuntu Core
Eclipse Public License 2.0
18 stars 12 forks source link

Can't run influxdb on ARM64 #27

Closed thomasduchatelle closed 4 years ago

thomasduchatelle commented 4 years ago

Starting openhab on Rasberry PI3 64bits fails:

# snap logs openhab
2020-07-02T19:19:33Z systemd[1]: snap.openhab.influxd.service: Scheduled restart job, restart counter is at 1435.
2020-07-02T19:19:33Z systemd[1]: Stopped Service for snap application openhab.influxd.
2020-07-02T19:19:33Z systemd[1]: Started Service for snap application openhab.influxd.
2020-07-02T19:19:39Z openhab.influxd[1246774]: /snap/openhab/359/bin/read-config: line 54: /snap/openhab/359/bin/influxd: cannot execute binary file: Exec format error
2020-07-02T19:19:39Z openhab.influxd[1246774]: /snap/openhab/359/bin/read-config: line 54: /snap/openhab/359/bin/influxd: Success
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Main process exited, code=exited, status=126/n/a
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Failed with result 'exit-code'.
2020-07-02T19:19:39Z systemd[1]: snap.openhab.influxd.service: Scheduled restart job, restart counter is at 1436.
2020-07-02T19:19:39Z systemd[1]: Stopped Service for snap application openhab.influxd.
2020-07-02T19:19:39Z systemd[1]: Started Service for snap application openhab.influxd.

Looks influxdb is compiled for arch 32bits:

file /var/lib/snapd/snap/openhab/current/bin/influxd
/var/lib/snapd/snap/openhab/current/bin/influxd: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), statically linked, Go BuildID=6YwKlnYX3AvxnbN34er6/XGDZ35dwDApP1qcRn6zC/y6HuqaUTHLTxE-2GXIK5/1BP4ZoAwWJbwU797yfaW, not stripped

I'm running on Archlinux, ARM64 (Rasberry PI 3):

# cat /proc/version
Linux version 5.6.3-1-ARCH (builduser@leming) (gcc version 9.2.0 (GCC)) #1 SMP Sun Apr 12 15:53:26 UTC 2020

Thanks

kubiko commented 4 years ago

that's very strange, as I have just tested it on arm64 and it works as expected. True influxd is 32bit bin and I will look into it, why even native build on arm64 produces 32bin. It's probably something upstream, as version 1.8 is only available for armhf and 2.0 beta only for arm64. Regardless, I have tested now on 3 different arm64 machines, with no problem to run influxd in openHAB snap. So this could be something about archlinux. Also arm64 on Pi3 was always experimental. But then again, 32 support is there in raspberry kernel, so not really sure why statically linked binary should fail. Can you test if you can run influxd from https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0_linux_armhf.tar.gz

thomasduchatelle commented 4 years ago

Binary from https://dl.influxdata.com/influxdb/releases/influxdb-1.8.0_linux_armhf.tar.gz has the same issue. And installing influxdb 1.8 with pacman does provide a arm 64 binary.

I close the issue as I think it's too edge case to be considered here. For those finding this topic, using AUR works: https://aur.archlinux.org/packages/openhab2/