version `CXXABI_1.3.9' not found when running 'balena os configure'

Hi

I am using OpenBalena on CentOS 7.4 and I get this `CXXABI_1.3.9’ not found error when running CLI command ‘balena os configure’. Any ideas?

[root@centos balena-cli]# ./balena os configure /home/balena/balena-cloud-raspberrypi3-2.51.1+rev1-v11.4.10.img --app MyAppName --debug
[debug] new argv=[/home/balena-cli/balena,/snapshot/versioned-source/bin/balena,os:configure,/home/balena/balena-cloud-raspberrypi3-2.51.1+rev1-v11.4.10.img,–app,MyAppName] length=6
/lib64/libstdc++.so.6: version `CXXABI_1.3.9’ not found (required by /home/balena-cli/ext2fs/build/Release/bindings.node)

Error: /lib64/libstdc++.so.6: version `CXXABI_1.3.9’ not found (required by /home/balena-cli/ext2fs/build/Release/bindings.node)
at Object.Module._extensions…node (internal/modules/cjs/loader.js:805:18)
at Module.load (internal/modules/cjs/loader.js:651:32)
at tryModuleLoad (internal/modules/cjs/loader.js:591:12)
at Function.Module._load (internal/modules/cjs/loader.js:583:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at Module.require (pkg/prelude/bootstrap.js:1230:31)
at require (internal/modules/cjs/helpers.js:25:18)
at bindings (/snapshot/versioned-source/node_modules/bindings/bindings.js:112:48)
at Object. (/snapshot/versioned-source/node_modules/ext2fs/lib/ext2fs.js:3:37)
at Module._compile (pkg/prelude/bootstrap.js:1325:22)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:787:10)
at Module.load (internal/modules/cjs/loader.js:651:32)
at tryModuleLoad (internal/modules/cjs/loader.js:591:12)
at Function.Module._load (internal/modules/cjs/loader.js:583:3)
at Module.require (internal/modules/cjs/loader.js:690:17)
at Module.require (pkg/prelude/bootstrap.js:1230:31)

Any help is appreciated :slight_smile:

David

Hello, one of the modules required by balena-cli needs a more recent libstdc++ than the one shipped with CentOS7.4.
You can either:

  • update to CentOS8
  • install balena-cli from npm so ext2fs is built from source and linked against the version of libstdc++ you have. As root, run the following:
yum install git gcc-c++ make
curl -sL https://rpm.nodesource.com/setup_12.x | bash -
yum install nodejs
npm i -g --unsafe-perm balena-cli

Works like a charm, thank you!

Hi

Now I get another error when deploying:

[root@centos MyApp]# balena deploy MyApp --logs --source . --build --emulated --nocache --debug
[Debug] Parsing input…
[Debug] Loading project…
[Debug] Resolving project…
[Debug] docker-compose.yml file found at “/home/balena/MyApp”
[Debug] Creating project…
[Info] Building for armv7hf/raspberrypi3
[Build] Building services…
[Build] mqtt Preparing…
[Build] MyApp Preparing…
[Info] Emulation is enabled
[Debug] Found build tasks:
[Debug] mqtt: image pull [panuwitp/mosquitto-arm]
[Debug] MyApp: build [MyApp]
[Debug] Resolving services with [raspberrypi3|armv7hf]
[Debug] Found project types:
[Debug] mqtt: External image
[Debug] MyApp: Dockerfile.template
[Debug] Prepared tasks; building…
[Build] mqtt Trying to pull repository docker.io/panuwitp/mosquitto-arm
[Build] mqtt latest: Pulling from docker.io/panuwitp/mosquitto-arm
[Build] mqtt Digest: sha256:dce9b4c8aea385b438d00d6d13573c0fb5850121ac86ca3ccf1835a8e4546e53
[Build] mqtt Image is up to date for docker.io/panuwitp/mosquitto-arm:latest
[Build] MyApp Step 1/7 : FROM resin/raspberrypi3-openjdk:latest
[Build] MyApp —> 8158f31e85be
[Build] MyApp Step 2/7 : COPY .balena/qemu-execve /tmp/qemu-execve
[Build] MyApp —> 26c4b8a94697
[Build] MyApp Removing intermediate container 9bc7f913457b
[Build] MyApp Step 3/7 : WORKDIR /usr/src/app
[Build] MyApp —> c845f1954aa7
[Build] MyApp Removing intermediate container 0fa373e2b2b1
[Build] MyApp Step 4/7 : COPY . .
[Build] MyApp —> e63b741ddfdd
[Build] MyApp Removing intermediate container f79e6ee0d646
[Build] MyApp Step 5/7 : RUN cd /usr/src/app && sudo dpkg -i wiringpi-2.50-1.deb
[Build] MyApp —> Running in 866c5e146e26
[Build] MyApp Selecting previously unselected package wiringpi.
[Build] MyApp (Reading database … 15054 files and directories currently installed.)
[Build] MyApp Preparing to unpack wiringpi-2.50-1.deb …
[Build] MyApp Unpacking wiringpi (2.50) …
[Build] MyApp Setting up wiringpi (2.50) …
[Build] MyApp Processing triggers for libc-bin (2.19-18+deb8u10) …
[Build] MyApp —> 6db9deca6f62
[Build] MyApp Removing intermediate container 866c5e146e26
[Build] MyApp Step 6/7 : ENV INITSYSTEM “on”
[Build] MyApp —> Running in 40711e710342
[Build] MyApp —> 5844a9435f6a
[Build] MyApp Removing intermediate container 40711e710342
[Build] MyApp Step 7/7 : CMD java -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=9010 -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.rmi.port=9010 -Djava.rmi.server.hostname=10.0.3.17 -cp MyApp-1.0-SNAPSHOT-jar-with-dependencies.jar com.identiv.MyApp.MyAppEngine
[Build] MyApp —> Running in e3d0c674982b
[Build] MyApp —> 42b59328dbdb
[Build] MyApp Removing intermediate container e3d0c674982b
[Build] MyApp Successfully built 42b59328dbdb
[Build] mqtt Waiting…
[Build] MyApp Waiting…
[Build] Built 2 services in 0:09
[Info] Creating release…
[Error] Deploy failed

Error
Cannot GET /v6/user(2)

ObjectDoesNotExistError:

Error
Cannot GET /v6/user(2)
at wrapResponseError (/usr/lib/node_modules/balena-cli/node_modules/balena-release/build/models.js:50:19)
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async Promise.all (index 0)
at async Object.create (/usr/lib/node_modules/balena-cli/node_modules/balena-release/build/api.js:21:33)
at async exports.createRelease (/usr/lib/node_modules/balena-cli/build/utils/compose.js:378:40)
at async deployProject (/usr/lib/node_modules/balena-cli/build/utils/compose_ts.js:488:20)

From previous event:
at processImmediate (internal/timers.js:456:21)
From previous event:
at /usr/lib/node_modules/balena-cli/build/actions/deploy.js:50:14
at async Command.action (/usr/lib/node_modules/balena-cli/build/actions/deploy.js:177:9)

Here is my docker version:
Client:
Version: 1.13.1
API version: 1.26
Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64
Go version: go1.10.3
Git commit: 64e9980/1.13.1
Built: Wed Jul 1 14:56:42 2020
OS/Arch: linux/amd64

Server:
Version: 1.13.1
API version: 1.26 (minimum version 1.12)
Package version: docker-1.13.1-162.git64e9980.el7.centos.x86_64
Go version: go1.10.3
Git commit: 64e9980/1.13.1
Built: Wed Jul 1 14:56:42 2020
OS/Arch: linux/amd64
Experimental: false

docker-compose:
docker-compose version 1.24.0, build 0aa59064

balena version:
12.12.1

OS
CentOS 7.4

thanks
David

Hi

I managed to finish deploy by downloading balena-cli-v12.9.1-linux-x64-standalone.zip directly into /home/balena-cli/ and run balena deploy from there.

Still can’t see the device using “balena devices” although I can scan it.

Reporting scan results

host: 891853c.local
address: 10.0.3.17
dockerInfo:
Containers: 1
ContainersRunning: 1
ContainersPaused: 0
ContainersStopped: 0
Images: 2
Driver: aufs
SystemTime: 2020-08-06T04:08:46.370168545Z
KernelVersion: 4.19.75
OperatingSystem: balenaOS 2.51.1+rev1
Architecture: armv7l
dockerVersion:
Version: 19.03.13-dev
ApiVersion: 1.40

thanks
David

Hi David, could you see if you are getting any error logs on the device. You should be able to access the device with:

ssh root@891853c.local -p22222

and then you want to check the logs with journalctl -u resin-supervisor --no-pager

Hi Shaun

This is what I get from the device:

Aug 06 16:01:25 891853c resin-supervisor[8036]: [info] Supervisor v11.4.10 starting up…
Aug 06 16:01:25 891853c resin-supervisor[8036]: [debug] Starting event tracker
Aug 06 16:01:25 891853c resin-supervisor[8036]: [debug] Starting logging infrastructure
Aug 06 16:01:25 891853c resin-supervisor[8036]: [debug] Starting api binder
Aug 06 16:01:25 891853c resin-supervisor[8036]: [event] Event: Supervisor start {}
Aug 06 16:01:25 891853c resin-supervisor[8036]: [error] LogBackend: unexpected error: Error: self signed certificate in certificate chain
Aug 06 16:01:25 891853c resin-supervisor[8036]: [error] at TLSSocket.onConnectSecure (_tls_wrap.js:1474:34)
Aug 06 16:01:25 891853c resin-supervisor[8036]: [error] at TLSSocket.emit (events.js:310:20)
Aug 06 16:01:25 891853c resin-supervisor[8036]: [error] at TLSSocket._finishInit (_tls_wrap.js:917:8)
Aug 06 16:01:25 891853c resin-supervisor[8036]: [error] at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:687:12)
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Performing database cleanup for container log timestamps
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Previous engine snapshot was not stored. Skipping cleanup.
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Handling of local mode switch is completed
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Connectivity check enabled: true
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Starting periodic check for IP addresses
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Reporting initial state, supervisor version and API info
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] VPN status path exists.
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Waiting for connectivity…
Aug 06 16:01:26 891853c resin-supervisor[8036]: (node:1) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead.
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Attempting to load any preloaded applications
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Starting API server
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Applying target state
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Ensuring device is provisioned
Aug 06 16:01:26 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:01:26 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Supervisor API listening on allowed interfaces only
Aug 06 16:01:26 891853c resin-supervisor[8036]: [info] Supervisor API successfully started on port 48484
Aug 06 16:01:26 891853c resin-supervisor[8036]: [debug] Finished applying target state
Aug 06 16:01:26 891853c resin-supervisor[8036]: [success] Device state apply success
Aug 06 16:01:56 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:01:56 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:01:56 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:02:26 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:02:26 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:02:26 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:02:56 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:02:56 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:02:56 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:03:26 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:03:26 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:03:27 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:03:57 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:03:57 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:03:57 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:04:27 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}
Aug 06 16:04:27 891853c resin-supervisor[8036]: [info] New device detected. Provisioning…
Aug 06 16:04:27 891853c resin-supervisor[8036]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:04:57 891853c resin-supervisor[8036]: [event] Event: Device bootstrap {}

this continues for some time and eventually it ends like this:

Aug 06 16:00:41 891853c resin-supervisor[4423]: [debug] Attempting container log timestamp flush…
Aug 06 16:00:41 891853c resin-supervisor[4423]: [debug] Container log timestamp flush complete
Aug 06 16:00:43 891853c resin-supervisor[4423]: [error] Healthcheck failed
Aug 06 16:00:43 891853c resin-supervisor[4423]: [api] GET /v1/healthy 500 - 8.991 ms
Aug 06 16:00:46 891853c resin-supervisor[4423]: [event] Event: Device bootstrap {}
Aug 06 16:00:46 891853c resin-supervisor[4423]: [info] New device detected. Provisioning…
Aug 06 16:00:46 891853c resin-supervisor[4423]: [event] Event: Device bootstrap failed, retrying {“delay”:30000,“error”:{“message”:""}}
Aug 06 16:00:56 891853c systemd[1]: resin-supervisor.service: Main process exited, code=exited, status=137/n/a
Aug 06 16:00:56 891853c systemd[1]: resin-supervisor.service: Failed with result ‘exit-code’.
Aug 06 16:01:18 891853c resin-supervisor[7949]: resin_supervisor
Aug 06 16:01:18 891853c resin-supervisor[8035]: active
Aug 06 16:01:21 891853c resin-supervisor[8036]: Container config has not changed
Aug 06 16:01:22 891853c resin-supervisor[8036]: WARNING: ca-certificates.crt does not contain exactly one certificate or CRL: skipping
Aug 06 16:01:22 891853c resin-supervisor[8036]: Warning: Ignoring extra certs from /etc/ssl/certs/balenaRootCA.pem, load failed: error:02001002:system library:fopen:No such file or directory

thanks
David

Hi Shaun

Just give you an update: I tried a balena_2.38_rev1.img on the same server instead of the latest balena-cloud-raspberrypi3-2.51.1+rev1-dev-v11.4.10.img, the device showed up in the “devices” command. However, I get this error when I dig into device details:

./balena device f19dc2b --debug
[debug] new argv=[/home/balena-cli/balena,/snapshot/versioned-source/bin/balena,device,f19dc2b] length=4
BalenaRequestError: Request error: Internal Server Error

BalenaRequestError: Request error: Internal Server Error
at /snapshot/versioned-source/node_modules/balena-request/build/request.js:189:17
From previous event:
at /snapshot/versioned-source/node_modules/balena-request/build/request.js:181:62
From previous event:
at Object.module.exports.exports.send (/snapshot/versioned-source/node_modules/balena-request/build/request.js:180:8)
at /snapshot/versioned-source/node_modules/balena-pine/es2018/index.js:20:22
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:126:23)
From previous event:
at BalenaPine._request (/snapshot/versioned-source/node_modules/balena-pine/es2018/index.js:12:34)
at BalenaPine.request (/snapshot/versioned-source/node_modules/pinejs-client-core/es2018/index.js:952:29)
at BalenaPine.get (/snapshot/versioned-source/node_modules/pinejs-client-core/es2018/index.js:701:21)
at /snapshot/versioned-source/node_modules/balena-sdk/build/models/device.js:355:26
From previous event:
at Object.get (/snapshot/versioned-source/node_modules/balena-sdk/build/models/device.js:336:31)
at Object.addCallbackSupport [as get] (/snapshot/versioned-source/node_modules/balena-sdk/build/util/callbacks.js:19:27)
at DeviceCmd.run (/snapshot/versioned-source/build/actions-oclif/device/index.js:13:55)
at DeviceCmd._run (/snapshot/versioned-source/node_modules/@oclif/command/lib/command.js:44:31)
at process._tickCallback (internal/process/next_tick.js:68:7)

I also tried a 2.36.0+rev2 image, it doesn’t get detected by the server.

thanks
David

Hi, could you now try latest cli version (12.12.1) with the 2.38_rev1 image?

Hi floion

Here is what I did:

cd /usr/lib/node_modules/balena-cli/bin/
./balena devices

then I get:
ID UUID DEVICE NAME DEVICE TYPE APPLICATION NAME STATUS IS ONLINE SUPERVISOR VERSION OS VERSION DASHBOARD URL
3 1424b6e floral-water raspberrypi3 MyApp Idle true 9.15.7 balenaOS 2.38.0+rev1 https://dashboard.MyApp.com/devices/1424b6eb74bba16506d0b10f4ff7a9bb/summary

when I issue the “./balena device 1424b6e”, I get the same error as above.

something wrong with my installation perhaps?

BTW, my balena version is 12.12.1 which is installed from npm. The standalone one that I copied is 12.9.1.

My 2.38 IMG is a production image, so I can’t find you any logs via SSH.

thanks
David

I just got some input from a colleague: “The advice at the moment to openBalena users would be to downgrade the CLI to v12.2.2.”

“The fundamental problem is that openBalena hasn’t been updated for compatibility with balena SDK v14, which the balena CLI is now using”

See some related issues: https://github.com/balena-io/balena-cli/issues/1970 and https://github.com/balena-io/open-balena-api/issues/338

Hi floion

Thanks for the update!

I did a “npm i -g --production --unsafe-perm balena-cli@12.2.2” to downgrade it to 12.2.2. I tried the whole process again with Dev IMG 2.53 and no success. Is there a way that I can download older BalenaOS images?

thanks
David

Here it is: https://github.com/balena-io/balena-cli/releases/download/v12.2.2/balena-cli-v12.2.2-linux-x64-standalone.zip

Hi floion

Do I need to stick with 2.38 IMG? I tried 12.2.2 with the latest 2.53 IMG with no success.

If this is the case, are there any BalenaOS archive links?

thanks
David

Oh sorry, you meant for the OS images. This should be it https://api.balena-cloud.com/download?deviceType=raspberrypi3&version=2.38.0+rev1.prod&fileType=.zip

Let me check if there is a known issue with the latest image. But in the meantime you can use that link to download the old OS

Yea it will be helpful to be able to find older OS’s. I only have 2.36 Prod, 2.36 Dev and 2.38 Prod in my collection :slight_smile:

thanks
DL

You can see what older release are available by parsing https://files.balena-cloud.com/ . And once you see what versions were deployed for the board you can then just modify the link https://api.balena-cloud.com/download?deviceType=raspberrypi3&version=2.38.0+rev1.prod&fileType=.zip with the desired version.

sorry, not sure where or how to look. There are dates in the XML tags but I can’t associate them with version numbers…

<Key>

esr-images/beaglebone-black/2019.10.1.dev/image/balena.img.zip

</Key>

<LastModified>2019-12-09T11:28:25.000Z</LastModified>

<ETag>"4d0fe546640e4228043f7296bd432779"</ETag>

<Size>254816023</Size>

<StorageClass>INTELLIGENT_TIERING</StorageClass>

</Contents>

For the example you picked, “esr-images/beaglebone-black/2019.10.1.dev” the version is 2019.10.1. But that is special, as it’s ESR, https://www.balena.io/blog/balenaos-esr-peace-of-mind-with-only-two-updates-a-year/. But you would parse for non-esr in the same way