Closed victordamazio closed 6 years ago
I suspect that the problem is that the message was not received right? Could you, please, check if all containers are ok? (executing the command docker-compose ps
. It is expected that both kong-config
and kong-migration
are down.
kong-config
and kong-migration
are on Exit 0
, what should I do now?
Ok, let's check this step-by-step. First, the basic stuff:
docker-compose logs -f iotagent-mqtt
(and send a message after starting collecting the logs).When I type docker-compose ps
, the iotagent-mqtt
is on Exit 255
I executed docker-compose logs -f iotagent-mqtt
but I don't know what happened, and I don't think nothing changed, the messages are still not working.
Guess it didn't work, maybe tomorrow I'll try reinstalling everything.
All containers are stopped? Or is it just iotagent-mqtt?
The kong containers and iotagent are down.
I'll try messing with it again, but guess I'll try uninstalling everything, but it will probably not work, the issue will likely come back when I turn off the Virtual Machine once again.
Is there anything I can do to restart Kong and Iotagent?
I tried typing sudo docker-compose up
and one of the messages was: Starting dockercompose_iotagent-mqtt_1 ... error
I'm typing this command, according to the tutorial:
mosquitto_pub -t /device/thermometers -i "admin:5aded0" -m '{"temperature" : 60}'
Do you think there's any mistake in this? Any typo?
When I type sudo docker-compose ps
:
dockercompose_apigw_1 /docker-entrypoint.sh /bin ... Up 0.0.0.0:8000->8000/tcp, 8001/tcp, 8443/tcp, 8444/tcp
dockercompose_auth-redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
dockercompose_auth_1 ./appRun.sh start Up 5000/tcp
dockercompose_data-broker-redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
dockercompose_data-broker_1 npm run subscription Up 80/tcp
dockercompose_device-manager-redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
dockercompose_device-manager_1 ./docker/entrypoint.sh Up 5000/tcp
dockercompose_ejbca_1 /root/entrypoint.sh Up 5583/tcp, 8080/tcp, 8443/tcp
dockercompose_flowbroker_1 node index.js -w 1 -s Up
dockercompose_gui_1 nginx -g daemon off; Up 80/tcp
dockercompose_history_1 ./docker/falcon-docker-ent ... Up 8000/tcp
dockercompose_iotagent-mqtt_1 /opt/entrypoint.sh Exit 255
dockercompose_kafka_1 /start.sh Up 7203/tcp, 9092/tcp
dockercompose_kong-config_1 /opt/kong.config.sh Exit 0
dockercompose_kong-migration_1 /docker-entrypoint.sh kong ... Exit 0
dockercompose_mongodb_1 docker-entrypoint.sh mongod Up 27017/tcp
dockercompose_mosca-redis_1 docker-entrypoint.sh redis ... Up 6379/tcp
dockercompose_persister_1 python history/subscriber/ ... Up
dockercompose_postgres_1 docker-entrypoint.sh postgres Up 5432/tcp
dockercompose_rabbitmq_1 docker-entrypoint.sh rabbi ... Up 25672/tcp, 4369/tcp, 5671/tcp, 5672/tcp
dockercompose_zookeeper_1 /docker-entrypoint.sh zkSe ... Up 2181/tcp, 2888/tcp, 3888/tcp
Also, I tried sudo docker-compose up -d
dockercompose_ejbca_1 is up-to-date
dockercompose_data-broker-redis_1 is up-to-date
dockercompose_postgres_1 is up-to-date
dockercompose_gui_1 is up-to-date
dockercompose_mongodb_1 is up-to-date
dockercompose_mosca-redis_1 is up-to-date
dockercompose_zookeeper_1 is up-to-date
dockercompose_auth-redis_1 is up-to-date
dockercompose_rabbitmq_1 is up-to-date
dockercompose_device-manager-redis_1 is up-to-date
Starting dockercompose_kong-migration_1 ...
dockercompose_auth_1 is up-to-date
Starting dockercompose_kong-migration_1
dockercompose_history_1 is up-to-date
dockercompose_kafka_1 is up-to-date
dockercompose_flowbroker_1 is up-to-date
dockercompose_data-broker_1 is up-to-date
dockercompose_device-manager_1 is up-to-date
Starting dockercompose_iotagent-mqtt_1 ...
dockercompose_persister_1 is up-to-date
Starting dockercompose_iotagent-mqtt_1 ... error
ERROR: for dockercompose_iotagent-mqtt_1 Cannot start service iotagent-mqtt: driver failed programming external connectivity on endpoint dockercompose_iotagent-mqtt_1 (825a4565cd08bd497c4596fdbacbad30Starting dockercompose_kong-migration_1 ... done
dockercompose_apigw_1 is up-to-date
Starting dockercompose_kong-config_1 ...
Starting dockercompose_kong-config_1 ... done
ERROR: for iotagent-mqtt Cannot start service iotagent-mqtt: driver failed programming external connectivity on endpoint dockercompose_iotagent-mqtt_1 (825a4565cd08bd497c4596fdbacbad300ab63c9844a7eb4260f9e250dcfd9b65): Error starting userland proxy: listen tcp 0.0.0.0:1883: bind: address already in use
ERROR: Encountered errors while bringing up the project.
Maybe this is the issue, but what should I do?
Reinstalled everything, it's working.
But it's possible that everything will stop working again if I reset the virtual machine again, don't close the issue yet.
This might be related to docker itself, not iotagent: https://stackoverflow.com/questions/39508018/docker-driver-failed-programming-external-connectivity-on-endpoint-webserver.
Let's keep track of this docker issue to see if there's any update on this.
Hello @mariane-previde , @rascaraficci
I got the same problem. Can someone help me?
Figura 1 - Container with problem
The command "service docker restart" was applied by someone ? If yes, it was enough ?
Figura 2 - "service docker restart" command
I am really worried... if I kill iotagent mqtt container, the DEVICE_ID number can stop working?
Figura 3 - My device id number
My problem was resolved.
The problem were two brokers(iotagent-Mqtt and Mosquitto Server) running on same port 1883.
Regards Dojot team.
Yesterday, everything was working fine, but then I tried the same command, and it didn't work.
The command is the same from the tutorial:
mosquitto_pub -t /devices/thermometers -i "admin:c800df" -m '{"temperatura" : 60}'
The
temperatura
instead oftemperature
is not a typo.