Comments (22)
@2014siavash Can you try to pull composition now ?
- Do a git pull to fetch the new code
- Remove old containers
docker ps -a
and remove all mainflux containers - run composition again, navigate to
/bin
folder and run./mainflux-docker.sh start
from magistrala.
We did a transition to monorepo yesterday, merging all repos into main one. Transition is not finished yet, so things might be broken.
Please check Mainflux DockerHub to see if container names have been changed.
from magistrala.
Thanks for fixing the problem, but now there is the same problem for mqtt-adaptor.
siavash@ubuntu:~/Desktop/Mainflux2/mainflux/bin$ sudo ./mainflux-docker.sh startStarting NATS and Cassandra...
Starting nats ... done
Starting cassandra ... done
Waiting for Cassandra to start. This takes time, please be patient...
............OK
Starting Mainflux composition...
Pulling mqtt-adapter (mainflux/mqtt-adapter:latest)...
ERROR: repository mainflux/mqtt-adapter not found: does not exist or no pull access
Aborting due to errexit on line 122. Exit code: 1
Starting mqtt-adapter ... done
Starting manager ... done
Starting message-writer ... done
Starting http-adapter ... done
Starting Nginx...
Starting nginx ... error
ERROR: for nginx Cannot start service nginx: Cannot link to a non running container: /mainflux-mqtt AS /mainflux-nginx/mainflux-mqtt
ERROR: No containers to start
Aborting due to errexit on line 136. Exit code: 1
Stopping Nginx...
Stopping Mainflux composition...
Stopping mainflux-http ... done
Stopping mainflux-message-writer ... done
Stopping mainflux-manager ... done
Stopping NATS and Cassandra...
Stopping mainflux-cassandra ... done
Stopping mainflux-nats ... done
*** MAINFLUX IS OFF ***
from magistrala.
yes of course.
First, I cloned the new code. Then I removed old containers and then continued according to your instruction.
here is the results for "docker ps" and "docker ps -a":
siavash@ubuntu:/Desktop/Mainflux2/mainflux/bin$ sudo docker ps/Desktop/Mainflux2/mainflux/bin$ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
siavash@ubuntu:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
b0875199d2e3 mainflux/http:latest "/exe" 5 minutes ago Exited (2) 5 minutes ago mainflux-http
25472f7ea01a mainflux/writer:latest "/exe" 5 minutes ago Exited (2) 5 minutes ago mainflux-message-writer
a96df7ef8f78 mainflux/manager:latest "/exe" 5 minutes ago Exited (2) 5 minutes ago mainflux-manager
948bd073cd6d mainflux/mqtt-adapter:latest "node mqtt.js" 5 minutes ago Exited (137) 5 minutes ago mainflux-mqtt
50c58a226a00 nginx:1.13-alpine "nginx -g 'daemon ..." 7 hours ago Created mainflux-nginx
9eb718660669 cassandra:latest "/docker-entrypoin..." 2 days ago Exited (143) 5 minutes ago mainflux-cassandra
174762ff5cfd nats:latest "/gnatsd -c gnatsd..." 2 days ago Exited (2) 5 minutes ago mainflux-nats
1df8507565f4 prestashop/prestashop "docker-php-entryp..." 2 weeks ago Exited (0) 2 weeks ago some-prestashop
81ccfe5fd35b mysql "docker-entrypoint..." 2 weeks ago Exited (0) 2 weeks ago some-mysql
3891f5c4b0eb mainflux/loraserver-docker:lora-app-server "dockerize -wait t..." 5 weeks ago Exited (0) 4 weeks ago lora-app-server
e24c1e7f079c mainflux/loraserver-docker:loraserver "dockerize -wait t..." 5 weeks ago Exited (0) 4 weeks ago lora-network-server
189e0ad907d6 mainflux/loraserver-docker:lora-gateway-bridge "dockerize -wait t..." 5 weeks ago Exited (0) 4 weeks ago lora-gateway-bridge
f54866deaeb8 ansi/mosquitto "/usr/local/sbin/m..." 5 weeks ago Exited (0) 4 weeks ago brocaar_mosquitto_1
baac900267a9 redis:alpine "docker-entrypoint..." 5 weeks ago Exited (0) 4 weeks ago redis
085fb904f31d postgres:9.5 "docker-entrypoint..." 5 weeks ago Exited (0) 4 weeks ago brocaar_postgres_1
siavash@ubuntu:~/Desktop/Mainflux2/mainflux/bin$
Here is also the results for run composition:
siavash@ubuntu:~/Desktop/Mainflux2/mainflux/bin$ sudo ./mainflux-docker.sh start
Starting NATS and Cassandra...
Starting nats ... done
Starting cassandra ... done
Waiting for Cassandra to start. This takes time, please be patient...
............OK
Starting Mainflux composition...
Pulling mqtt-adapter (mainflux/mqtt-adapter:latest)...
latest: Pulling from mainflux/mqtt-adapter
Digest: sha256:183e4f40bdb3cbc8132e1054113f40cf3f0a0f00c5b5f1209eaec83ecc2a2c9b
Status: Image is up to date for mainflux/mqtt-adapter:latest
Pulling manager (mainflux/manager:latest)...
latest: Pulling from mainflux/manager
Digest: sha256:f27cc3a0256ad4cae43f0b72561b21002c992e21b7939c0ccc110591e85dc2e4
Status: Image is up to date for mainflux/manager:latest
Pulling message-writer (mainflux/writer:latest)...
latest: Pulling from mainflux/writer
Digest: sha256:86b3d4457258e650e905e3398a93ed18e9d8582fb6e28c7e4e42d9c7ef217298
Status: Image is up to date for mainflux/writer:latest
Pulling http-adapter (mainflux/http:latest)...
latest: Pulling from mainflux/http
Digest: sha256:c28a308123662ed570cf44bc8db043498fb3f391d5374d91bdb58935c2772885
Status: Image is up to date for mainflux/http:latest
Starting mqtt-adapter ... done
Starting manager ... done
Starting message-writer ... done
Starting http-adapter ... done
Starting Nginx...
Starting nginx ... error
ERROR: for nginx Cannot start service nginx: Cannot link to a non running container: /9b41dbe141a3_mainflux-manager AS /mainflux-nginx/mainflux-manager
ERROR: No containers to start
Aborting due to errexit on line 136. Exit code: 1
Stopping Nginx...
Stopping Mainflux composition...
Stopping mainflux-http ... done
Stopping mainflux-message-writer ... done
Stopping mainflux-manager ... done
Stopping mainflux-mqtt ... done
Stopping NATS and Cassandra...
Stopping mainflux-cassandra ... done
Stopping mainflux-nats ... done
*** MAINFLUX IS OFF ***
siavash@ubuntu:~/Desktop/Mainflux2/mainflux/bin$
I think the problem is just for Nginx now! However as you can see above, Nginx was not worked before.
from magistrala.
Wait wait wait. For Nginx it is my fault. Now every thing is ok. Mainflux is on. Thank you.
from magistrala.
@2014siavash Sure np, thank you for reporting this one ;)
from magistrala.
@2014siavash Closing this one, thank you!
from magistrala.
@2014siavash How did you solve the Nginx problem? I am having the same problem.
from magistrala.
Same here! Please let us know how you fixed it.
from magistrala.
Reopening the issue. @aureliocano and @thedavejay do you have maybe local NGINX (or some other server) instance running that prevents eventually NGINX Docker container to map to localhost ports: https://github.com/mainflux/mainflux/blob/master/bin/docker/docker-compose.nginx.yml#L25-L28
from magistrala.
Thanks @drasko
Not in my case, no other server is running.
My specific problem is:
Starting nginx ... error
ERROR: for nginx Cannot start service nginx: Cannot link to a non running container: /mainflux-http AS /mainflux-nginx/mainflux-http
ERROR: No containers to start
Aborting due to errexit on line 136. Exit code: 1
I had a look to the docker log of http and nats container and obtained this:
user@user-VirtualBox:~/mainflux/bin$ docker logs mainflux-nats
[1] 2017/11/29 17:19:56.420181 [INF] Starting nats-server version 1.0.2
[1] 2017/11/29 17:19:56.420304 [INF] Starting http monitor on 0.0.0.0:8222
[1] 2017/11/29 17:19:56.420358 [INF] Listening for client connections on 0.0.0.0:4222
[1] 2017/11/29 17:19:56.420363 [INF] Server is ready
[1] 2017/11/29 17:19:56.424523 [INF] Listening for route connections on 0.0.0.0:6222
user@user-VirtualBox:~/mainflux/bin$ docker logs mainflux-http
{"aborted":"nats: no servers available for connection","ts":"2017-11-29T17:20:46.940750603Z"}
Could the problem be on a nonexistent link between both containers?
from magistrala.
@aureliocano ERROR: No containers to start
- were all containers pulled? You can eventually use docker-compose -f docker/docker-compose.nginx.yml pull
to be sure that you pulled the correct container. You can do this also for other docker files.
from magistrala.
Thanks @drasko
There was no luck with that, all containers were pulled aand the problem persists. I will try in other machine just in case.
from magistrala.
@aureliocano can you please bump up docker version:
drasko@Marx:~$ dockerd --version
Docker version 17.11.0-ce, build 1caf76c
Also, please try getting us the logs using:
docker-compose -f docker/docker-compose.mainflux.yml logs -f
from magistrala.
Hi,
I did the followings:
first, I removed the current container for Nginx. It is done with sudo docker-compose -ps as I remembered. For more details, please search about how one can remove the old container with docker.
Then, I stopped mainflux with sudo docker-compose down.
Finally, I started mainflux again with sudo docker-compose up.
I think it will work for you too. The problem is for your old container of Nginx which should be removed, before pulling the new one.
Hope to be fixed.
from magistrala.
user@user-VirtualBox:/mainflux/bin$ dockerd --version/mainflux/bin$ docker-compose -f docker/docker-compose.mainflux.yml logs -f
Docker version 17.03.2-ce, build f5ec1e2
user@user-VirtualBox:
Attaching to mainflux-mqtt, mainflux-http, mainflux-message-writer, mainflux-manager
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512404770725,"msg":"listening","address":"::","family":"IPv6","port":8880,"protocol":"http","v":1}
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512404770734,"msg":"listening","address":"::","family":"IPv6","port":1883,"protocol":"tcp","v":1}
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512404903461,"msg":"listening","address":"::","family":"IPv6","port":8880,"protocol":"http","v":1}
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512404903479,"msg":"listening","address":"::","family":"IPv6","port":1883,"protocol":"tcp","v":1}
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512465258788,"msg":"listening","address":"::","family":"IPv6","port":8880,"protocol":"http","v":1}
mainflux-mqtt | {"pid":1,"hostname":"9092868d102d","level":30,"time":1512465258791,"msg":"listening","address":"::","family":"IPv6","port":1883,"protocol":"tcp","v":1}
mainflux-http | {"aborted":"nats: no servers available for connection","ts":"2017-11-29T09:36:26.373389332Z"}
mainflux-http | {"aborted":"nats: no servers available for connection","ts":"2017-11-29T17:20:46.940750603Z"}
mainflux-http | {"aborted":"nats: no servers available for connection","ts":"2017-12-04T16:26:10.56786591Z"}
mainflux-http | {"aborted":"nats: no servers available for connection","ts":"2017-12-04T16:28:23.475642599Z"}
mainflux-http | {"aborted":"nats: no servers available for connection","ts":"2017-12-05T09:14:19.216151662Z"}
mainflux-mqtt exited with code 137
mainflux-http exited with code 1
mainflux-message-writer exited with code 2
mainflux-manager exited with code 2
@2014siavash I removed the nginx container and had the same problem:
....
Starting manager ... done
Starting mqtt-adapter ... done
Starting message-writer ... done
Starting http-adapter ... done
Starting Nginx...
Pulling nginx (nginx:1.13-alpine)...
1.13-alpine: Pulling from library/nginx
Digest: sha256:34aa80bb22c79235d466ccbbfa3659ff815100ed21eddb1543c6847292010c4d
Status: Image is up to date for nginx:1.13-alpine
WARNING: The create command is deprecated. Use the up command with the --no-start flag instead.
Creating mainflux-nginx ...
Creating mainflux-nginx ... done
Starting nginx ... error
ERROR: for nginx Cannot start service nginx: Cannot link to a non running container: /mainflux-http AS /mainflux-nginx/mainflux-http
ERROR: No containers to start
Aborting due to errexit on line 136. Exit code: 1
Stopping Nginx...
Stopping Mainflux composition...
....
from magistrala.
I remembered that removing the container is not enough. Could you please say how you removed it? (pls copy and paste your command line here for removing)
There was an ID which I used it to remove the container. Unfortunately, I have not access to my Ubuntu system now, else I could explain the precise steps I did to make it correct.
from magistrala.
Hi @2014siavash
I checked my containers:
user@user-VirtualBox:~/mainflux/bin$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
a8cae709804e nginx:1.13-alpine "nginx -g 'daemon ..." About an hour ago Created mainflux-nginx
9092868d102d mainflux/mqtt-adapter:latest "node mqtt.js" 17 hours ago Exited (137) About an hour ago mainflux-mqtt
03ff63f803e1 mainflux/http:latest "/exe" 6 days ago Exited (1) About an hour ago mainflux-http
edb0c111bc07 mainflux/writer:latest "/exe" 6 days ago Exited (2) About an hour ago mainflux-message-writer
a3cae9359efa mainflux/manager:latest "/exe" 6 days ago Exited (2) About an hour ago mainflux-manager
cbcb5baa82df cassandra:3.0.14 "/docker-entrypoin..." 6 days ago Exited (143) About an hour ago mainflux-cassandra
b97abbfb0323 nats:1.0.2 "/gnatsd -c gnatsd..." 6 days ago Exited (2) About an hour ago mainflux-nats
And then, I removed it using the container id:
user@user-VirtualBox:~/mainflux/bin$ docker rm a8cae709804e
a8cae709804e
from magistrala.
@aurliocano what's the dockerd
version?
Also, looks like the NATS was not started correctly.
from magistrala.
It seems same as me!!!!! Maybe all containers should be removed, and then started again.
Sorry, I have no idea yet. But, it works for me!
from magistrala.
I removed all containers and pulled them all this time and it didn't work.
@drasko my dockerd version is:
Docker version 17.03.2-ce, build f5ec1e2
from magistrala.
Covered by #135.
from magistrala.
Related Issues (20)
- Generate mocks with mockery for Users service
- Generate mocks with mockery for readers
- Feature: Need to delete things and channels HOT 3
- Feature: Generate mocks with mockery for HTTP service
- Feature: Generate mocks with mockery for Twins service
- Bug: Can't Establish Websocket from html webpage HOT 8
- Feature: Generate mocks with mockery for Consumer service HOT 1
- Feature: Migrate gocoap library from v2 to v3.3
- Simplify Magistrala core repository HOT 1
- Bug: the docker image magistrala/vernemq on the docker hub doesn't have the arm64 version HOT 2
- Add Test Case for Repository Errors in Certs Service
- Generate mocks for proto interfaces
- Feature: Delete multiple policies with relationship filters HOT 3
- Feature: Remove unused errors variables from all error packages (svcerr, repoerr) HOT 1
- Feature: Update User role should fail fast for unknown user IDs
- Feature: Handle other layers (repo ,cache , auth) error in service layer HOT 2
- Feature: coap-cli : migrate gocoap library from v2 to v3.3
- Feature: coap-cli: Add CI
- Feature: coap-cli: Remove vendor dir
- Feature: Use Postgres LTREE for groups hierarchy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from magistrala.