Container missing shutdown signal

One more thing to note, the Dockerfile should actually be called Dockerfile.template, as it’s a template file for our balena builder. I should have changed this in my post!

Then why do you suppose it actually starts the script?

e files should go in a new directory before yo

Hello @hedss,

I am going to load and run your files under a new directory. Will post results ASAP. Thanks!

It may very well be the EXEC, I should have some results to report in the next few minutes.

Thanks Again,

  • rusty

P.S. we are using an RPI2 (but I don’t know if that is relavent.)…

Hi Rusty,

No problem! Pi2 shouldn’t make any difference (and sorry, I don’t have a Pi2 to hand, hence the 3 :slight_smile: )!

On an aside, you absolutely can run the script using CMD ["./startup.sh"], the real crux here is to ensure exec is processing the script and binary,

Best regards,

Heds

I’m trying to get the new container going, but get met with this error when building …

[Error] Error: invalid reference format: repository name must be lowercase

Not sure why …

No idea why, but I need to figure out why I am seeing this problem now.

[debug] handling message: {“message”:"\u001b[32m[Success]\u001b[39m Successfully uploaded images"}
[Success] Successfully uploaded images
[debug] handling message: {“message”:"\u001b[31m[Error]\u001b[39m Some services failed to build:",“isError”:true}
[Error] Some services failed to build:
[debug] handling message: {“message”:"\u001b[31m[Error]\u001b[39m Service: sigi",“isError”:true}
[Error] Service: sigi
[debug] handling message: {“message”:"\u001b[31m[Error]\u001b[39m Error: invalid reference format: repository name must be lowercase",“isError”:true}
[Error] Error: invalid reference format: repository name must be lowercase
[debug] handling message: {“message”:"\u001b[36m[Info]\u001b[39m Built on arm01"}
[Info] Built on arm01
[debug] handling message: {“message”:"\u001b[31m[Error]\u001b[39m Not deploying release.",“isError”:true}
[Error] Not deploying release.
Remote build failed
RemoteBuildFailedError: Remote build failed
at Bluebird.then (/usr/local/lib/node_modules/balena-cli/build/utils/remote-build.js:59:23)
at runCallback (timers.js:705:18)
at tryOnImmediate (timers.js:676:5)
at processImmediate (timers.js:658:5)
at process.topLevelDomainCallback (domain.js:120:23)
From previous event:
at Object.startRemoteBuild (/usr/local/lib/node_modules/balena-cli/build/utils/remote-build.js:57:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

If you need help, don’t hesitate in contacting our support forums at
https://forums.balena.io

For CLI bug reports or feature requests, have a look at the GitHub issues or
create a new one at: https://github.com/balena-io/balena-cli/issues/

So the Error: invalid reference format: repository name must be lowercase will be because the Dockerfile actually needs to be called Dockerfile.template, apologies, I followed up in a message after the initial one but you may not have seen it. It uses the templating to pick the right image for your device, and that needs to be a filename with a .template suffix.

Best regards,

Heds

Yikes. My bad. You already told me that… Ok, pushing again should go as expected…

OK, I got a run with the new code. Here is a screen capture after it terminated.

the new code ran in a container called ‘sigi’…

In other words, we do NOT see: SIGTERM

Thanks Rusty, that’s very interesting. Just to be completely sure that it does work as it should, could you push just the example I sent to a clean device (ie. so that there’s no other code running on there)? I’d like to now know if there’s something happening with any of the other service containers that may be causing this. Also, would you mind granting me support access to this device so I may have a look at it?

Best regards,

Heds

I’m going to carry out a quick test to make sure a docker-compose manifest run build doesn’t cause this (it absolutely shouldn’t, but I’m going to ensure that’s the case).

OK, I will push just that single container… and let you know what happens…

Right, a quick test has ruled out docker-compose built services as being a problem too. This is very curious.

Remote support access has been enabled for quite a while, so feel free to hop on …

Push just your code now.

uuid: e8f5596a4ef43cad28de82bfb1559b6f

Thanks. I’ve just restarted the service manually from the dashboard and I am seeing the SIGTERM get caught:

Yes I have been seeing that all along… From what I remember…

06.03.20 16:18:09 (-0800)  sigi  Main loop...
06.03.20 16:18:12 (-0800)  sigi  SIGTERM!

OK, sorry, I think there’s some confusion then. When aren’t you seeing the SIGTERM?