[Fiware-tech-help] Queries related to SmartCity Project using Fiware

Krishan Babbar KB00449283 at TechMahindra.com
Wed Jan 24 13:14:09 CET 2018


+ Jose and Himanshu,

Jose, kindly guide.

Thanks & Regards,
Krishan Babbar
Technical Architect
Manufacturing | Tech Mahindra
Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA
* Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996




============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
===========================================================================================================================

From: Krishan Babbar
Sent: Tuesday, January 23, 2018 10:10 PM
To: 'Juanjo Hierro' <juanjose.hierro at fiware.org>; 'fiware-tech-help at lists.fiware.org' <fiware-tech-help at lists.fiware.org>
Cc: Srirangan C <csrirang at TechMahindra.com>; Sanjeev.Kumar <Sanjeev.Kumar9 at TechMahindra.com>
Subject: RE: [Fiware-tech-help] Queries related to SmartCity Project using Fiware

Hi Juanjo,

I am stuck and need your help. I have following Docker containers.

ubuntu at ubuntu16:~$ docker ps
CONTAINER ID        IMAGE                COMMAND                  CREATED             STATUS              PORTS                                            NAMES
0d342bf05ee8        fiware/iotagent-ul   "/bin/sh -c 'bin/iot..."   42 minutes ago      Up 42 minutes       0.0.0.0:4041->4041/tcp, 0.0.0.0:7896->7896/tcp   festive_torvalds
9d7ba0df6ea1        ansi/mosquitto       "/usr/local/sbin/mos..."   About an hour ago   Up About an hour    0.0.0.0:1883->1883/tcp                           fiware_mosquitto_1
043e141290f5        fiware/orion         "/usr/bin/contextBro..."   About an hour ago   Up About an hour    0.0.0.0:1026->1026/tcp                           fiware_orion_1
0edcd40bfc66        mongo:3.4            "docker-entrypoint.s..."   About an hour ago   Up 45 minutes       27017/tcp                                        fiware_mongo_1
ubuntu at ubuntu16:~$

I am unable to create/get devices. In logs I found following errors.

time=2018-01-23T15:47:32.722Z | lvl=ERROR | corr=fc7b2b20-e109-410e-b868-d2ad76f2e040 | trans=fc7b2b20-e109-410e-b868-d2ad76f2e040 | op=IoTAgentNGSI.DbConn | srv=n/a | subsrv=n/a | msg=MONGODB-001: Error trying to connect to MongoDB: MongoError: failed to connect to server [mongo:27017] on first connect | comp=IoTAgent

time=2018-01-23T15:51:14.684Z | lvl=DEBUG | corr=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | trans=50b1da63-cd21-4683-a8ab-3963e9b25cb6 | op=IoTAgentNGSI.GenericMiddlewares | srv=/ | subsrv=/TechM/IoTRnD | msg=Error [TypeError] handling request: Cannot read property 'findOne' of undefined | comp=IoTAgent

time=2018-01-23T15:53:20.125Z | lvl=DEBUG | corr=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | trans=e9aa6669-9d4d-40bf-bed8-1a5f8c501e0d | op=IoTAgentNGSI.GenericMiddlewares | srv=howtoService | subsrv=/howto | msg=Error [TypeError] handling request: Cannot read property 'find' of undefined | comp=IoTAgent

I followed below given steps.

1.       First I created Orion, Mongo and mosquitto containers using below given docker-compose.yml script.
# Note that mongo container is started before Orion, as Orion needs it
# as dependency and reserve the order has been found problematic in some
# low resource hosts
mongo:
  image: mongo:3.4
  command: --nojournal

orion:
  image: fiware/orion
  links:
    - mongo
  ports:
    - "1026:1026"
  command: -dbhost mongo
mosquitto:
    image: ansi/mosquitto
    ports:
        - "1883:1883"
    expose:
        - "1883"


2.       Then I used below command to install Ultra Light IoT Agent.
docker run -d --link fiware_orion_1 --link fiware_mosquitto_1 --link fiware_mongo_1 -p 7896:7896 -p 4041:4041 fiware/iotagent-ul

Kindly guide what am I doing wrong? It seems that IoTAgent could not connect to Mongo DB but I am not sure what to change, where to change and how? Just FYI, I have Docker Containers on single Ubuntu 16.

Thanks & Regards,
Krishan Babbar
Technical Architect
Manufacturing | Tech Mahindra
Rajiv Gandhi Chandigarh Technology Park, Plot No. 23, Phase 2, Kishangarh, Chandigarh 160101, INDIA
* Office: +91 172 666 8400 Ext. 8352 | Mobile: +91 946 303 0996




============================================================================================================================
Disclaimer: This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
===========================================================================================================================

From: Juanjo Hierro [mailto:juanjose.hierro at fiware.org]
Sent: Thursday, January 18, 2018 7:54 PM
To: Krishan Babbar <KB00449283 at TechMahindra.com<mailto:KB00449283 at TechMahindra.com>>; 'fiware-tech-help at lists.fiware.org' <fiware-tech-help at lists.fiware.org<mailto:fiware-tech-help at lists.fiware.org>>
Cc: Srirangan C <csrirang at TechMahindra.com<mailto:csrirang at TechMahindra.com>>; Sanjeev.Kumar <Sanjeev.Kumar9 at TechMahindra.com<mailto:Sanjeev.Kumar9 at TechMahindra.com>>
Subject: Re: [Fiware-tech-help] Queries related to SmartCity Project using Fiware


Dear Krishan,

  Thank you for your interest in FIWARE.

  I hope some of my colleagues will come with a detailed answer regarding the issue with FIWARE Lab credentials you raised.   I just pretend here to respond some of the other questions.

  You don't need to deploy all the GEs you list in order to setup a complete operational "Powered by FIWARE" IoT-enabled platform architecture.

  It should be enough to have:

  *   Orion Context Broker (this is the core component you are required to have in a platform to actually claim it is "Powered by FIWARE")
  *   Backend Device Management IDAS - here you have two options:
     *   either some of the already existing IDAS IoT Agents works for your scenarios
     *   or you have to develop a new IoT Agent using the IDAS Framework for development of IDAS IoT Agents

  With this approach, it should be enough.

  Of course, there are other components of FIWARE you may want to use to configure a more complete "Powered by FIWARE" Smart City platform.  As an example, I mention here some examples:

  *   CKAN extensions to support right-time open data: these are a number of plug-ins for CKAN (most widely open data publication platform adopted by many cities worldwide and particularly in Europe) enabling the publication of query resources on the Orion Context Broker as right-time open data resources.
  *   Cygnus, in order to transfer history of Context Data managed by Orion into multiple data sinks (e.g., a Hadoop BigData system to perform bigdata analysis on Context history).
  *   Perseo, in order to perform Complex Event Processing on top of Context data
  *   etc

  If you wish, we can setup a confcall so that we can explain to you the reference architecture for "Powered by FIWARE" Smart City platforms and opportunities for collaboration.

  Hope it helps,

  Cheers,

  Juanjo

On 18/01/2018 10:33, Krishan Babbar wrote:
Hi All,

I am working with FiWare to setup a Smart City project.
As per my understanding so far, we need following GEs (considering minimum requirement)
- Orion Context Broker
- IoT Broker
- Backend Device Management - IDAS
- IoT Agent - having python script (At my local machine)

I have following queries so far.
- Do let me know what other GEs I need to install?
- Can we install all required GEs on same instance (On Fiware cloud)?
- Do let me know if I need to follow any particular steps and sequence?
- How GEs interconnect with each other? Is there any configuration? E.g. How IoT Broker and Orinon Context Broker communicate?
- I am following with https://fiware-orion.readthedocs.io/en/develop/quick_start_guide/index.html. Here what would be the credentials and URL to get the oAUTH token? I am using following with my Fiware LAB account credentials and these are not working.
RESP=`curl -s -d "{\"username\": \"$USER\", \"password\":\"$PASSWORD\"}" -H "Content-type: application/json" https://orion.lab.fiware.org/token`

- After installation of all GEs, I will do following steps. Please correct if I am wrong.
                - Using IoT Agent python scripts, create required Entities/Models.
                - Update attributes of the entity
                - Fetch the entities
                - Subscriptions


Thanks & Regards,
Krishan Babbar

============================================================================================================================
Disclaimer:  This message and the information contained herein is proprietary and confidential and subject to the Tech Mahindra policy statement, you may review the policy at http://www.techmahindra.com/Disclaimer.html externally http://tim.techmahindra.com/tim/disclaimer.html internally within TechMahindra.
============================================================================================================================



__________________________________________________________________________________________



You can get more information about our cookies and privacy policies on the following links:

- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/FIWARE_Privacy_Policy

- http://forge.fiware.org/plugins/mediawiki/wiki/fiware/index.php/Cookies_Policy_FIWARE



Fiware-tech-help mailing list

Fiware-tech-help at lists.fiware.org<mailto:Fiware-tech-help at lists.fiware.org>

https://lists.fiware.org/listinfo/fiware-tech-help



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.fiware.org/private/fiware-tech-help/attachments/20180124/b7bfd953/attachment-0001.html>


More information about the Fiware-tech-help mailing list

You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy   Cookies policy