Screenly OSE on Balenacloud

I have followed the instructions in https://www.balena.io/blog/deploy-a-digital-signage-application-with-screenly-and-resin/ to install screenly on Raspberry PI 3.
When I push the screenly ose to my balena cloud account, I get the following error -

kirthi@AGMLT001:~/screenly/screenly-ose$ git push balena master
Counting objects: 7202, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2842/2842), done.
Writing objects: 100% (7202/7202), 3.79 MiB | 1.60 MiB/s, done.
Total 7202 (delta 4176), reused 7200 (delta 4176)
remote: Resolving deltas: 100% (4176/4176), done.

[Info]     Starting build for screenly, user gh_kirthiss
[Info]     Dashboard link: https://dashboard.balena-cloud.com/apps/1416023/devices
[Info]     Building on arm03
[Info]     Pulling previous images for caching purposes...
[Success]  Successfully pulled cache images
[main]     Step 1/27 : FROM resin/raspberrypi3-debian
[main]      ---> 88ed09f4b4bf
[main]     Step 2/27 : MAINTAINER Anton Molodykh <amolodykh@screenly.io>
[main]     Using cache
[main]      ---> 00da0aee8158
[main]     Step 3/27 : RUN apt-get update &&     apt-get -y install         build-essential         curl         git-core         libffi-dev         libssl-dev         matchbox         net-tools         nginx-light         omxplayer         psmisc         python-dev         python-imaging         python-netifaces         python-simplejson         libraspberrypi0         ifupdown         sqlite3         uzbl         x11-xserver-utils         xserver-xorg &&     apt-get clean
[main]      ---> Running in fc4627cdb2df
[main]     Get:1 http://archive.raspberrypi.org jessie InRelease [22.9 kB]
[main]     Get:2 http://archive.raspbian.org jessie InRelease [15.0 kB]
[main]     Ign http://deb.debian.org jessie InRelease
[main]     Ign http://deb.debian.org jessie-updates InRelease
[main]     Get:3 http://deb.debian.org jessie Release.gpg [2420 B]
[main]     Ign http://deb.debian.org jessie-updates Release.gpg
[main]     Get:4 http://security.debian.org jessie/updates InRelease [44.9 kB]
[main]     Get:5 http://deb.debian.org jessie Release [148 kB]
[main]     Ign http://deb.debian.org jessie-updates Release
[main]     Err http://deb.debian.org jessie-updates/main armhf Packages
[main]     Err http://deb.debian.org jessie-updates/main armhf Packages
[main]     Err http://deb.debian.org jessie-updates/main armhf Packages
[main]     Err http://deb.debian.org jessie-updates/main armhf Packages
[main]     Err http://deb.debian.org jessie-updates/main armhf Packages
[main]       404  Not Found
[main]     Get:6 http://archive.raspbian.org jessie/main armhf Packages [13.3 MB]
[main]     Get:7 http://archive.raspbian.org jessie/contrib armhf Packages [49.5 kB]
[main]     Get:8 http://archive.raspberrypi.org jessie/main armhf Packages [170 kB]
[main]     Get:9 http://archive.raspbian.org jessie/non-free armhf Packages [106 kB]
[main]     Get:10 http://archive.raspbian.org jessie/rpi armhf Packages [1297 B]
[main]     Get:11 http://archive.raspbian.org jessie/firmware armhf Packages [1208 B]
[main]     Get:12 http://deb.debian.org jessie/main armhf Packages [8898 kB]
[main]     Get:13 http://security.debian.org jessie/updates/main armhf Packages [795 kB]
[main]     Fetched 23.6 MB in 13s (1760 kB/s)
[main]     W: Failed to fetch http://deb.debian.org/debian/dists/jessie-updates/main/binary-armhf/Packages  404  Not Found
[main]     E: Some index files failed to download. They have been ignored, or old ones used instead.
[main]     
[main]     Removing intermediate container fc4627cdb2df
[Info]     Uploading images
[main]     The command '/bin/sh -c apt-get update &&     apt-get -y install         build-essential         curl         git-core         libffi-dev         libssl-dev         matchbox         net-tools         nginx-light         omxplayer         psmisc         python-dev         python-imaging         python-netifaces         python-simplejson         libraspberrypi0         ifupdown         sqlite3         uzbl         x11-xserver-utils         xserver-xorg &&     apt-get clean' returned a non-zero code: 100
[Success]  Successfully uploaded images
[Error]    Some services failed to build:
[Error]      Service: main
[Error]        Error: The command '/bin/sh -c apt-get update &&     apt-get -y install         build-essential         curl         git-core         libffi-dev         libssl-dev         matchbox         net-tools         nginx-light         omxplayer         psmisc         python-dev         python-imaging         python-netifaces         python-simplejson         libraspberrypi0         ifupdown         sqlite3         uzbl         x11-xserver-utils         xserver-xorg &&     apt-get clean' returned a non-zero code: 100
[Error]    Not deploying release.

remote: error: hook declined to update refs/heads/master
To git.balena-cloud.com:gh_kirthiss/screenly.git
 ! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'gh_kirthiss@git.balena-cloud.com:gh_kirthiss/screenly.git'

Any help on solving this? I’m a newbie, and I have searched around, couldnt get enough info. Thanks.

Hey @kirthisiva , Welcome to balenaCloud! I think you were unlucky and pushed this project just after this bug https://github.com/balena-io-library/base-images/issues/532 was introduced. We need to update that project to use a newer base image, but I believe you should be able to add RUN sed -i '/jessie-updates/{s/^/#/}' /etc/apt/sources.list to the second line of your Dockerfile and get things working. Let me know if that doesn’t fix things.

Thanks. I’m using balena cloud and not self-hosted. Where should I look for the docker file?

I haven’t deployed this project before, but looking at the blog post and repo I believe if you add the line: RUN sed -i '/jessie-updates/{s/^/#/}' /etc/apt/sources.list to https://github.com/Screenly/screenly-ose/blob/master/Dockerfile.template just after FROM ... you should be good to go.

I’ve put in a PR to update this to the new balenalib images if anyone here wanted to give it a try.

2 Likes

Hi chrisys
I’ve committed that exact change to my local branch, and have just successfully pushed to my balena remote. Build took a bit over 10 minutes.

Cheers

Update: getting the “Failed to get D-Bus connection: Unknown error -1” message in the log once it pushed to the device though.

I am getting the same thing. Dropping to a shell within the application, it appears the services are failing:

root@c4dc96b:/home/pi/screenly/bin# systemctl start X.service
Failed to get D-Bus connection: Unknown error -1

I get this on system boot as well, but am able to duplicate it with the services that should be starting:

systemctl start X.service
systemctl start matchbox.service
systemctl start screenly-viewer.service
systemctl start screenly-web.service
systemctl start screenly-websocket_server_layer.service

Hi @scheesmanm, welcome to the forums.
We are performing some tests with the project and will be getting back to you as soon as we have results.
Regards
Thomas

Thanks @samothx. Please let me know if there is anything I can do to help.

Sean

@kirthisiva @cjk @scheesman

OK so you can see in the comments of my (now closed) PR above that the Screenly team are looking into updating the repo to use multicontainer on the latest balena base images. The current setup was built before balena supported multicontainer and hence isn’t the optimal implementation any more.

However this doesn’t help you today, so I’ve created a fork which incorporates a couple of changes - notably what @shaunmulligan mentioned above plus another tweak to the .dockerignore file.

I’ve just deployed this to balenaCloud and it works great - you can use this for now until the Screenly team release the proper implementation:

1 Like

Build was successful without any modifications, and Screenly launched as expected. Thanks @chrisys! Much appreciated.

Thanks @chrisys
It took me far too long (several hours :flushed:) to figure out how to override the existing deployed package!
Eventually managed to find the --force flag for git push, and it has deployed to my Pi3, seems to work ok.
I’ve tried a few resources, playback/loading is working, however the backup function doesn’t seem to work. Guessing that is something to do with the containerisation? I’d be happy to help out where I can, but obviously my skills with containers are somewhat limited at this stage.

@cjk well done getting it running.

You might like to comment on this issue to make the Screenly team aware of it again: https://github.com/Screenly/screenly-ose/issues/800