• Recent
    • Tags
    • Popular
    • Register
    • Login

    Please Note This forum exists for community support for the Mango product family and the Radix IoT Platform. Although Radix IoT employees participate in this forum from time to time, there is no guarantee of a response to anything posted here, nor can Radix IoT, LLC guarantee the accuracy of any information expressed or conveyed. Specific project questions from customers with active support contracts are asked to send requests to support@radixiot.com.

    Radix IoT Website Mango 3 Documentation Website Mango 4 Documentation Website Mango 5 Documentation Website

    Event Handlers are lost after upgrade to 2.8.4

    User help
    3
    21
    10.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • phildunlapP
      phildunlap
      last edited by phildunlap

      Hmm. This would have been the H2 backup from before the upgrade?

      I would wager if you search for the text "INSERT INTO PUBLIC.POINTEVENTDETECTORS" in your backup you either won't find anything, or it will have an empty list of detectors.

      If instead searching the file for "INSERT INTO PUBLIC.EVENTDETECTORS" finds something then you know you have a backup from after the upgrade.

      1 Reply Last reply Reply Quote 0
      • M
        mihairosu
        last edited by

        Oh, no this is an H2 AFTER the upgrade. I don't have any backups from before the upgrade. I got a 10 file limit, daily backup going.

        What do you suggest I do?

        1 Reply Last reply Reply Quote 0
        • phildunlapP
          phildunlap
          last edited by phildunlap

          As I recall from the other thread, your XIDs are very meaningful. So I'd try some steps somewhat like this,

          1. Accept our sincere apology this has happened.
          2. SQL: SELECT id, xid, alias, eventTypeRef2 FROM eventHandlers WHERE eventTypeName='DATA_POINT';
          3. Copy the table from (1) into a notepad
          4. SQL: SELECT id, xid FROM eventDetectors WHERE sourceTypeName='DATA_POINT' ORDER BY ID DESC;
          5. For each event detector in that list, see if the XID(s) for the handler(s) can be resolved for the XID for the detector. If someone is unlike you and instead has random XIDs, this could be nearly impossible. For each match, run UPDATE eventHandlers SET eventTypeRef2=[your matched detector id here] WHERE xid='[the handler xid]';
          1 Reply Last reply Reply Quote 0
          • M
            mihairosu
            last edited by

            1. No worries, it happens.

            Sounds good. I'll do that at some point.

            1 Reply Last reply Reply Quote 0
            • phildunlapP
              phildunlap
              last edited by

              One could also reimport their eventHandlers JSON from a backup prior to the upgrade (adding more solutions for completeness).

              1 Reply Last reply Reply Quote 0
              • M
                mihairosu
                last edited by mihairosu

                I tried

                SELECT id, xid, alias, typeref2 FROM eventHandlers WHERE eventTypeName='DATA_POINT';
                

                in the SQL console with Submit Query and this is the error I'm getting:

                org.h2.jdbc.JdbcSQLException: Column "TYPEREF2" not found; SQL statement: SELECT id, xid, alias, typeref2 FROM eventHandlers WHERE eventTypeName='DATA_POINT'; [42122-181]
                
                
                1 Reply Last reply Reply Quote 0
                • phildunlapP
                  phildunlap
                  last edited by

                  Yes, my mistake. It should have been "eventTypeRef2". I will update those posts.

                  1 Reply Last reply Reply Quote 0
                  • M
                    mihairosu
                    last edited by

                    I just wanted to double check that I understood correctly before I go ahead. Is this right?

                    0_1487021383769_Fixing Event Notifications.png

                    1 Reply Last reply Reply Quote 0
                    • phildunlapP
                      phildunlap
                      last edited by phildunlap

                      Very useful image!

                      Not quite, the square brackets don't belong. Delete them and it looks good.

                      You may wish to restart Mango when you're done.

                      1 Reply Last reply Reply Quote 0
                      • M
                        mihairosu
                        last edited by

                        Everything looks good now!

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post