Screenly Forum

Some services failed to build

@ealmonte32 Yeah - we need to rework this. We haven’t touched the Balena support in a while so probably would be helpful to schedule that work in the near future.

Hi @vpetersson and @ealmonte32,

Happy to help be a guinea-pig in this if it would help?

Paul

@Paul
But as you see, even with jessie being built, my compiling of image and build worked, so this is why I want to get a step by step reproduction of what you are doing.
If you can tell me exactly what you’re doing and just replace private words or usernames etc with asterisks.
Example:

  1. Logged in to balena.com
  2. Clicked on this…
  3. Clicked on that…
  4. Selected this… added wifi option…
  5. Flashed to SD card…
  6. Etc…
  7. Went on terminal on computer (OS and all)
  8. Typed git etc in terminal…

Literally like that, step by step, so I can see the difference between how I built it yesterday and how you’re doing it.
Also, it would help if you delete the git cloned folder you created, start fresh, in a new directory…

Hi @ealmonte32,

Thank you for your perseverance with me! I’m wondering if you’ve got the time if it might be worth showing you on hangouts or something rather than filling this forum too much.

I notice my build differs from yours but that might be because you’re building for Pi Zero?

26

My dev computer is a MacBook Pro on macOS 10.14.4 and I’m running git 2.21.0 via HomeBrew

@Paul
Just confirmed that is correct, the resin/raspberry pi 3 repository contains jessie-updates commands but that comes from the hub.docker.com server, which repo for resin/ is controlled by resin/balena, which is called on the Dockerfile.template on the FROM line…

So what you need to do is a bit complicated if you dont understand git much, but basically, get into your screenly-ose directory that you cloned, so you are on your mac, you are on the terminal, and you did git clone https://github… etc ok so far so good
then you did cd screenly-ose, ok in that directory you need to edit the Dockerfile.template file, you can simply use nano , so type in terminal nano Dockerfile.template and on the top edit the line that says FROM, you need to change it to FROM balenalib/raspberrypi3

Ok, now that you are telling the docker which image to build and from which repo, you need to commit the changes, so when you finish editing that FROM line in Dockerfile.template, press ctrl+x, then press y, then press enter.
That should have saved the file, or you can simply edit in your computers textedit or whatever editor you like.
Once that Dockerfile.template contains the correct info, type in terminal, git status and you should see something telling you that you have one modified change, then you type git commit -a which brings up vim editor, and on the top type something like changed dockerfile to new balenalib repo
and then press Esc on your keyboard to stop “Inserting”, then to exit that editor press :x (yup, colon and x, then press enter)

now if you press git status you should not see the modified message anymore, you should see something like Your branch is ahead of origin/master

now type git push balena master and press enter…

You should be golden now… that new image from balena contains the latest build for raspberry pi 3.

1 Like

awesome, looks like we’re building on stretch now - still building so can’t confirm completion but it’s looking promising.

If anyone if following this in the the future and doesn’t know vim then you need :wq to exit to write then quit and you’re away.

Thanks @ealmonte32 I wasn’t familiar with the dockerfile.template - I’d been looking in dockerfile…

2 Likes

so close I can almost smell success…

So now we build successfully and I get the nice ASCII Unicorn :unicorn:

However when the device boots I’m getting errors in the log on balenaCloud:

main bin/start_resin.sh: line 31: systemctl: command not found
main bin/start_resin.sh: line 32: systemctl: command not found
main bin/start_resin.sh: line 33: systemctl: command not found
main bin/start_resin.sh: line 34: systemctl: command not found
main bin/start_resin.sh: line 35: systemctl: command not found
main bin/start_resin.sh: line 42: journalctl: command not found

which would seem to align to the following lines in bin/start_resin.sh

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

help me out @ealmonte32 we’re nealy there - is there something missing in my path or similar? I know it’s going to be really simple… (or not)

:thinking:

Ugh, I am getting the same error, but I thought it was because the screenly install did not successfully happen since I forgot to whitelist the Pi which needs to connect to all the repos… but this is different… ugh… I am trying to rebuild docker image now, maybe instead of us putting the manual raspberry pi we need to use the proper FROM like this: FROM balenalib/%%BALENA_MACHINE_NAME%%

I am going to try one more time…

update; same error… i don’t have a lot of time to play with this now but if i can get it to work in the next 10 mins i’ll post back, if not, it’ll have to wait =[ cause i think vpetersson has to build a new screenly image specific for the new balenalib/ repo…

1 Like

I’m on leave next week so no great rush. Thank you for your help, v. Impressed with this level of support for an OSE project.

How can I say thank you without switching to Screenly Pro? :wink:

1 Like

Well, I am actually just a support volunteer myself because I am learning so much more by troubleshooting this as a side project/hobby on free time.

@Paul
Just thought of this real quick, when you build the balenaOS by selecting Add a new device, pick 2.29.x instead of recommended one… I have a feeling it would work on that since that is the OS version of balenaOS on the pi zero which worked… which has supervisor of lower version as well…
I would do it myself but already in process of building new docker image.

^^^ tried the above, didnt work… ugh I am annoyed at this…

Just to chime in here quickly - the goal with the experimental and celery branches are to move everything into Docker containers. This will vastly simply the architecture as everything is running inside confined containers w/out any dependencies on system components. It’s still a bit rough but we should probably make a push to finalize that in the next sprint.

@vpetersson Yup, using the moby containers and balena is def an IoT dream when all is worked out.

@Paul I’ve been playing with the different host images (balena vs resin vs raspbian ones), and building screenly into the docker there, one of the recurring issues I am getting is that the container does not seem to find the systemctl application so the command fails and therefore cannot run the screenly services copied into the /etc/systemd/system directory when called. This is probably what viktor is saying regarding dependencies, the container is trying to access system services which it depends on, but they are either on the host and cannot be accessed by container, or they were not installed on the container itself properly…
Regardless, give us some time to figure this out and maybe you will be the first one to know when it works. :upside_down_face:

Hi @ealmonte32,

I’m back from my holidays. Looking back at this threat it seems it’s not so much a screenly OSE problem but a more generic balena / docker issue? If so is it going to affect lots of projects?

Paul

@Paul
Welcome back.

Yes it is not screenly at all, it’s the building of the screenly application on this new balena container that needs to be redone.


Well, when you say lots of projects, do you mean like other people who were going to build IoT devices and use screenly on those devices? If so, I guess yeah…
I haven’t had time at all lately to mess with the Dockerfile.
We have a ticket open on github specific for this, so it is just whoever gets to it first does it.
Balena changed how their containers work or are build, it’s a bit confusing, I was reading some of the documentation, but I’d rather do some more research on properly doing it the new way before just changing the code in the build file.

https://www.balena.io/docs/reference/base-images/base-images/#major-changes

Same problem here. I try to change “FROM resin/%%RESIN_MACHINE_NAME%%-debian” to “FROM balenalib/%%RESIN_MACHINE_NAME%%-debian” in Dockerfile.template and it run the container in balena but doesn’t work

Replying to my own thread - I have looked at this again and all is working great.

I’m not sure if it was the screenly OSE update or the balnea.io updates or both but it’s all good now.

There’s a blog post on balnea.io website which works if you step through it:
https://www.balena.io/blog/deploy-free-digital-signage-software-screenly-ose/

I am running into a similar thing on a Raspberry Pi 3 Model 3+. I have been trying different things for two days with not luck.

Any help would be appreciated.

@welias14
Which Dockerfile are you using to build your image?

I am having the same issue on a pi 3+ and I’m a noob. I am using the Dockerfile.celery.template within the docker folder. I’ve copied it (and renamed) as Dockerfile.template in the main repository folder. Is that the correct way to do it? This is the error I get.

[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'

@fpinto
why are you renaming the dockerfile celery template?
did you follow these instructions?