Influxdb fails to build while pushing balena-sense-master project to raspberrypi 2

Hi guys, i am quite a noob when it comes to this kind of programming…
But i want to give it a try to ask for help, otherwise i have to give up because i am struggling for days allready.

My setup: Raspberry pi 2 model B V1.1, with connected BME680 sensor.
I am working on a windows machine, and am using the standard windows CMD.exe command prompt…

i have been following the website steps:

i got stuck at step 3; for pushing the balena-sense-master to the device.
When i push the software i got the error “Some services failed to build: Service: influxdb”
“Error: The command ‘/bin/sh -c sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb/influxdb.conf’ returned a non-zero code: 1”

what i have tried for now:
within the balena-sense-master project code folder there is another folder with the name “influxdb”, within this folder there are two documents “Dockerfile.aarch64” and “Dockerfile.template”.

  • i have tried to run “balena push -application name- --nocache”
  • i have tried to change “RUN sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb/influxdb.conf” to “RUN sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb.conf”.
  • i have tried to change “FROM balenalib/raspberrypi3-alpine” to “FROM balenalib/raspberrypi2-alpine”
  • i have tried to change “CMD [“influxd”]” to “CMD [“influxdb”]”
  • i have tried to search within my raspberry pi 2 for the “influxdb.conf” file by logging in to an HOST OS (via the Balena cloud) online terminal. it seems to be that also i can not find this config file for influxdb… but i am a noob so maybe at this point, these file does not suppose to be there yet?!

Please help me with this, i would like to get this project working…

Logging code after i push the software:
[Info] Starting build for AQ_Monitor_V1, user **********
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1570376/devices
[Info] Building on arm03
[Info] Pulling previous images for caching purposes…
[Success] Successfully pulled cache images
[influxdb] Step 1/4 : FROM balenalib/raspberry-pi2-alpine
[telegraf] Step 1/8 : FROM balenalib/raspberry-pi2:buster
[sensor] Step 1/18 : FROM balenalib/raspberry-pi2-python:3-build
[grafana] Step 1/9 : FROM balenalib/raspberry-pi2:buster
[telegraf] —> 912f56bad60b
[telegraf] Step 2/8 : COPY ./.sh /usr/src/app/
[influxdb] —> 9efd08105586
[influxdb] Step 2/4 : RUN apk add influxdb
[sensor] —> e8d7752240b1
[sensor] Step 2/18 : ARG BSEC_FILENAME=BSEC_1.4.7.4_Generic_Release.zip
[grafana] —> 912f56bad60b
[grafana] Step 2/9 : COPY ./grafana.ini /usr/share/grafana/conf/custom.ini
[influxdb] —> Running in eebe620c9a96
[sensor] —> Running in 475dfefa2ed7
[sensor] Removing intermediate container 475dfefa2ed7
[sensor] —> ffc880556a44
[sensor] Step 3/18 : RUN install_packages unzip
[grafana] —> 03a65f6ff3c0
[grafana] Step 3/9 : COPY ./provisioning /usr/src/app/provisioning
[telegraf] —> 939e399c8395
[telegraf] Step 3/8 : RUN chmod +x /usr/src/app/
.sh
[sensor] —> Running in 1da12e213c5c
[telegraf] —> Running in a8d09a50715d
[influxdb] fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/main/armv7/APKINDEX.tar.gz
[influxdb] fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/armv7/APKINDEX.tar.gz
[grafana] —> 64f586b0262c
[grafana] Step 4/9 : COPY ./.sh /usr/src/app/
[influxdb] (1/1) Installing influxdb (1.7.7-r0)
[influxdb] Executing influxdb-1.7.7-r0.pre-install
[influxdb] Executing busybox-1.31.1-r9.trigger
[influxdb] OK: 201 MiB in 74 packages
[grafana] —> 924e4f24aa60
[grafana] Step 5/9 : RUN chmod +x /usr/src/app/
.sh
[grafana] —> Running in 46c9bfbd4e1e
[telegraf] Removing intermediate container a8d09a50715d
[telegraf] —> 6f4349849537
[telegraf] Step 4/8 : RUN install_packages wget
[telegraf] —> Running in dcdeb3739ff8
[influxdb] Removing intermediate container eebe620c9a96
[influxdb] —> 5c6b539474c9
[influxdb] Step 3/4 : RUN sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb/influxdb.conf
[influxdb] —> Running in 41ef11bad15e
[grafana] Removing intermediate container 46c9bfbd4e1e
[grafana] —> 6ec2c297c5d5
[grafana] Step 6/9 : RUN install_packages fontconfig-config fonts-dejavu-core libfontconfig1 ucf jq wget
[grafana] —> Running in c9e7897d7fe5
[influxdb] sed: /etc/influxdb/influxdb.conf: No such file or directory
[influxdb]
[influxdb] Removing intermediate container 41ef11bad15e
[influxdb] The command ‘/bin/sh -c sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb/influxdb.conf’ returned a non-zero code: 1

and the logging ends by:
[Error] Some services failed to build:
[Error] Service: influxdb
[Error] Error: The command ‘/bin/sh -c sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/influxdb/influxdb.conf’ returned a non-zero code: 1
[Info] Built on arm03
[Error] Not deploying release.

Hello Ben, I am sorry to hear about the trouble you are having deploying balenaSense. I attempted to build this project myself just now, and it seemed to work properly, although admittedly my build environment is slightly different than yours. I was using an Ubuntu Linux machine, and a Raspberry Pi 3 target device.

However, with that said, can you try undoing any changes you have made to your local copy of balenaSense, and start with a freshly cloned project from GitHub? I do realize that you are using a RaspPi2, and the Dockerfile that is downloaded from GitHub specifically identifies a container name that includes Raspberry Pi 3, but both of those devices share a similar processor, so I’d like to see if you are successful when trying a fresh, unaltered copy of the project. Let us know how that goes, thanks!

1 Like

Hi David, thank you for your reply. i just downloaded a fresh copy of the project from Github, and it seems to be the error’s are now different…

first error messages i see, are the following:
[sensor] 91mGnuTLS: Error in the pull function.
[sensor]91mUnable to establish SSL connection.
[Success]39m Successfully uploaded images
[Error]39m Some services failed to build:
[Error]39m Service: sensor
[Error]39m Error: The command ‘/bin/sh -c wget https://ae-bst.resource.bosch.com/media/_tech/media/bsec/$BSEC_FILENAME’ returned a non-zero code: 4
[Info]39m Built on arm03
[Error]39m Not deploying release.

[sensor] debconf: delaying package configuration, since apt-utils is not installed
[sensor] WARNING: You are using pip version 19.3.1; however, version 20.0.2 is available.

at the end:
[sensor] Removing intermediate container aef10f0cd692
[sensor] —> 65b57390ebf3
[sensor] Successfully built 65b57390ebf3
[Info] Uploading images
[Error] An error occured: (HTTP code 404) no such image - no such image: arm32v6/eclipse-mosquitto:latest: No such image: arm32v6/eclipse-mosquitto:latest
[Info] Built on arm03
[Error] Not deploying release.
[======================> ] 44%Remote build failed

(node:14752) [DEP0066] DeprecationWarning: OutgoingMessage.prototype._headers is deprecated

The build log of balena-cloud is showing the following:
[Info] Building on arm03
[Info] Pulling previous images for caching purposes…
[Success] Successfully pulled cache images
[Info] Starting to build influxdb
[Info] Starting to build sensor
[Info] Starting to build grafana
[Info] Starting to build telegraf
[Success] Successfully built service influxdb
[Success] Successfully built service telegraf
[Success] Successfully built service grafana
[Success] Successfully built service sensor
[Info] Uploading images
[Error] An error occured: (HTTP code 404) no such image - no such image: arm32v6/eclipse-mosquitto:latest: No such image: arm32v6/eclipse-mosquitto:latest

Allready while writing an Update:

after 3 attempts, pushing the code; now it worked surprisingly…
1st time i tried: balena push project --nocache (there was to much CMD output that the first output got overwritten, so i was not able to lookup the first error info)
2nd time i tried: balena push project --nocache > C:\Users\Projects\OUTPUT.txt | type C:\Users\Projects\OUTPUT.txt
3rd time i tried to update pip, based on the warning messages;
pip install --upgrade pip
python -m pip install -U pip
balena push project --nocache

during the final push, i tried to scroll back to the first messages and with this it seemd to be that the push got delaid by doing this… i scrolled back a few times.

at the end i got the succedeed message!
now it works at the moment.
i hope i can repeat this step the next time.

thanks for the help for now!!

Hello @bendonders, glad you got it working. Just for future reference, it looks like you were experiencing an issue where your project gets converted to Windows line endings when using Git on Windows. You can instead download the zip file and once expanded, push those files, or see more options in the comments of this thread: piHole webinterface not reachable

1 Like

Hi Alan, thanks for your respond and your additional advice for the future… that was also the question that i had left… so thanks a lot for the support!

Hi @bennos, just a quick note that we merged the fix to balena-cli addressing the line ending conversion on Windows: https://github.com/balena-io/balena-cli/pull/1583

Thanks for reporting it.

Cheers…

1 Like

Thank you very much, my compliments for the outstanding support quality! :pray:t3::grin: