Hello. I’m new to the community and a bit of a noob with using Balena, but followed the guide and got the stack installed, but when I tried to access the webpage (IP address is reserved in my router) it wouldn’t load due to ‘too many redirects’.
I’d like to try and create a ‘on premise’ private solution with gateway incorporated.
Hi, no I didn’t unfortunately. I figured I’d screwed something up so decided to try and start again.
I followed this guide the-things-stack-basicstation-balena trying to build it manually and push to the fleet. I did this part, modified the docker-compose.yml file and uncomment the BasicStation service
cd ~/workspace
git clone https://github.com/xoseperez/balena-tts-lns.git
cd balena-tts-lns
git submodule update --init
@mpous. OK so I tried again using the same commands as in your post and it still fails with same issue.
I can see there is some kind of permission error in the log (below)
[Info] Dashboard link: https://dashboard.balena-cloud.com/apps/1927116/devices
[Info] Building on arm05
[stack] Step 1/15 : FROM thethingsnetwork/lorawan-stack:3.13.1-armv7
[basicstation] Step 1/11 : FROM balenalib/raspberrypi3-debian:buster-build as builder
[basicstation] ---> cfc0b6ef90b5
[basicstation] Step 2/11 : WORKDIR /usr/src/app
[basicstation] ---> Running in 1a866328aad0
[basicstation] Removing intermediate container 1a866328aad0
[basicstation] ---> 6bb024025656
[basicstation] Step 3/11 : COPY . .
[basicstation] ---> e67ad08f37af
[basicstation] Step 4/11 : RUN make platform=rpi variant=std arch=armv7hf
[basicstation] ---> Running in 0834d8e0812f
[basicstation] Here are a few details about this Docker image (For more information please visit https://www.balena.io/docs/reference/base-images/base-images/):
[basicstation] Architecture: ARM v7
[basicstation] OS: Debian Buster
[basicstation] Variant: build variant
[basicstation] Default variable(s): UDEV=off
[basicstation] Extra features:
[basicstation] - Easy way to install packages with `install_packages <package-name>` command
[basicstation] - Run anywhere with cross-build feature (for ARM only)
[basicstation] - Keep the container idling with `balena-idle` command
[basicstation] - Show base image details with `balena-info` command
[basicstation] mkdir -p build-local/bin
[basicstation] gcc -std=gnu11 -Isrc -DCFG_prog_crc32 src/crc32.c -o build-local/bin/crc32
[basicstation] mkdir -p build-local/bin
[basicstation] gcc -std=gnu11 -Isrc -DCFG_prog_genkwcrcs src/genkwcrcs.c -o build-local/bin/genkwcrcs
[basicstation] build-local/bin/genkwcrcs $(cat src/kwlist.txt | sed -e '/^#/d;s/[ \t]\+#.*//') > build-local/temp-kwcrc.h
[basicstation] mv build-local/temp-kwcrc.h src/kwcrc.h
[basicstation] platform=rpi variant=std make -C deps/mbedtls
[basicstation] make[1]: Entering directory '/usr/src/app/deps/mbedtls'
[basicstation] platform=rpi variant=std ./prep.sh
[basicstation] /bin/sh: 1: ./prep.sh: Permission denied
[basicstation]
[basicstation] make[1]: *** [makefile:55: platform-rpi] Error 126
[basicstation]
[basicstation] make[1]: Leaving directory '/usr/src/app/deps/mbedtls'
[basicstation] make: *** [makefile:67: deps/mbedtls] Error 2
[basicstation]
[basicstation] Removing intermediate container 0834d8e0812f
[basicstation] The command '/bin/sh -c make platform=rpi variant=std arch=armv7hf' returned a non-zero code: 2
[stack] ---> 234149665977
[stack] Step 2/15 : USER root:root
[stack] ---> Running in 7cd47e1b605d
[stack] Removing intermediate container 7cd47e1b605d
and then at the end of the log I get
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: basicstation
[Error] Error: The command '/bin/sh -c make platform=rpi variant=std arch=armv7hf' returned a non-zero code: 2
[Info] Built on arm05
[Error] Not deploying release.
Remote build failed
Hi @rojasyal
Not 100% sure if it’s related but there was a typo in the last docker-compose.yml file that was pushing the amd64 image regardless of the platform…
I have fixed it in the new image. Can you please update the release (or redeploy) and test?
Thank you!
Hi
Most probably you have not set the TTS_DOMAIN variable correctly. It must have the IP of the device (mind it should be static) or a domain name pointing to it.