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

Unable to add a simulated sensor #752

Open
sudhirkshirsagar opened this issue Mar 18, 2021 · 11 comments
Open

Unable to add a simulated sensor #752

sudhirkshirsagar opened this issue Mar 18, 2021 · 11 comments

Comments

@sudhirkshirsagar
Copy link

I was able to build and run on Xeon with Ubuntu 18.04 using the git master. The UI shows the map and one office with five cameras. When I click on the camera when it is green, I see the traffic video (sometimes if I am lucky). I don't see any of the simulated sensors and and the simulated sensor service. I am using docker swarm. Could I get a complete cheat-sheet on how to build that simulated sensors and how to add them? The existing readme files did not provide enough info.

@xwu2git
Copy link
Collaborator

xwu2git commented Mar 18, 2021

By default, the sample configuration includes three offices and each office configures 8 cameras.

@sudhirkshirsagar
Copy link
Author

sudhirkshirsagar commented Mar 19, 2021 via email

@sudhirkshirsagar
Copy link
Author

I had gone through the wiki's. Unfortunately if my base (default) deployment itself is not working correctly, then extending it is even more difficult. For example, I just restarted the swarm and get the same UI with just one office. But got the following in the command window.
gqc@dell2950:~/Smart-City-Sample/build$ make start_docker_swarm
Built target build_sensor_info_m4
bash into new container...smtc_certificate
Generating a 4096 bit RSA private key
..................................++
.........................................++
writing new private key to '/home/docker/self.key'

You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.

Country Name (2 letter code) [XX]:State or Province Name (full name) []:Locality Name (eg, city) [Default City]:Organization Name (eg, company) [Default Company Ltd]:Organizational Unit Name (eg, section) []:Common Name (eg, your name or your server's hostname) []:Email Address []:Built target sign_smtc_certificate
Generating docker-compose.yml
Built target build_docker_swarm
failed to update secret smtc_self_key: Error response from daemon: rpc error: code = InvalidArgument desc = only updates to Labels are allowed
deployment/docker-swarm/CMakeFiles/start_docker_swarm.dir/build.make:57: recipe for target 'deployment/docker-swarm/CMakeFiles/start_docker_swarm' failed
make[3]: *** [deployment/docker-swarm/CMakeFiles/start_docker_swarm] Error 1
CMakeFiles/Makefile2:305: recipe for target 'deployment/docker-swarm/CMakeFiles/start_docker_swarm.dir/all' failed
make[2]: *** [deployment/docker-swarm/CMakeFiles/start_docker_swarm.dir/all] Error 2
CMakeFiles/Makefile2:312: recipe for target 'deployment/docker-swarm/CMakeFiles/start_docker_swarm.dir/rule' failed
make[1]: *** [deployment/docker-swarm/CMakeFiles/start_docker_swarm.dir/rule] Error 2
Makefile:183: recipe for target 'start_docker_swarm' failed
make: *** [start_docker_swarm] Error 2
gqc@dell2950:~/Smart-City-Sample/build$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
1db7cd4deb7d smtc_db_init:latest "/home/db-init.py" About a minute ago Up About a minute smtc_traffic_office1_db_init.1.3ak9oxtdtq45tvewbjyxg8tqe007cab034a61 smtc_storage_manager:latest "/home/storage.py" About a minute ago Up 57 seconds smtc_cloud_storage.1.t1dpd0nympwfy1q1dab5iqc2h
0af8ee1c46d8 smtc_storage_manager:latest "/home/storage.py" About a minute ago Up 56 seconds smtc_traffic_office1_storage.1.2gowwttc0k4n3jqfbvy3qrfcz37b1325ceb0d eclipse-mosquitto:1.5.8 "/docker-entrypoint.…" About a minute ago Up About a minute 1883/tcp smtc_traffic_office1_mqtt.1.71tj8hm7nrzeaky3opes8mz46
81424e54af2a smtc_onvif_discovery:latest "/home/discover.py" About a minute ago Up About a minute smtc_traffic_office1_camera_discovery.1.kk14lw97aygtx1e5szlbfdjlt
c41e6be4f901 smtc_analytics_object_xeon_gst:latest "/home/detect-object…" About a minute ago Up 59 seconds smtc_traffic_office1_analytics_traffic.1.6evrv0g5c8ilwazb5axe7dh99
13fbf9f0c9c1 smtc_api_gateway:latest "/home/gateway.py" About a minute ago Up About a minute smtc_cloud_gateway.1.no1r94mp0ggc3isltnu4sypu4
0bcac3e7e62d smtc_smart_upload:latest "/home/smart-upload.…" About a minute ago Up 53 seconds smtc_traffic_office1_smart_upload.1.s9kw80cft8a1xlepwzeats4sq
4206a4ccd277 smtc_api_gateway:latest "/home/gateway.py" About a minute ago Up About a minute smtc_traffic_office1_gateway.1.yznjcuo641tgqe0d1ap2hol4a66e529c8bca8 smtc_mqtt2db:latest "/home/mqtt2db.py" About a minute ago Up 58 seconds smtc_traffic_office1_mqtt2db.1.wtct1yybukc6f56ocdoblsqdiff011f033ec1 smtc_sensor_webrtc:latest "/bin/bash -c 'servi…" About a minute ago Up 57 seconds 0.0.0.0:10001-10010->10001-10010/udp smtc_traffic_office1_webrtc.1.03fqptlljaugggsdvb68259t6
7a9c9a8fe1dd smtc_sensor_simulation:latest "/home/simulate.py" About a minute ago Up About a minute smtc_traffic_office1_simulated_cameras.1.ui8l188ixawfkkebq69xa34td
63b6e1096a82 smtc_web_cloud:latest "/home/webc.py" About a minute ago Up About a minute 0.0.0.0:443->8443/tcp smtc_cloud_web.1.jlj816q1ww1ln9qs0kwbmjpqr
ab1c3de6926d smtc_alert:latest "/home/alert.py" About a minute ago Up About a minute smtc_traffic_office1_alert.1.m2jxc9wlbkuhfowgcvgoc8q4x
c8b2d2c56daa docker.elastic.co/elasticsearch/elasticsearch-oss:6.8.13 "/usr/local/bin/dock…" About a minute ago Up About a minute 9200/tcp, 9300/tcp smtc_db.1.lqelk1j2yyhmdfwj2

@xwu2git
Copy link
Collaborator

xwu2git commented Mar 19, 2021

Did you stop it first by make stop_docker_swarm?
Looks like you are starting on top of a previous run.

@sudhirkshirsagar
Copy link
Author

sudhirkshirsagar commented Mar 19, 2021 via email

@xwu2git
Copy link
Collaborator

xwu2git commented Mar 20, 2021

Let's restart. How many nodes are in your swarm? Do you have firewall in between your manager and your swarm nodes?
Please share your logs of the camera service, the discovery service and the analytics service.
You can see those services by docker stack services smtc and then docker service logs -f <name>.

@sudhirkshirsagar
Copy link
Author

sudhirkshirsagar commented Mar 20, 2021 via email

@sudhirkshirsagar
Copy link
Author

sudhirkshirsagar commented Mar 20, 2021 via email

@xwu2git
Copy link
Collaborator

xwu2git commented Mar 20, 2021

Your camera simulation and discovery work as expected. However, the analytics service does not work. Could you rebuild the analytics image? This is the image under the analytics folder.

@xwu2git
Copy link
Collaborator

xwu2git commented Mar 22, 2021

@nnshah1 , can you check what error message means?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants