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

Message Writer Problem #98

Closed
2014siavash opened this issue Sep 24, 2017 · 22 comments
Closed

Message Writer Problem #98

2014siavash opened this issue Sep 24, 2017 · 22 comments
Labels

Comments

@2014siavash
Copy link

Hi,

I got this error when I want to install mainflux with docker. Whats the reason?

ERROR: repository mainflux/message-writer not found: does not exist or no pull access

Thanks


Starting NATS, Cassandra and Nginx...

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:d17b25a10c1f5ad53d8865ceb714bca29e7f9179a4275596fa4ccaa25f577422
Status: Image is up to date for mainflux/mqtt-adapter:latest
Pulling manager (mainflux/manager:latest)...
latest: Pulling from mainflux/manager
Digest: sha256:8119f293e2c275df2c7008d1ab9db9fbdec6ea3ff59789f2c619d662bfba5543
Status: Image is up to date for mainflux/manager:latest
Pulling message-writer (mainflux/message-writer:latest)...
ERROR: repository mainflux/message-writer 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 ... done
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 NATS and Cassandra...

Stopping mainflux-cassandra ... done
Stopping mainflux-nats ... done

*** MAINFLUX IS OFF ***

@drasko
Copy link
Contributor

drasko commented Sep 24, 2017

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.

@2014siavash
Copy link
Author

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 ***

@nmarcetic
Copy link
Collaborator

@2014siavash Can you try to pull composition now ?

  1. Do a git pull to fetch the new code
  2. Remove old containers docker ps -a and remove all mainflux containers
  3. run composition again, navigate to /bin folder and run ./mainflux-docker.sh start

@2014siavash
Copy link
Author

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
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
siavash@ubuntu:
/Desktop/Mainflux2/mainflux/bin$ sudo docker ps -a
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.

@2014siavash
Copy link
Author

Wait wait wait. For Nginx it is my fault. Now every thing is ok. Mainflux is on. Thank you.

@nmarcetic
Copy link
Collaborator

@2014siavash Sure np, thank you for reporting this one ;)

@mijicd
Copy link
Contributor

mijicd commented Sep 26, 2017

@2014siavash Closing this one, thank you!

@mijicd mijicd closed this as completed Sep 26, 2017
@aureliocano
Copy link

@2014siavash How did you solve the Nginx problem? I am having the same problem.

@thedavejay
Copy link

Same here! Please let us know how you fixed it.

@drasko drasko reopened this Nov 29, 2017
@drasko
Copy link
Contributor

drasko commented Nov 29, 2017

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

@aureliocano
Copy link

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?

@drasko
Copy link
Contributor

drasko commented Nov 29, 2017

@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.

@aureliocano
Copy link

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.

@drasko
Copy link
Contributor

drasko commented Dec 4, 2017

@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

@2014siavash
Copy link
Author

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.

@aureliocano
Copy link

@drasko

user@user-VirtualBox:/mainflux/bin$ dockerd --version
Docker version 17.03.2-ce, build f5ec1e2
user@user-VirtualBox:
/mainflux/bin$ docker-compose -f docker/docker-compose.mainflux.yml logs -f
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...
....

@2014siavash
Copy link
Author

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.

@aureliocano
Copy link

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

@drasko
Copy link
Contributor

drasko commented Dec 5, 2017

@aurliocano what's the dockerd version?

Also, looks like the NATS was not started correctly.

@2014siavash
Copy link
Author

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!

@aureliocano
Copy link

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

@mijicd
Copy link
Contributor

mijicd commented Dec 25, 2017

Covered by #135.

@mijicd mijicd closed this as completed Dec 25, 2017
@mijicd mijicd modified the milestone: 1.0.0-rc.1 Dec 25, 2017
mteodor pushed a commit to mteodor/mainflux that referenced this issue Nov 5, 2021
NOISSUE - Add 'format' parameter of HTTP API for storage readers.
arvindh123 pushed a commit to arvindh123/magistrala that referenced this issue Dec 17, 2023
* add bootstrap tests

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

* add more context

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

* add test name

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

* change timeout

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

* change timeout to 10min

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

* remove build after lint

Signed-off-by: Musilah <nataleigh.nk@gmail.co>

---------

Signed-off-by: Musilah <nataleigh.nk@gmail.co>
Co-authored-by: Musilah <nataleigh.nk@gmail.co>
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

6 participants