Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-9271

[fiware-stackoverflow] I cant start context broker due to "error starting REST interface"

    Details

      Description

      Created question in FIWARE Q/A platform on 21-04-2015 at 10:04
      Please, ANSWER this question AT https://stackoverflow.com/questions/29766900/i-cant-start-context-broker-due-to-error-starting-rest-interface

      Question:
      I cant start context broker due to "error starting REST interface"

      Description:
      When I enter the following command:

      /etc/init.d/contextBroker start

      I get the following output:

      Starting contextBroker... cat: /var/run/contextBroker/contextBroker.pid: No such file or directory
      pidfile not found [FAILED]

      I have two machines where I am practising with context broker and I havent touched the second one in days after I succesfully installed it and managed to receive a post message from a remote weather station.
      I see that the directory /var/run/contextBroker/ is actually empty

      What should I do to fix this now? reinstal context broker or?
      So is this somehow my fault and how do I prevent in the future? I dont want this happening when my app goes live.

      EDIT1: the orion version is 0.20.0

      EDIT2: I just reinstalled contextBroker and I get the same problem. What are exectly the contents of that directory? Could I maybe just create the files inside?

      EDIT3: Since running contextBroker as a system service still yields an unsuccessful start, I also attempted to run it symply by typing:

      contextBroker in the command line, after which I get the following response

      INFO@14:03:03 contextBroker.cpp[1346]: Orion Context Broker is running
      [root@localhost DevF12]# INFO@14:03:03 MongoGlobal.cpp[181]: Successful connection to database
      INFO@14:03:03 contextBroker.cpp[1157]: Connected to mongo at localhost:orion
      INFO@14:03:03 MongoGlobal.cpp[499]: Database Operation Successful (

      { conditions.type: "ONTIMEINTERVAL" }

      )
      FATAL@14:03:03 rest.cpp[1013]: Fatal Error (error starting REST interface)

      EDIT4: Ok so I tried ps aux | grep contextBroker and the result is:

      494 2196 0.0 7.0 688696 135116 ? Ssl Apr21 0:02 /usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/run/contextBroker/contextBroker.pid -dbhost localhost -db orion
      root 7299 0.0 6.9 621052 134440 ? Ssl 04:21 0:00 contextBroker -port 1028
      root 8870 0.0 0.0 103256 848 pts/0 S+ 08:51 0:00 grep contextBroker

      but there simply isnt anything in /var/run/contextBroker/
      Should I put contextBroker.pid by myself? and if so, what should the contents be?

      EDIT5: I just ran netstat -ntlpd | grep 1026 and the output is:

      tcp 0 0 0.0.0.0:1026 0.0.0.0:* LISTEN 2196/contextBroker
      tcp 0 0 :::1026 :::* LISTEN 2196/contextBroker

      So I guess nothing else but contextBroker is listening?

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open In Progress In Progress
        2h 59m 1 Backlog Manager 27/May/17 9:04 PM
        In Progress In Progress Answered Answered
        2h 59m 1 Backlog Manager 28/May/17 12:04 AM
        Answered Answered Closed Closed
        1d 7h 54m 1 Fernando Lopez 29/May/17 7:58 AM
        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        Resolution Done [ 10000 ]
        Status Answered [ 10104 ] Closed [ 6 ]
        fla Fernando Lopez made changes -
        HD-Enabler Orion [ 10875 ]
        Description
        Created question in FIWARE Q/A platform on 21-04-2015 at 10:04
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/29766900/i-cant-start-context-broker-due-to-error-starting-rest-interface


        +Question:+
        I cant start context broker due to "error starting REST interface"

        +Description:+
        When I enter the following command:

        /etc/init.d/contextBroker start


        I get the following output:

        Starting contextBroker... cat: /var/run/contextBroker/contextBroker.pid: No such file or directory
        pidfile not found [FAILED]


        I have two machines where I am practising with context broker and I havent touched the second one in days after I succesfully installed it and managed to receive a post message from a remote weather station.
        I see that the directory /var/run/contextBroker/ is actually empty

        What should I do to fix this now? reinstal context broker or?
        So is this somehow my fault and how do I prevent in the future? I dont want this happening when my app goes live.

        EDIT1: the orion version is 0.20.0

        EDIT2: I just reinstalled contextBroker and I get the same problem. What are exectly the contents of that directory? Could I maybe just create the files inside?

        EDIT3: Since running contextBroker as a system service still yields an unsuccessful start, I also attempted to run it symply by typing:

        contextBroker in the command line, after which I get the following response

        INFO@14:03:03 contextBroker.cpp[1346]: Orion Context Broker is running
        [root@localhost DevF12]# INFO@14:03:03 MongoGlobal.cpp[181]: Successful connection to database
        INFO@14:03:03 contextBroker.cpp[1157]: Connected to mongo at localhost:orion
        INFO@14:03:03 MongoGlobal.cpp[499]: Database Operation Successful ({ conditions.type: "ONTIMEINTERVAL" })
        FATAL@14:03:03 rest.cpp[1013]: Fatal Error (error starting REST interface)


        EDIT4: Ok so I tried ps aux | grep contextBroker and the result is:

        494 2196 0.0 7.0 688696 135116 ? Ssl Apr21 0:02 /usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/run/contextBroker/contextBroker.pid -dbhost localhost -db orion
        root 7299 0.0 6.9 621052 134440 ? Ssl 04:21 0:00 contextBroker -port 1028
        root 8870 0.0 0.0 103256 848 pts/0 S+ 08:51 0:00 grep contextBroker


        but there simply isnt anything in /var/run/contextBroker/
        Should I put contextBroker.pid by myself? and if so, what should the contents be?

        EDIT5: I just ran netstat -ntlpd | grep 1026 and the output is:

        tcp 0 0 0.0.0.0:1026 0.0.0.0:* LISTEN 2196/contextBroker
        tcp 0 0 :::1026 :::* LISTEN 2196/contextBroker


        So I guess nothing else but contextBroker is listening?
        Created question in FIWARE Q/A platform on 21-04-2015 at 10:04
        {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/29766900/i-cant-start-context-broker-due-to-error-starting-rest-interface


        +Question:+
        I cant start context broker due to "error starting REST interface"

        +Description:+
        When I enter the following command:

        /etc/init.d/contextBroker start


        I get the following output:

        Starting contextBroker... cat: /var/run/contextBroker/contextBroker.pid: No such file or directory
        pidfile not found [FAILED]


        I have two machines where I am practising with context broker and I havent touched the second one in days after I succesfully installed it and managed to receive a post message from a remote weather station.
        I see that the directory /var/run/contextBroker/ is actually empty

        What should I do to fix this now? reinstal context broker or?
        So is this somehow my fault and how do I prevent in the future? I dont want this happening when my app goes live.

        EDIT1: the orion version is 0.20.0

        EDIT2: I just reinstalled contextBroker and I get the same problem. What are exectly the contents of that directory? Could I maybe just create the files inside?

        EDIT3: Since running contextBroker as a system service still yields an unsuccessful start, I also attempted to run it symply by typing:

        contextBroker in the command line, after which I get the following response

        INFO@14:03:03 contextBroker.cpp[1346]: Orion Context Broker is running
        [root@localhost DevF12]# INFO@14:03:03 MongoGlobal.cpp[181]: Successful connection to database
        INFO@14:03:03 contextBroker.cpp[1157]: Connected to mongo at localhost:orion
        INFO@14:03:03 MongoGlobal.cpp[499]: Database Operation Successful ({ conditions.type: "ONTIMEINTERVAL" })
        FATAL@14:03:03 rest.cpp[1013]: Fatal Error (error starting REST interface)


        EDIT4: Ok so I tried ps aux | grep contextBroker and the result is:

        494 2196 0.0 7.0 688696 135116 ? Ssl Apr21 0:02 /usr/bin/contextBroker -port 1026 -logDir /var/log/contextBroker -pidpath /var/run/contextBroker/contextBroker.pid -dbhost localhost -db orion
        root 7299 0.0 6.9 621052 134440 ? Ssl 04:21 0:00 contextBroker -port 1028
        root 8870 0.0 0.0 103256 848 pts/0 S+ 08:51 0:00 grep contextBroker


        but there simply isnt anything in /var/run/contextBroker/
        Should I put contextBroker.pid by myself? and if so, what should the contents be?

        EDIT5: I just ran netstat -ntlpd | grep 1026 and the output is:

        tcp 0 0 0.0.0.0:1026 0.0.0.0:* LISTEN 2196/contextBroker
        tcp 0 0 :::1026 :::* LISTEN 2196/contextBroker


        So I guess nothing else but contextBroker is listening?
        HD-Chapter Data [ 10838 ]
        fla Fernando Lopez made changes -
        Assignee Leandro Guillén [ leandro.guillen ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-28 00:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-28 00:05|UPDATED status: transition Answered| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status In Progress [ 3 ] Answered [ 10104 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-27 21:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-27 21:05|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        Hide
        backlogmanager Backlog Manager added a comment -

        2017-05-27 18:05|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2017-05-27 18:05|CREATED monitor | # answers= 1, accepted answer= True
        backlogmanager Backlog Manager created issue -

          People

          • Assignee:
            leandroguillen Leandro Guillén
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: