• 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

    Unable to purge events

    Mango Automation general Discussion
    6
    16
    3.2k
    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.
    • M
      mseverin
      last edited by

      Thanks for all the suggestions.

      I have started Mango in SAFE mode (verified by looking in the ma.log file but I still can't get logged in.

      I changed the env.properties file to set set db.web.start=true and tried to run the H2 web Console using web-console.sh -webAllowOthers but I get the message "Web Console server running at http://127.0.1.1:8081 (only local connections).

      I thought the flag -webAllowOthers would let me connect to the Console from my laptop.

      Is there something I'm missing in order to run the H2 database manager?

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

        I'm really stuck. The events table has over 100,000 lines in it and even running in safe mode I am unable to purge the events.

        I really need a way to access the H2 database outside of Mango so I can manually purge the table.

        Mango is running on a Linux box with command line only.

        Any help would be appreciated as Mango has been down for over a week now.

        1 Reply Last reply Reply Quote 0
        • CraigWebC
          CraigWeb
          last edited by CraigWeb

          Hi Mseverin

          Edit:

          By the looks, you are running the script with an argument. What you need to do is edit the script and add -webAllowOthers to the last line of code.

          M 1 Reply Last reply Reply Quote 0
          • M
            mseverin @CraigWeb
            last edited by

            @craigweb

            Hello,

            Yes, I was running it like ./h2-web-console.sh - webAllowOthers.

            I modified the h2-web-console.sh and added -webAllowOthers to the end of the file but I still get the same result...

            (Web Console server running at http://127.0.1.1:8081 (only local connections).

            1 Reply Last reply Reply Quote 0
            • CraigWebC
              CraigWeb
              last edited by

              I just edited my h2-web-console.sh file as such:
              java -cp ../lib/h2*.jar org.h2.tools.Server -webAllowOthers -web -webPort "$H2_PORT" -baseDir "$MA_HOME"/
              Save and run it and get the following :
              Web Console server running at http://192.168.0.251:8081 (others can connect)

              M 1 Reply Last reply Reply Quote 0
              • M
                mseverin @CraigWeb
                last edited by

                When I modified my h2-web-console.sh like yours, I can now get to the Login screen but then I get

                0_1579029431362_37db229b-e085-4b7d-b945-8c1c8b891598-image.png

                1 Reply Last reply Reply Quote 0
                • JoelHaggarJ
                  JoelHaggar
                  last edited by

                  You have the incorrect JDBC URL and user and pass. Please check here for the correct settings https://help.infiniteautomation.com/about-the-h2-database

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mseverin @JoelHaggar
                    last edited by

                    @joelhaggar

                    I can't connect the same as the example because the database is on a different server from where I'm running the web browser so I get the message "Database /opt/mango/mah2 not found". However if I modify the file to -tcp -tcpAllowOthers as the help link suggests, then I just get "This page isn't working.

                    1 Reply Last reply Reply Quote 0
                    • terrypackerT
                      terrypacker
                      last edited by

                      @mseverin the input on the page expects the local path to the db corresponding to the machine you are accessing. In later versions of Mango this is mah2.199, check the filename of the h2 dB file on your Mango machine and use the full path to the h2 file minus the .db extension. I don’t think you want the tcp url, use the file:// style.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        mseverin @terrypacker
                        last edited by

                        @terrypacker

                        Thanks for the reply.

                        I have finally been able to connect.

                        The solution was to change my h2-web-console.sh back to -webAllowOthers

                        and my JDBC URL to jdbc:h2:/opt/mango/databases/mah2.199

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