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.

  • Script to restart mango

    3
    0 Votes
    3 Posts
    3k Views
    phildunlapP
    Hi Dan, One of the easiest ways to ensure Mango restarts on crash is to touch /path/to/mango/RESTART which will cause the ma-start.sh or ma-start.bat script to start Mango again when the currently running Mango finishes. Scripts in Mango/bin/ext-enabled are called with the first argument 'restart' To your question, yes it is possible to schedule a restart from within a Mango script, but there aren't any wrapper hooks, so you have to do it the same way the modules page would, com.serotonin.m2m2.web.dwr.ModulesDwr.scheduleRestart(); //Schedule restart for ten seconds from now. or you can get whatever delay you want, var timeout = com.serotonin.m2m2.Common.getMillis(com.serotonin.m2m2.Common.TimePeriods.MINUTES, 17); var lifecycle = com.serotonin.provider.Providers.get(com.serotonin.m2m2.IMangoLifecycle.class); lifecycle.scheduleShutdown( timeout, true /* restart */, null);
  • Access Control IP Monitor

    6
    0 Votes
    6 Posts
    3k Views
    phildunlapP
    Did you set up the event handler on the data source event, as I instructed? I don't see an image of your event handler there.
  • Persistent TCP Sync question

    5
    0 Votes
    5 Posts
    2k Views
    terrypackerT
    You shouldn't need any configuration changes, the lost backdates were likely due to a corrupt shard that was repaired while the system was running and inserting data. This is a rare scenario and has been fixed in the next release.
  • Curious error about systemInfo.txt file not found ?

    6
    0 Votes
    6 Posts
    2k Views
    phildunlapP
    Certainly! I meant if the data source started (not Mango) on an second divisible by 30. You can just restart the data source to restart its poll timer.
  • Update on saving NoSQL data to MySQL

    2
    0 Votes
    2 Posts
    1k Views
    phildunlapP
    No that was never written. One can do either, but one would have to use a scripting data source and perhaps supporting points to make it happen. //Export all data for point cxtPnt into an SQL table... var pvd = com.serotonin.m2m2.Common.databaseProxy.newPointValueDao(); pvd.getPointValuesBetween( cxtPnt.getDataPointWrapper().getId(), 0, java.lang.Long.MAX_VALUE, function(pvt) { sqlContextPoint.set('(' + pvt.getValue().toString() + ',' + pvt.getTime() + ')', pvt.getTime()); //sqlContextPoint is an 'update tables only' point on an SQL data source }); And there would be a similar way to write those out to a file or wherever.
  • Configuring Mango to Send Emails

    23
    0 Votes
    23 Posts
    19k Views
    phildunlapP
    Hmm, then the SMTP settings are the issue. If you had it working in the past, I would recommend using those settings. Also, it would be good to try to send a few test emails in the period of time covered by the log file, otherwise there's no information in there relevant to the SMTP issue.
  • Data Base Backup

    3
    0 Votes
    3 Posts
    2k Views
    G
    Thank you for reply!
  • Mango 3.3. Default Log in

    3
    0 Votes
    3 Posts
    4k Views
    BGB
    Hello Jared, Please disregard. I went back to the drawing board and I must have missed a couple of steps when setting up the server. I am logging in now. Cheers Brian
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    3 Views
    No one has replied
  • Schedule page

    3
    0 Votes
    3 Posts
    2k Views
    phildunlapP
    Hi georgestefan, Interesting question! Someone else may have a better answer, but that does sound like quite a puzzle. The advanced scheduler raises events, and event handling can only really be configured on the event handlers page (quite a powerful page, I understand why you would not want a lower privilege user there). Hmm. You could have a setup where the user encodes the point information somehow into an alphanumeric point, then the event triggers a set point event handler that either sets a value to trigger the script, or has the script in a scripted set point event handler, and then it needs to figure out what to do from the encoded information. It would be fragile if the user entered information wrong, potentially, or you can build this information in your UI. For my script, I will assume my alphanumeric point's value is something like {"p1":{"0": 62, "8": 68, "18": 65}} //Untested var scheduleConfig = JSON.parse(alphanum.value); var now = new Date(); for( var contextPointVariableName in scheduleConfig ) { if(typeof this[contextPointVariableName] === 'undefined') //see if we have a point in context with that identifier continue; if(now.getHours() in scheduleConfig[contextPointVariableName]) //only providing hour level options here this[contextPointVariableName].set(scheduleConfig[contextPointVariableName][now.getHours()]); } So this works if the variable name in the context of the script matches whatever key is used to define the schedule. This would enable a user to have many points they could control, but don't have to, without having to change anything about the event handler, and without being able to change the set of points they can act on. To your other question about if it is possible to have three temperatures set. Yes, you can create three set point handlers on the event. Or, if you wanted to try that script, you would just have multiple context keys in the schedule's configuration with values at that hour.
  • Alarm email after reboot

    3
    0 Votes
    3 Posts
    2k Views
    phildunlapP
    I suspect what you're noticing is that a reboot returns the events to normal when shutdown disables the data source, then startup re-enables the data source and it considers it a different event. It may warrant some thinking about a reboot in particular, but in general if one had a state detector of false on a point, which was the state, then disabled the point or source for an indeterminate amount of time, and upon first poll is still in the state, should the event be raised? Currently the answer is yes. Or, similarly, does it make sense to say the event is still occurring if the data source is disabled, or is that not known? There is almost certainly a workaround but it could take some tinkering. It would probably involve a modification to the custom template to check if some points timestamp is appropriate and some handling to record the startup time or shutdown times such that they are usable. Another surprising possibility would be to terminate Mango more aggressively. In Windows, killing the command prompt and in Unix doing a -9 will end the process without shutting down the data sources (which can easily corrupt the last few samples in the database) and then the events will be deemed duplicates at startup and mostly not raise.
  • Upgrade from 2.X.X to 3.X.X

    7
    0 Votes
    7 Posts
    3k Views
    S
    Is it the same cost as if buying Mango 3 from scratch or transition from Mango 2 to Mango 3 is taken into account?
  • This topic is deleted!

    1
    0 Votes
    1 Posts
    1 Views
    No one has replied
  • Mango fails to start with java error

    11
    0 Votes
    11 Posts
    4k Views
    phildunlapP
    Certainly! Glad you got it resolved!
  • Mango does not start

    2
    0 Votes
    2 Posts
    2k Views
    phildunlapP
    I emailed you the fix I gave in the other thread. It is probably the same issue.
  • Run Hours

    8
    0 Votes
    8 Posts
    4k Views
    G
    Yes, that's right, at the last second of the day produce that value, I'm starting to see how this is working. Thanks again!
  • New user login problem

    7
    0 Votes
    7 Posts
    2k Views
    G
    ok, thanks. I've put the "user" group to the new user and now it's working
  • BACnet publisher

    5
    0 Votes
    5 Posts
    3k Views
    J
    @phildunlap I changed my setting of Thread pools: [image: 93yjJ2q.png] logs as following: ERROR 2017-06-18T12:45:58,648 (com.serotonin.bacnet4j.transport.DefaultTransport.run:462) - Error during expire messages: java.lang.NullPointerException: null at com.serotonin.bacnet4j.npdu.Network.sendAPDU(Network.java:103) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.sendForResponse(DefaultTransport.java:899) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:859) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:460) [bacnet4j-4.0.1-SNAPSHOT.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] ERROR 2017-06-18T12:45:58,698 (com.serotonin.bacnet4j.transport.DefaultTransport.run:462) - Error during expire messages: java.lang.NullPointerException: null at com.serotonin.bacnet4j.npdu.Network.sendAPDU(Network.java:103) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.sendForResponse(DefaultTransport.java:899) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:859) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:460) [bacnet4j-4.0.1-SNAPSHOT.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] ERROR 2017-06-18T12:45:58,851 (com.serotonin.bacnet4j.transport.DefaultTransport.run:462) - Error during expire messages: java.lang.NullPointerException: null at com.serotonin.bacnet4j.npdu.Network.sendAPDU(Network.java:103) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.sendForResponse(DefaultTransport.java:899) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:859) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:460) [bacnet4j-4.0.1-SNAPSHOT.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] ERROR 2017-06-18T12:45:58,901 (com.serotonin.bacnet4j.transport.DefaultTransport.run:462) - Error during expire messages: java.lang.NullPointerException: null at com.serotonin.bacnet4j.npdu.Network.sendAPDU(Network.java:103) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.sendForResponse(DefaultTransport.java:899) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.expire(DefaultTransport.java:859) ~[bacnet4j-4.0.1-SNAPSHOT.jar:?] at com.serotonin.bacnet4j.transport.DefaultTransport.run(DefaultTransport.java:460) [bacnet4j-4.0.1-SNAPSHOT.jar:?] at java.lang.Thread.run(Thread.java:745) [?:1.8.0_101] WARN 2017-06-18T12:46:04,854 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:46:24,857 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:46:44,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:47:04,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:47:19,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:47:39,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:47:59,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:48:14,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:48:24,854 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:48:39,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:48:59,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:49:19,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:49:39,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:49:54,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full WARN 2017-06-18T12:50:14,853 (com.serotonin.m2m2.util.timeout.TaskRejectionHandler.rejectedTask:77) - Rejected task: Polling Data Source: DS_44f5a17c-f4a1-40e0-a221-390bb181bee4 because Task Queue Full PLS help to check. Many thanks! Jack Chang
  • Configuring mango as service on Linux ubuntu 16 with systemd

    1
    0 Votes
    1 Posts
    1k Views
    No one has replied
  • Login to Mango dashboard

    2
    0 Votes
    2 Posts
    2k Views
    JoelHaggarJ
    Default login is admin / admin