Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker Fails on RPi #66

Closed
drasko opened this issue Oct 17, 2016 · 8 comments
Closed

Docker Fails on RPi #66

drasko opened this issue Oct 17, 2016 · 8 comments
Labels

Comments

@drasko
Copy link
Member

drasko commented Oct 17, 2016

pi@raspberrypi:~/mainflux $ sudo docker-compose up
Starting mainflux-mongodb
Starting mainflux-emqttd
Starting mainflux-server
Attaching to mainflux-emqttd, mainflux-mongodb, mainflux-server
mainflux-mongodb   | panic: standard_init_linux.go:175: exec user process caused "exec format error" [recovered]
mainflux-mongodb   |    panic: standard_init_linux.go:175: exec user process caused "exec format error"
mainflux-mongodb   | 
mainflux-mongodb   | goroutine 1 [running, locked to thread]:
mainflux-mongodb   | panic(0x3339c8, 0x56e3b9c0)
mainflux-mongodb   |    /usr/local/go/src/runtime/panic.go:481 +0x330
mainflux-mongodb   | github.com/urfave/cli.HandleAction.func1(0x56e95958)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x328
mainflux-mongodb   | panic(0x3339c8, 0x56e3b9c0)
mainflux-mongodb   |    /usr/local/go/src/runtime/panic.go:443 +0x448
mainflux-mongodb   | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0x56e955e0, 0x56dc02a0, 0x56e95668)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x13c
mainflux-mongodb   | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0x56e3c2a0, 0x464264b8, 0x56e3b9c0)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x498
mainflux-mongodb   | main.glob.func8(0x56e4a1e0, 0x0, 0x0)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/main_unix.go:26 +0x58
mainflux-mongodb   | reflect.Value.call(0x2e90f8, 0x3efd4c, 0x13, 0x362250, 0x4, 0x56e95918, 0x1, 0x1, 0x0, 0x0, ...)
mainflux-mongodb   |    /usr/local/go/src/reflect/value.go:435 +0xeb4
mainflux-mongodb   | reflect.Value.Call(0x2e90f8, 0x3efd4c, 0x13, 0x56e95918, 0x1, 0x1, 0x0, 0x0, 0x0)
mainflux-mongodb   |    /usr/local/go/src/reflect/value.go:303 +0x84
mainflux-mongodb   | github.com/urfave/cli.HandleAction(0x2e90f8, 0x3efd4c, 0x56e4a1e0, 0x0, 0x0)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x230
mainflux-mongodb   | github.com/urfave/cli.Command.Run(0x364678, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3ce288, 0x51, 0x0, ...)
mainflux-emqttd    | panic: standard_init_linux.go:175: exec user process caused "exec format error" [recovered]
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xcd0
mainflux-mongodb   | github.com/urfave/cli.(*App).Run(0x56e26240, 0x56e08050, 0x2, 0x2, 0x0, 0x0)
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x84c
mainflux-emqttd    |    panic: standard_init_linux.go:175: exec user process caused "exec format error"
mainflux-mongodb   | main.main()
mainflux-emqttd    | 
mainflux-mongodb   |    /go/src/github.com/opencontainers/runc/main.go:137 +0xbb4
mainflux-emqttd    | goroutine 1 [running, locked to thread]:
mainflux-emqttd    | panic(0x3339c8, 0x56ed5900)
mainflux-emqttd    |    /usr/local/go/src/runtime/panic.go:481 +0x330
mainflux-emqttd    | github.com/urfave/cli.HandleAction.func1(0x56f05958)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x328
mainflux-emqttd    | panic(0x3339c8, 0x56ed5900)
mainflux-emqttd    |    /usr/local/go/src/runtime/panic.go:443 +0x448
mainflux-emqttd    | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0x56f055e0, 0x56e422d0, 0x56f05668)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x13c
mainflux-emqttd    | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0x56ebc300, 0x464a84b8, 0x56ed5900)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x498
mainflux-emqttd    | main.glob.func8(0x56eb6320, 0x0, 0x0)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/main_unix.go:26 +0x58
mainflux-emqttd    | reflect.Value.call(0x2e90f8, 0x3efd4c, 0x13, 0x362250, 0x4, 0x56f05918, 0x1, 0x1, 0x0, 0x0, ...)
mainflux-emqttd    |    /usr/local/go/src/reflect/value.go:435 +0xeb4
mainflux-emqttd    | reflect.Value.Call(0x2e90f8, 0x3efd4c, 0x13, 0x56f05918, 0x1, 0x1, 0x0, 0x0, 0x0)
mainflux-emqttd    |    /usr/local/go/src/reflect/value.go:303 +0x84
mainflux-emqttd    | github.com/urfave/cli.HandleAction(0x2e90f8, 0x3efd4c, 0x56eb6320, 0x0, 0x0)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x230
mainflux-emqttd    | github.com/urfave/cli.Command.Run(0x364678, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3ce288, 0x51, 0x0, ...)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xcd0
mainflux-emqttd    | github.com/urfave/cli.(*App).Run(0x56ea8240, 0x56e8a050, 0x2, 0x2, 0x0, 0x0)
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x84c
mainflux-emqttd    | main.main()
mainflux-server    | panic: standard_init_linux.go:175: exec user process caused "exec format error" [recovered]
mainflux-emqttd    |    /go/src/github.com/opencontainers/runc/main.go:137 +0xbb4
mainflux-server    |    panic: standard_init_linux.go:175: exec user process caused "exec format error"
mainflux-server    | 
mainflux-server    | goroutine 1 [running, locked to thread]:
mainflux-server    | panic(0x3339c8, 0x56dd5c80)
mainflux-server    |    /usr/local/go/src/runtime/panic.go:481 +0x330
mainflux-server    | github.com/urfave/cli.HandleAction.func1(0x56e7d958)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x328
mainflux-server    | panic(0x3339c8, 0x56dd5c80)
mainflux-server    |    /usr/local/go/src/runtime/panic.go:443 +0x448
mainflux-server    | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0x56e7d5e0, 0x56da8258, 0x56e7d668)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x13c
mainflux-server    | github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0x56dd62a0, 0x4640e490, 0x56dd5c80)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x498
mainflux-server    | main.glob.func8(0x56e241e0, 0x0, 0x0)
mainflux-server    |    /go/src/github.com/opencontainers/runc/main_unix.go:26 +0x58
mainflux-server    | reflect.Value.call(0x2e90f8, 0x3efd4c, 0x13, 0x362250, 0x4, 0x56e7d918, 0x1, 0x1, 0x0, 0x0, ...)
mainflux-server    |    /usr/local/go/src/reflect/value.go:435 +0xeb4
mainflux-server    | reflect.Value.Call(0x2e90f8, 0x3efd4c, 0x13, 0x56e7d918, 0x1, 0x1, 0x0, 0x0, 0x0)
mainflux-server    |    /usr/local/go/src/reflect/value.go:303 +0x84
mainflux-emqttd exited with code 2
mainflux-server    | github.com/urfave/cli.HandleAction(0x2e90f8, 0x3efd4c, 0x56e241e0, 0x0, 0x0)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:487 +0x230
mainflux-mongodb exited with code 2
mainflux-server    | github.com/urfave/cli.Command.Run(0x364678, 0x4, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3ce288, 0x51, 0x0, ...)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/command.go:191 +0xcd0
mainflux-server    | github.com/urfave/cli.(*App).Run(0x56e16240, 0x56df0050, 0x2, 0x2, 0x0, 0x0)
mainflux-server    |    /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:240 +0x84c
mainflux-server    | main.main()
mainflux-server    |    /go/src/github.com/opencontainers/runc/main.go:137 +0xbb4
mainflux-server exited with code 2
@drasko
Copy link
Member Author

drasko commented Nov 2, 2016

I do not have RPi currently to test, but I am suspicious about RPi's docker-compose...

Anyway - I will mark this as a bug.

Can anybody reproduce this on RPi and confirm that bug exists?

@drasko drasko added the bug label Nov 2, 2016
@drasko
Copy link
Member Author

drasko commented Nov 7, 2016

Strange, I just got mail notification from GitHub:
"Can confirm, seeing the same issue on an RPi2." - but I can not see the comment here?

@drasko
Copy link
Member Author

drasko commented Nov 7, 2016

Anyway - All Mainflux Docker images are built by the DockerHub automated build on x64 machines. For RPi packaging we must use ARM compiled images, and that probably means resin.io and Hypriot containers, somethingsimilar to this: https://github.com/hypriot/rpi-golang/blob/master/Dockerfile

Moreover, Mainflux uses EMQ and for the moment I have no idea how will we port this piece of Erlang code to RPi... I guess it can be done, I've seen VerneMQ has been ported to Pine64 few days ago: https://syshell.net/2016/11/05/vernemq-install-it-on-pine64/

We have to see this with EMQ community...

@drasko
Copy link
Member Author

drasko commented Nov 7, 2016

Probably best approach for the first iteration would be to run Mainflux on PC (on Vm for example) connect RPi to this machine in private LAN via ETH and then run Mosquitto on RPi and bridge it similar to this: emqx/emqx#718

I have not tried this set-up yet, but it should work...

@mijicd how will this affect auth? If Mosquitto is bridged to EMQTTD it should be seen like one big cluster, and auth should work correctly.

@gesaleh
Copy link
Member

gesaleh commented Dec 14, 2016

I managed to bring up mainflux on RPI 3
install gnats alone and mongdb
go get mainflux-core and git clone mainflux-mqtt
build mainflux-core and it run i'll try to see the load testing

@drasko
Copy link
Member Author

drasko commented Dec 14, 2016

@gesaleh great, thanks.

We are wondering about Docker also, please let us know if you have this one running. It will probably demand change in the Dockerfile (maybe to include Hypriot), and if yes, I'd gladly accept PR :)

@drasko
Copy link
Member Author

drasko commented Jan 2, 2017

FYI, I've created https://github.com/mainflux/mainflux/blob/master/install_sources.sh to help installation from the sources.

@drasko
Copy link
Member Author

drasko commented Aug 25, 2017

Closing this one.

@drasko drasko closed this as completed Aug 25, 2017
mteodor pushed a commit to mteodor/mainflux that referenced this issue Jun 9, 2021
Signed-off-by: Manuel Imperiale <manuel.imperiale@gmail.com>
mteodor pushed a commit to mteodor/mainflux that referenced this issue Nov 5, 2021
Signed-off-by: Drasko Draskovic <drasko.draskovic@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants