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
cjk
April 11, 2019, 5:13am
9
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:
https://github.com/chrisys/screenly-ose
1 Like
chrisys:
chrisys/screenly-ose
Build was successful without any modifications, and Screenly launched as expected. Thanks @chrisys ! Much appreciated.
cjk
April 13, 2019, 1:52am
15
Thanks @chrisys
It took me far too long (several hours ) 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
fpinto
February 11, 2020, 3:15pm
17
I’ve been having the same issue originally described and @chrisys ’s fork seems no longer available. Has this issued been addressed in a recent screenly build?
tmigone
February 11, 2020, 7:11pm
18
Hi Fabio, Screenly team seems to have closed the issue on their end last September, have you tried with a recent build?
jimsynz
February 11, 2020, 8:13pm
21
Hi @fpinto - @chrisys confirms that the issues with Screenly were fixed and his fork was no longer needed.
fpinto
February 11, 2020, 8:29pm
24
I did it with the latest build in the last couple of days. The error I get is:
[screenly-celery] Package python-imaging is not available, but is referred to by another package.
[screenly-celery] This may mean that the package is missing, has been obsoleted, or
[screenly-celery] is only available from another source
[screenly-celery] However the following packages replace it:
[screenly-celery] python-pil
[screenly-celery] E: Package 'python-imaging' has no installation candidate
[screenly-celery]
[screenly-celery] Removing intermediate container 0799b6d6ed42
[screenly-celery] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev net-tools omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[screenly-viewer] Fetched 8744 kB in 7s (1136 kB/s)
[screenly-viewer] Reading package lists...
[screenly-server] Fetched 8744 kB in 10s (869 kB/s)
[screenly-server] Reading package lists...
[screenly-viewer] Reading package lists...
[screenly-server] Reading package lists...
[screenly-viewer] Building dependency tree...
[screenly-viewer] Reading state information...
[screenly-viewer] E: Unable to locate package omxplayer
[screenly-viewer] E: Unable to locate package libraspberrypi0
[screenly-viewer]
[screenly-viewer] Removing intermediate container 48232d4dc9d0
[screenly-viewer] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev matchbox net-tools 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
[screenly-server] Building dependency tree...
[screenly-server] Reading state information...
[screenly-server] E: Unable to locate package omxplayer
[screenly-server] E: Unable to locate package libraspberrypi0
[screenly-server]
[screenly-server] Removing intermediate container 3103a637dfd4
[screenly-server] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev lsb-release net-tools nginx-light omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: screenly-server
[Error] Error: The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev lsb-release net-tools nginx-light omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Error] Service: screenly-viewer
[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 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] Service: screenly-celery
[Error] Error: The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev net-tools omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Info] Built on arm03
[Error] Not deploying release.
remote: error: hook declined to update refs/heads/master
To git.balena-cloud.com:fpinto/screenly.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'fpinto@git.balena-cloud.com:fpinto/screenly.git'
samothx
February 11, 2020, 9:10pm
25
Hi @fpinto
it seems that this is a git related error.
I found a post that makes it look like a git user related issue.
Is your user the main user for this application ?
Were you able to push successfully before ?
Otherwise trying balena push
instead of git push might be a workaround.
Regards Thomas
fpinto
February 11, 2020, 10:50pm
27
Thanks for the suggestion @samothx , but yes, I had done the balena push method as well. I am getting the following errors:
[screenly-viewer] E: Unable to locate package omxplayer
[screenly-viewer] E: Unable to locate package libraspberrypi0
[screenly-viewer]
[screenly-celery] Building dependency tree...
[screenly-viewer] Removing intermediate container 547e0bfa9bf1
[screenly-viewer] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev matchbox net-tools 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
[screenly-celery] Reading state information...
[screenly-server] Building dependency tree...
[screenly-celery] E: Unable to locate package omxplayer
[screenly-celery] E: Unable to locate package libraspberrypi0
[screenly-celery]
[screenly-server] Reading state information...
[screenly-server] E: Unable to locate package omxplayer
[screenly-server] E: Unable to locate package libraspberrypi0
[screenly-server]
[screenly-celery] Removing intermediate container ca64111271fe
[screenly-celery] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev net-tools omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[screenly-server] Removing intermediate container e525a0e716bf
[screenly-server] The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev lsb-release net-tools nginx-light omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Info] Uploading images
[Success] Successfully uploaded images
[Error] Some services failed to build:
[Error] Service: screenly-server
[Error] Error: The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev lsb-release net-tools nginx-light omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Error] Service: screenly-viewer
[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 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] Service: screenly-celery
[Error] Error: The command '/bin/sh -c apt-get update && apt-get -y install build-essential curl git-core libffi-dev libssl-dev net-tools omxplayer psmisc python-dev python-gobject python-imaging python-netifaces python-simplejson libraspberrypi0 ifupdown sqlite3 && apt-get clean' returned a non-zero code: 100
[Info] Built on arm01
[Error] Not deploying release.
Remote build failed
jimsynz
February 11, 2020, 11:07pm
29
Hi there,
It looks like this is a known issue with Screenly on Raspberry Pi 4’s running 64 bit containers. As your logs indicate the omxplayer
and libraspberrypi0
packages are not present on the aarch64
versions of the debian containers. As a temporary workaround I would replace %%BALENA_MACHINE_NAME%%
with raspberrypi3
in the docker/Dockerfile.celery.template
, docker/Dockerfile.redis.template
, docker/Dockerfile.server.template
, docker/Dockerfile.viewer.template docker/Dockerfile.websocket.template
and then try pushing again. This should not affect performance, but will force it to use 32 bit containers only.
Let us know whether this works for you.
Thanks,
James.