• 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

    MA fresh install works with Derby but not with mysql

    Mango Automation Installation
    3
    5
    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.
    • P
      PCM
      last edited by

      $ sudo start mango
      mango start/running, process 29497

      $ cat /opt/mango/logs/ma.err
      Exception in thread "pool-1-thread-1" java.lang.NullPointerException
      at com.serotonin.m2m2.CoreLicenseDefinition$2.run(CoreLicenseDefinition.java:137)
      at com.serotonin.timer.sync.Synchronizer$TaskWrapper.run(Synchronizer.java:155)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
      at java.lang.Thread.run(Thread.java:679)

      $ **sudo status mango **
      mango stop/waiting

      I only tried Derby as a test. I need it working with mysql.
      Mango did create 36 tables under mysql, so it does have the permissions from the GRANT ALL command:

      mysql> use mango
      Reading table information for completion of table and column names
      You can turn off this feature to get a quicker startup with -A

      Database changed
      mysql> **show tables;
      **

      +-------------------------------+
      | Tables_in_mango               |
      +-------------------------------+
      | compoundEventDetectors        |
      | dataPointUsers                |
      | dataPoints                    |
      | dataSourceUsers               |
      | dataSources                   |
      | eventHandlers                 |
      | events                        |
      | graphicalViewUsers            |
      | graphicalViews                |
      | mailingListInactive           |
      | mailingListMembers            |
      | mailingLists                  |
      | maintenanceEvents             |
      | mangoViewUsers                |
      | mangoViews                    |
      | pointEventDetectors           |
      | pointHierarchy                |
      | pointLinks                    |
      | pointValueAnnotations         |
      | pointValues                   |
      | publishers                    |
      | reportInstanceData            |
      | reportInstanceDataAnnotations |
      | reportInstanceEvents          |
      | reportInstancePoints          |
      | reportInstanceUserComments    |
      | reportInstances               |
      | reports                       |
      | scheduledEvents               |
      | systemSettings                |
      | userComments                  |
      | userEvents                    |
      | users                         |
      | watchListPoints               |
      | watchListUsers                |
      | watchLists                    |
      +-------------------------------+
      36 rows in set (0.00 sec)
      
      

      mysql>

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

        I was able to duplicate this error. I normally create the mango database and user through webmin or phpmyadmin and never had a problem.

        This time I created the user on the mysql terminal with these commands:

        mysql -u root -p
        mysql> CREATE DATABASE mangodb;
        GRANT ALL ON mangodb.* TO mangodb@localhost IDENTIFIED BY ' password';

        When I tried to start Mango I got the same error as you.

        I then created a second database user and permissions through webmin and it worked as it always does. In webmin I grant all permissions to the user and the database for the user.

        There may be a correct mysql command to use for this but I'm not experience with mysql so I'll leave that up to someone else to figure out.

        Joel.

        1 Reply Last reply Reply Quote 0
        • P
          PCM
          last edited by

          Hi Joel,

          Thanks very much for recreating the issue. At the moment I only have ssh access, so I can't run phpmyadmin.
          Did you also enter the CREATE command as shown on line 14?

          anyuser$ mysql --user=root -pMyrootSQLpasswd # Log into MySQL monitor
          Welcome to the MySQL monitor.
          mysql> create schema mango; # create a schema/database for Mango
          mysql> show schemas; # show schemas for this MySQL instance
          +--------------------+
          | Database           |
          +--------------------+
          | information_schema |
          | mango              |
          | mysql              |
          | performance_schema |
          | test               |
          +--------------------+
          mysql> CREATE USER 'mangoUser'@'localhost' IDENTIFIED BY 'passwdformango';# Create a username & password for Mango:
          Query OK, 0 rows affected (0.00 sec)
          mysql> select user from mysql.user; # view user names
          +------------------+
          | user             |
          +------------------+
          | root             |
          | root             |
          |                  |
          | debian-sys-maint |
          | mangoUser        |
          | root             |
          |                  |
          | root             |
          +------------------+
          mysql> GRANT ALL PRIVILEGES ON mango.* to 'mangoUser'@'localhost' WITH GRANT OPTION;
          Query OK, 0 rows affected (0.01 sec)
          mysql> exit
          Bye
          
          
          1 Reply Last reply Reply Quote 0
          • C
            CLee
            last edited by

            Hi
            I am having the same issue where mango seems to run on Derby but not mysql. We have a similar configuration on another machine that works, and comparing apples to apples, it all looks the same. This is the error I get:
            Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/comms/httpclient/Credentials at com.serotonin.m2m2.Main.main(Main.java:63)

            any clues?
            the db user created to access mysql has the GRANT ALL privileges so no access restrictions.

            Thanks!

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