No data in BalenaSense

Hi, I’ve got BalenaSense up and running but no data is being logged.

I see these errors:
[sensor] 25.06.19 14:06:27 (+0100) sensor /bin/sh: 1: ./entry.sh: Permission denied
[telegraf] 25.06.19 14:06:30 (+0100) telegraf 2019-06-25T13:06:20Z E! [inputs.http]: Error in plugin: [url=http://sensor]: Get http://sensor: dial tcp: lookup sensor on 127.0.0.11:53: no such host

Any help much appreciated.

Hey there @PiMunch

I’ve just pushed an update to the balena-sense repo which should resolve this issue and takes it to v1.5.3. Can you download the latest code and give it another try? Let us know how you get on.

If it now works I’d be interested to know what OS you’re working from, and if you’re using the balena CLI or Git deployment method?

Thanks!

Hi, I’m using Win7 for the CLI. I cloned the latest github repo but got some errors when doing the push. See end of listing below. I’ve had to edit the listing to remove some URLs as I was unable to post with them in.

C:\Downloads\balena-sense>balena push balenaSense
[Info] Starting build for balenaSense, user gh_pimunch
[Info] Dashboard link: dashboard.balena-cloud[DOT]com/apps/1482147/devices
[Info] Building on arm03
[Info] Pulling previous images for caching purposes…
[Success] Successfully pulled cache images
[sensor] Step 1/16 : FROM balenalib/raspberrypi3-python:3-build
[grafana] Step 1/8 : FROM balenalib/raspberrypi3
[influxdb] Step 1/4 : FROM balenalib/raspberrypi3-alpine
[telegraf] Step 1/7 : FROM balenalib/raspberrypi3
[sensor] —> 7c4cdcf6e289
[sensor] Step 2/16 : ARG BSEC_FILENAME=BSEC_1.4.7.3_Generic_Release_20190410.zip
[sensor] Using cache
[sensor] —> df2374bcca26
[sensor] Step 3/16 : RUN install_packages unzip
[telegraf] —> 84bc121815d6
[telegraf] Step 2/7 : RUN curl -o /tmp/telegraf.deb dl.influxdata[DOT]com/telegraf/releases/telegraf_1.11.0-1_armhf.deb
[sensor] Using cache
[sensor] —> 0ce1a8b16ac5
[sensor] Step 4/16 : WORKDIR /usr/src/app
[influxdb] —> a295eba83a74
[influxdb] Step 2/4 : RUN apk add influxdb
[telegraf] Using cache
[telegraf] —> f2d35c1cc206
[telegraf] Step 3/7 : RUN dpkg -i /tmp/telegraf.deb && rm /tmp/telegraf.deb
[grafana] —> 84bc121815d6
[grafana] Step 2/8 : COPY ./grafana.ini /usr/share/grafana/conf/custom.ini
[sensor] Using cache
[sensor] —> bfeb88f9a59f
[sensor] Step 5/16 : RUN git clone github[DOT]com/balena-io-playground/bsec_bme680_linux.git
[influxdb] Using cache
[influxdb] —> 4ddebdeab48a
[influxdb] Step 3/4 : RUN sed -i ‘s|/var/lib/influxdb|/data/influxdb|g’ /etc/in
fluxdb/influxdb.conf
[influxdb] Using cache
[influxdb] —> 47dfc34cbb1e
[influxdb] Step 4/4 : CMD influxd
[telegraf] Using cache
[telegraf] —> 5d54ce981444
[telegraf] Step 4/7 : COPY telegraf.conf /etc/telegraf/telegraf.conf
[sensor] Using cache
[sensor] —> c6948f89def0
[sensor] Step 6/16 : RUN wget ://ae-bst.resource.bosch[DOT]com/media/_tech/media/bsec/$BSEC_FILENAME
[influxdb] Using cache
[influxdb] —> f3dafa111922
[influxdb] Successfully built f3dafa111922
[sensor] Using cache
[sensor] —> d98f8645b75b
[sensor] Step 7/16 : RUN unzip -d bsec_bme680_linux/src $BSEC_FILENAME
[sensor] Using cache
[sensor] —> 5d4ce4ba64f0
[sensor] Step 8/16 : WORKDIR /usr/src/app/bsec_bme680_linux
[sensor] Using cache
[sensor] —> d05fc5a79606
[sensor] Step 9/16 : RUN chmod +x make.sh
[sensor] Using cache
[sensor] —> 4df6f5790679
[sensor] Step 10/16 : RUN ./make.sh
[sensor] Using cache
[sensor] —> f7cb8582e0e4
[sensor] Step 11/16 : RUN pip install smbus
[sensor] Using cache
[sensor] —> f46818902b71
[sensor] Step 12/16 : WORKDIR /usr/src/app
[sensor] Using cache
[sensor] —> a3220df4e748
[sensor] Step 13/16 : COPY ./scripts ./scripts
[grafana] —> a16b148032f4
[grafana] Removing intermediate container dfb3b6a13a0f
[grafana] Step 3/8 : COPY ./provisioning /usr/src/app/provisioning
[telegraf] —> 3e2c54d22af4
[telegraf] Removing intermediate container a79ec6f29b3f
[telegraf] Step 5/7 : COPY entry.sh /entry.sh
[sensor] —> 3bd2e76dcd88
[sensor] Removing intermediate container 6449f3542c3e
[sensor] Step 14/16 : COPY ./entry.sh /usr/src/app/
[grafana] —> a9888e5fdba7
[grafana] Removing intermediate container 22ddb60d2f56
[grafana] Step 4/8 : COPY ./*.sh /usr/src/app/
[telegraf] —> d4684a07cf78
[telegraf] Removing intermediate container 0e495b93aa2d
[telegraf] Step 6/7 : RUN chmod +x /entry.sh
[sensor] —> 58f76ee6c206
[sensor] Removing intermediate container b530d490b581
[sensor] Step 15/16 : RUN chmod +x /usr/src/app/entry.sh
[telegraf] —> Running in 013d6957a334
[sensor] —> Running in cd7356cc4b25
[grafana] —> e41acd7258cd
[grafana] Removing intermediate container 39c78119ae87
[grafana] Step 5/8 : RUN install_packages fontconfig-config fonts-
dejavu-core libfontconfig1 ucf jq
[grafana] —> Running in 6801d72d0aca
[telegraf] —> b47123deff60
[sensor] —> 0a3487593ffd
[telegraf] Removing intermediate container 013d6957a334
[telegraf] Step 7/7 : CMD /entry.sh
[sensor] Removing intermediate container cd7356cc4b25
[sensor] Step 16/16 : CMD ./entry.sh
[telegraf] —> Running in 180f2d51624a
[sensor] —> Running in 07329bae7d68
[telegraf] —> ce54d7edf737
[telegraf] Removing intermediate container 180f2d51624a
[telegraf] Successfully built ce54d7edf737
[sensor] —> 839750693132
[sensor] Removing intermediate container 07329bae7d68
[sensor] Successfully built 839750693132
[grafana] Reading package lists…
[grafana] Building dependency tree…
[grafana] Reading state information…
[grafana] The following additional packages will be installed:
[grafana] libexpat1 libfreetype6 libjq1 libonig4 libpng16-16
[grafana] The following NEW packages will be installed:
[grafana] fontconfig-config fonts-dejavu-core jq libexpat1 libfontconfig1 libfreetype6
[grafana] libjq1 libonig4 libpng16-16 ucf
[grafana] 0 upgraded, 10 newly installed, 0 to remove and 9 not upgraded.
[grafana] Need to get 2750 kB of archives.
[grafana] After this operation, 6127 kB of additional disk space will be used.

[grafana] Get:1 deb.debian[DOT]org/debian stretch/main armhf ucf all 3.0036
[70.2 kB]
[grafana] Get:2 security.debian[DOT]org/debian-security stretch/updates/main armhf libpng16-16 armhf 1.6.28-1+deb9u1 [265 kB]
[grafana] Get:3 deb.debian[DOT]org/debian stretch/main armhf fonts-dejavu-core all 2.37-1 [1068 kB]
[grafana] Get:4 deb.debian[DOT]org/debian stretch/main armhf fontconfig-config all 2.11.0-6.7 [271 kB]
[grafana] Get:5 deb.debian[DOT]org/debian stretch/main armhf libonig4 armhf 6.1.3-2 [128 kB]
[grafana] Get:6 deb.debian[DOT]org/debian stretch/main armhf libjq1 armhf 1.5+dfsg-1.3 [122 kB]
[grafana] Get:7 deb.debian[DOT]org/debian stretch/main armhf jq armhf 1.5+dfsg-1.3 [59.2 kB]
[grafana] Get:8 deb.debian[DOT]org/debian stretch/main armhf libexpat1 armhf 2.2.0-2+deb9u1 [64.4 kB]
[grafana] Get:9 deb.debian[DOT]org/debian stretch/main armhf libfreetype6 armhf 2.6.3-3.2 [388 kB]
[grafana] Get:10 deb.debian[DOT]org/debian stretch/main armhf libfontconfig1 armhf 2.11.0-6.7+b1 [314 kB]
[grafana] debconf: delaying package configuration, since apt-utils is not installed
[grafana]
[grafana] Fetched 2750 kB in 0s (16.1 MB/s)
[grafana] Selecting previously unselected package ucf.
[grafana] (Reading database …
(Reading database … 75%base … 5%
[grafana] (Reading database … 80%
[grafana] (Reading database … 85%
[grafana] (Reading database … 90%
[grafana] (Reading database … 95%
(Reading database … 9770 files and directories currently installed.)
[grafana] Preparing to unpack …/0-ucf_3.0036_all.deb …
[grafana] Moving old data out of the way
[grafana] Unpacking ucf (3.0036) …
[grafana] Selecting previously unselected package fonts-dejavu-core.
[grafana] Preparing to unpack …/1-fonts-dejavu-core_2.37-1_all.deb …
[grafana] Unpacking fonts-dejavu-core (2.37-1) …
[grafana] Selecting previously unselected package fontconfig-config.
[grafana] Preparing to unpack …/2-fontconfig-config_2.11.0-6.7_all.deb …
[grafana] Unpacking fontconfig-config (2.11.0-6.7) …
[grafana] Selecting previously unselected package libonig4:armhf.
[grafana] Preparing to unpack …/3-libonig4_6.1.3-2_armhf.deb …
[grafana] Unpacking libonig4:armhf (6.1.3-2) …
[grafana] Selecting previously unselected package libjq1:armhf.
[grafana] Preparing to unpack …/4-libjq1_1.5+dfsg-1.3_armhf.deb …
[grafana] Unpacking libjq1:armhf (1.5+dfsg-1.3) …
[grafana] Selecting previously unselected package jq.
[grafana] Preparing to unpack …/5-jq_1.5+dfsg-1.3_armhf.deb …
[grafana] Unpacking jq (1.5+dfsg-1.3) …
[grafana] Selecting previously unselected package libexpat1:armhf.
[grafana] Preparing to unpack …/6-libexpat1_2.2.0-2+deb9u1_armhf.deb …
[grafana] Unpacking libexpat1:armhf (2.2.0-2+deb9u1) …
[grafana] Selecting previously unselected package libpng16-16:armhf.
[grafana] Preparing to unpack …/7-libpng16-16_1.6.28-1+deb9u1_armhf.deb …
[grafana] Unpacking libpng16-16:armhf (1.6.28-1+deb9u1) …
[grafana] Selecting previously unselected package libfreetype6:armhf.
[grafana] Preparing to unpack …/8-libfreetype6_2.6.3-3.2_armhf.deb …
[grafana] Unpacking libfreetype6:armhf (2.6.3-3.2) …
[grafana] Selecting previously unselected package libfontconfig1:armhf.
[grafana] Preparing to unpack …/9-libfontconfig1_2.11.0-6.7+b1_armhf.deb …

[grafana] Unpacking libfontconfig1:armhf (2.11.0-6.7+b1) …
[grafana] Setting up libexpat1:armhf (2.2.0-2+deb9u1) …
[grafana] Setting up libpng16-16:armhf (1.6.28-1+deb9u1) …
[grafana] Setting up fonts-dejavu-core (2.37-1) …
[grafana] Setting up libonig4:armhf (6.1.3-2) …
[grafana] Setting up ucf (3.0036) …
[grafana] Setting up libfreetype6:armhf (2.6.3-3.2) …
[grafana] Setting up libjq1:armhf (1.5+dfsg-1.3) …
[grafana] Processing triggers for libc-bin (2.24-11+deb9u4) …
[grafana] Setting up jq (1.5+dfsg-1.3) …
[grafana] Setting up fontconfig-config (2.11.0-6.7) …
[grafana] Setting up libfontconfig1:armhf (2.11.0-6.7+b1) …
[grafana] Processing triggers for libc-bin (2.24-11+deb9u4) …
[grafana] —> 1c98b2e92356
[grafana] Removing intermediate container 6801d72d0aca
[grafana] Step 6/8 : RUN chmod +x /usr/src/app/download.sh && /usr/src/app/download.sh “raspberrypi3”
[grafana] —> Running in 90c185c60fea
[grafana] /bin/sh: 1: /usr/src/app/download.sh: not found
[grafana]
[grafana] Removing intermediate container 90c185c60fea
[Info] Uploading images
[grafana] The command ‘/bin/sh -c chmod +x /usr/src/app/download.sh && /usr/sr
c/app/download.sh “raspberrypi3”’ returned a non-zero code: 127
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: grafana
[Error] Error: The command ‘/bin/sh -c chmod +x /usr/src/app/download.sh
&& /usr/src/app/download.sh “raspberrypi3”’ returned a non-zero code: 127
[Error] Service: undefined
[Error] Error: Information not available
[Error] Service: undefined
[Error] Error: Information not available
[Error] Not deploying release.
Remote build failed

Hi @chrisys

Also noticed these logged errors:

25.06.19 21:45:57 (+0100) grafana EROR[06-25|20:45:57] Can’t read alert notification provisioning files from directory logger=provisioning.notifiers path=/usr/src/app/provisioning/notifiers error=“open /usr/src/app/provisioning/notifiers: no such file or directory”

25.06.19 21:45:56 (+0100) sensor /bin/sh: 1: ./entry.sh: Permission denied

25.06.19 21:46:01 (+0100) telegraf 2019-06-25T20:46:01Z E! [inputs.http]: Error in plugin: [url=http://sensor]: Get http://sensor: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
25.06.19 21:46:10 (+0100) telegraf 2019-06-25T20:46:10Z E! [inputs.http]: Error in plugin: [url=http://sensor]: Get http://sensor: dial tcp 172.17.0.2:80: connect: connection refused
25.06.19 21:46:21 (+0100) telegraf 2019-06-25T20:46:21Z E! [inputs.http]: Error in plugin: [url=http://sensor]: Get http://sensor: net/http: request canceled while waiting for connection (Client.Timeout exceeded while awaiting headers)
25.06.19 21:46:40 (+0100) telegraf 2019-06-25T20:46:40Z E! [inputs.http]: Error in plugin: [url=http://sensor]: Get http://sensor: dial tcp: lookup sensor on 127.0.0.11:53: no such host

@PiMunch thanks for posting the errors! This is weird, I can see from the first log you’ve got the latest code OK. The second post you’ve made is showing the same error message from earlier because it’s still running the old version of the code before the fix.

You mentioned that you’re running Windows and are using Git to clone the repo and balena-cli to push. I’ve seen vague error messages like this before where line endings were the problem. Take a look at my post in another thread here and see if it helps: piHole webinterface not reachable

We also have an open issue here which we can attach this thread to if it does turn out to be the problem: https://github.com/balena-io/balena-cli/issues/1273

Hi @chrisys,

That’s got it! I changed my github settings [git config --global core.autocrlf false] and re-did the push. All working fine now. Many thanks.

I should also mention that I re-did the git clone after changing the settings, then re-did the push.

Hi,

Nice catch and thank you for the update!

Hi,

Also, I want to inform you that we have 2 github issues for the Balena CLI, that track the problems you encountered:


Regards!