1

I have managed to update ContextBroker to version 1.10. but I have a series of doubts:

I am using this documentation:

http://fiware-orion.readthedocs.io/en/1.10.0/user/walkthrough_apiv2/index.html#introduction

and the commands do not work

  1. How can I start or restart the contextBroker service ?, with this instruction it does not work:

    /etc/init.d/contextBroker start
    
  2. Where is the contextBroker information hosted?

  3. Where can I see the log? It is not in this directory:

    /tmp/contextBroker.log
    
fgalan
  • 11,732
  • 9
  • 46
  • 89
Manolait
  • 353
  • 2
  • 11

2 Answers2

1

It is normal that the commands in http://fiware-orion.readthedocs.io/en/1.10.0/user/walkthrough_apiv2/index.html#introduction doesn't work if Orion is not running (it seems so by the questions you are asking ;)

Note the /etc/init.d/contextBroker start only works if you have installed Orion from the RPM. If you have installed from sources, you should use contextBroker command directly, as described in this piece of documentation.

First, check that Context Broker is properly installed running:

contextBroker --version

Next, to run Context Broker in foreground in a terminal, just use:

contextBroker -fg

You can also run in background is you ommit -fg switch (in which cases you will need to use kill command to stop the ContextBroker process):

contextBroker

Whichever the option chosen to start ContextBroker you can check it is working with (in the same host where ContextBroker runs):

curl localhost:1026/version

Which regards to log file the default location is /tmp/contextBroker.log. It may happen that the file doesn't exist if ContextBroker has not traced yet anything. Use -logLevel to increase log level:

contextBroker -fg -logLevel INFO

and try again with the curl localhost:1026/version.

Which regards to where is the Context Broker information hosted, Context Broker uses a MongoDB database instance. By default it assumes that the DB is located in the same host where Orion runs, but it can be changed using -dbhost CLI parameter. Have a look to the aforementioned documentation for information about this (and other) CLI parameters.

Note that failing in connecting to MongoDB instance is one of the causes that may cause Context Broker not starting. You would get an error message like this in that case:

Database Startup Error (cannot connect to mongo - doing 100 retries with a 1000 microsecond interval)
fgalan
  • 11,732
  • 9
  • 46
  • 89
1

In order to clarify this for the community, this question is a follow up to this one.

  1. How can I start or restart the contextBroker service ?, with this instruction it does not work: /etc/init.d/contextBroker start

You can't start Orion using this command if your installation method was source build. You can however, create your own custom systemd service for Orion. You can find a lot of information online on how to do this.

Where is the contextBroker information hosted?

Can you please clarify this in the comments?

Where can I see the log? It is not in this directory: /tmp/contextBroker.log

The contents of your /tmp folder might have been cleared by your OS. You should be able to configure the log directory of Orion Context Broker by using the logDir command option on startup but looking at the source code, this usage might be obselete.

Maybe @fgalan can provide more information on this and later we can update this answer.

McMutton
  • 905
  • 13
  • 25