Looping Installing service (But works under local mode, or run manually)

I had created an image with openssh-server based on balenalib/raspberrypi3-node:8.

The image builds and runs fine in local mode.

But when I disable local mode, the balenaCloud log just keeps saying building installing service.

However. when I ssh to the pi, execute balena run -p 22:22 42c0b3698c34. This works without any problem.

Could someone please tell me why this would happen?

Hi there, are those logs coming from your device log dashboard? Could you confirm you 're still having issues? What device-type and version of BalenaOS are you using?

Also, could you share a minimal sample of a Dockerfile exhibiting that issue? Thanks!

HOST: balenaOS 2.43.0+rev1

SUPERVISOR VERSION: 10.2.2

cloud.log (4.4 KB)

docker-compose.yaml (453 Bytes)

vsCode.Dockerfile (571 Bytes)

@mikesimos Thanks for your help.

  • The log comes from Supervisor in the cloud (yellow text)
  • I still have the issue.
  • Running on raspberry pi

What I was trying to achieve with this image is allow me to use REMOTE - SSH plugin from VSCode. So I could use full IDE debugging when needed (only need access to the mounted volumes).

EXTRA NOTE: I also tried the dev image, but the same issue presist.

Hi @bensh

can you try starting the sshd process with -ddd that might reveal the cause.

Best Regards,
Marios

Hi @mbalamat

This still does not work (ENTRYPOINT ["/usr/sbin/sshd", "-ddd"]), and no sshd debuging information does not shown in cloud log.

The interface stuck at Downloaded, can’t start even if I click start button.

02.01.20 14:56:16 (+0000) Downloading image 'registry2.balena-cloud.com/v2/aaa990c9f1fe4a3cdcf7ba7b1a69f23f@sha256:01b7a4718caf01c0ce068d155595dfb9f07aaf470ebd9ccf79a9e604dc51f54a'
02.01.20 14:56:19 (+0000) Downloaded image 'registry2.balena-cloud.com/v2/aaa990c9f1fe4a3cdcf7ba7b1a69f23f@sha256:01b7a4718caf01c0ce068d155595dfb9f07aaf470ebd9ccf79a9e604dc51f54a'
02.01.20 14:56:20 (+0000) Deleting image 'registry2.balena-cloud.com/v2/581b4225f6a6677657b724f6ea57a74a@sha256:9ebad6caee50a9cbe04561a9f290a9d234631efe10880e1f6897b2833aaeece0'
02.01.20 14:56:20 (+0000) Deleted image 'registry2.balena-cloud.com/v2/581b4225f6a6677657b724f6ea57a74a@sha256:9ebad6caee50a9cbe04561a9f290a9d234631efe10880e1f6897b2833aaeece0'
02.01.20 14:56:20 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:56:21 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:56:24 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:56:28 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:56:36 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:56:52 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:57:25 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:58:29 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'
02.01.20 14:58:29 (+0000) Installing service 'debuger sha256:b5bbdeea7aef35262dfd7433bc3f39dc81c41337cf9252f10217fdbe4ffdf7e6'

Hi @bensh, I was able to reproduce this issue using the files you added above.

I checked the Supervisor logs and saw lots of these Error: (HTTP code 400) unexpected - invalid port specification: "487402". A bit of digging led me to this Docker compose issue and this specific comment in particular https://github.com/docker/compose/issues/3109#issuecomment-195435884

So I quoted the port mappings like this in docker-compose.yaml and the service correctly installed. Can you give that a try and let us know if it doesn’t fix your issue?

ports:
  - "8123:22"

@garethtdavies

Thank you so much! This indeed solved my problem.

1 Like