Multicontainer GO flogo sample app

raspberrypi3

#1

Hello,

I try to build a multicontainer based gateway app on rpi3, mqtt container is fine, the problem is with the go (flogo container) it is pushed all is ok until the log error:
23.07.18 11:08:24 (+0300) flogo Systemd init system enabled.
23.07.18 11:08:24 (+0300) flogo Couldn’t find an alternative telinit implementation to spawn.

version: ‘2’
services:
mqtt:
build: ./mqtt
expose:
- “1883”
privileged: true
network_mode: “host”
flogo:
build: ./flogo
expose:
- “80”
pid: “host”
network_mode: “host”
privileged: true
Any hints?

Thanks


#4

Hi there,

It looks like the go container is attempting to use systemd. Whilst I’ve not seen that particular warning message before, it sounds like the issue could be that the container is not privileged. You should be able to add a line to the service definition for the go container:
privileged: true

Which will then ensure that the container is able to start systemd correctly. Our base images allow the use of systemd by setting the INITSYSTEM environment variable, which also requires privileged mode. Please see here for further details if running from a resin base image.

Hope this helps!


#5

Thanks, indeed after spending more time reading the doc I succeeded.


#6

My pain now is making flogo able to listen on 1883 to receive messages from mqtt:

From host os:
root@238c66c:~# lsof -i:1883
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
mosquitto 21868 105 6u IPv4 592024 0t0 TCP *:1883 (LISTEN)
mosquitto 21868 105 7u IPv6 591162 0t0 TCP *:1883 (LISTEN)
FlogoGW 25337 root 3u IPv4 620551 0t0 TCP 238c66c.local:48934->ks.ral.me:1883 (ESTABLISHED)

My compose file:

version: ‘2’
services:
mqtt:
build: ./mqtt
ports:
- “1883:1883”
privileged: true
network_mode: “host”
restart: always
flogo:
build: ./flogo
network_mode: “host”
privileged: true
restart: always
depends_on:
- mqtt

I’ve tested with local mqtt client and the messages reaches mqtt service but not flogo.

Thanks!


#7

I’ve used the localhost and it’s ok now.

Thanks