• N
    Nurr

    @CraigWeb

    I see enable-alpn.sh script on the /mango/bin/ext-enabled/ directory. We use java version 1.8.0.

    What is your suggestion? Should we upgrade java version or use the script?

    openjdk version "1.8.0_252"
    OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_252-b09)
    OpenJDK 64-Bit Server VM (AdoptOpenJDK)(build 25.252-b09, mixed mode)

    Thanks!

    posted in Mango Automation Installation read more
  • N
    Nurr

    Dear All,

    We would like to run Mango with https instead of http. We have tried steps on the Mango Documentation ( https://docs-v3.mango-os.com/installation-configuration/#ssl-properties ) and restart Mango then get an error as below.

    What should we do to run Mango with https?

    WARN  2020-09-16T09:19:45,659 (com.serotonin.m2m2.Lifecycle.webServerInitialize:975) - ALPN is enabled in env.properties but couldn't be loaded: No Server ALPNProcessors!
    java.lang.IllegalStateException: No Server ALPNProcessors!
            at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:52) ~[jetty-alpn-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:973) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:221) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
            Suppressed: java.lang.UnsupportedClassVersionError: org/eclipse/jetty/alpn/java/server/JDK9ServerALPNProcessor has been compiled by a more recent version of the Java Runtime (class file version 53.0), this version of the Java Runtime only recognizes class file versions up to 52.0
                    at java.lang.ClassLoader.defineClass1(Native Method) ~[?:1.8.0_252]
                    at java.lang.ClassLoader.defineClass(ClassLoader.java:756) ~[?:1.8.0_252]
                    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[?:1.8.0_252]
                    at java.net.URLClassLoader.defineClass(URLClassLoader.java:468) ~[?:1.8.0_252]
                    at java.net.URLClassLoader.access$100(URLClassLoader.java:74) ~[?:1.8.0_252]
                    at java.net.URLClassLoader$1.run(URLClassLoader.java:369) ~[?:1.8.0_252]
                    at java.net.URLClassLoader$1.run(URLClassLoader.java:363) ~[?:1.8.0_252]
                    at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_252]
                    at java.net.URLClassLoader.findClass(URLClassLoader.java:362) ~[?:1.8.0_252]
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_252]
                    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352) ~[?:1.8.0_252]
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:405) ~[?:1.8.0_252]
                    at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_252]
                    at java.lang.Class.forName0(Native Method) ~[?:1.8.0_252]
                    at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_252]
                    at java.util.ServiceLoader$LazyIterator.nextService(ServiceLoader.java:370) ~[?:1.8.0_252]
                    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:404) ~[?:1.8.0_252]
                    at java.util.ServiceLoader$1.next(ServiceLoader.java:480) ~[?:1.8.0_252]
                    at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:59) ~[jetty-alpn-server-9.4.23.v20191118.jar:9.4.23.v20191118]
                    at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:973) ~[ma-priv-3.7.7.jar:?]
                    at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:221) ~[ma-priv-3.7.7.jar:?]
                    at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
            Suppressed: java.lang.IllegalStateException: org.eclipse.jetty.alpn.ALPN must be on JVM boot classpath
                    at org.eclipse.jetty.alpn.openjdk8.server.OpenJDK8ServerALPNProcessor.init(OpenJDK8ServerALPNProcessor.java:44) ~[jetty-alpn-openjdk8-server-9.4.23.v20191118.jar:9.4.23.v20191118]
                    at org.eclipse.jetty.alpn.server.ALPNServerConnectionFactory.<init>(ALPNServerConnectionFactory.java:72) ~[jetty-alpn-server-9.4.23.v20191118.jar:9.4.23.v20191118]
                    at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:973) ~[ma-priv-3.7.7.jar:?]
                    at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:221) ~[ma-priv-3.7.7.jar:?]
                    at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
    ERROR 2020-09-16T09:19:45,902 (com.serotonin.m2m2.Main.main:162) - Error during initialization
    java.lang.IllegalStateException: no valid keystore
            at org.eclipse.jetty.util.security.CertificateUtils.getKeyStore(CertificateUtils.java:50) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.ssl.SslContextFactory.loadKeyStore(SslContextFactory.java:1188) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.ssl.SslContextFactory.load(SslContextFactory.java:323) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.ssl.SslContextFactory.doStart(SslContextFactory.java:245) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.server.SslConnectionFactory.doStart(SslConnectionFactory.java:92) ~[jetty-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:169) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:117) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.server.AbstractConnector.doStart(AbstractConnector.java:320) ~[jetty-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.server.AbstractNetworkConnector.doStart(AbstractNetworkConnector.java:81) ~[jetty-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.server.ServerConnector.doStart(ServerConnector.java:231) ~[jetty-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.server.Server.doStart(Server.java:385) ~[jetty-server-9.4.23.v20191118.jar:9.4.23.v20191118]
            at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:72) ~[jetty-util-9.4.23.v20191118.jar:9.4.23.v20191118]
            at com.serotonin.m2m2.Lifecycle.webServerInitialize(Lifecycle.java:1042) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Lifecycle.initialize(Lifecycle.java:221) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Main.main(Main.java:159) ~[ma-priv-3.7.7.jar:?]
    INFO  2020-09-16T09:19:45,902 (com.serotonin.m2m2.Lifecycle.terminate:400) - Mango Lifecycle terminating...
    ERROR 2020-09-16T09:19:45,922 (com.serotonin.m2m2.Lifecycle.terminate:478) - com.serotonin.provider.InputStreamEPollProvider
    com.serotonin.provider.ProviderNotFoundException: com.serotonin.provider.InputStreamEPollProvider
            at com.serotonin.provider.Providers.get(Providers.java:30) ~[mango-3.7.7.jar:?]
            at com.serotonin.provider.Providers.get(Providers.java:20) ~[mango-3.7.7.jar:?]
            at com.serotonin.m2m2.Lifecycle.terminate(Lifecycle.java:473) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Main.main(Main.java:163) ~[ma-priv-3.7.7.jar:?]
    ERROR 2020-09-16T09:19:45,922 (com.serotonin.m2m2.Lifecycle.terminate:486) - com.serotonin.provider.ProcessEPollProvider
    com.serotonin.provider.ProviderNotFoundException: com.serotonin.provider.ProcessEPollProvider
            at com.serotonin.provider.Providers.get(Providers.java:30) ~[mango-3.7.7.jar:?]
            at com.serotonin.provider.Providers.get(Providers.java:20) ~[mango-3.7.7.jar:?]
            at com.serotonin.m2m2.Lifecycle.terminate(Lifecycle.java:481) ~[ma-priv-3.7.7.jar:?]
            at com.serotonin.m2m2.Main.main(Main.java:163) ~[ma-priv-3.7.7.jar:?]
    

    Thanks in advance!

    posted in Mango Automation Installation read more
  • N
    Nurr

    Dear All,

    What processes should be working while Mango is running?

    Thanks!

    posted in Mango Automation Installation read more
  • N
    Nurr

    Hi @phildunlap !

    As I see this post is very old, it's good to update the topic.
    Is that possible to get data source communication error or point unreliability as a meta/scripting/or any kind of the point when communication is lost?

    For Modbus I/P deivces we use slave monitor points, but for other types of devices, we need a solution.

    Thanks in advance!

    posted in Mango Automation general Discussion read more
  • N
    Nurr

    Dear All,

    We can download CSV export of events from the "Events" page. We would like to see just some of the columns in the export. Is that possible to edit the format of events CSV export?

    Thanks in advance,

    posted in User help read more
  • N
    Nurr

    Hi Craig,

    What should we do if the index is changing in every Http post?
    For example, "deviceId" may not come in the same index every time.

    Thanks,

    posted in User help read more
  • N
    Nurr

    Hi All,

    We need to create an HTTP JSON endpoint for JSON data which will be posted by another system. The example data is shown below and we will get "isAlarm" value for each alarm of each device.
    For this purpose, we are planning to use HTTP JSON Receiver data source. Can we use this data source to create an endpoint? What is your suggestion?

    We could not found proper documentation for Http JSON Receiver Datasource and datapoint. Can you please show us how to create Http JSON Receiver Datasource and datapoint?

    Data Example:
    {
    "lastUpdate": "2020-08-05T13:53:22.2211582+03:00",
    "devices": [
    {
    "deviceId": 1306,
    "deviceName": "GBZ_SOL4_4.17_K",
    "room": "SOL-4",
    "row": "4.Sıra",
    "rack": "17.Kabinet",
    "isEnabled": true,
    "isDisconnected": false,
    "deviceModel": "ExagatePDU",
    "tags": [
    {
    "tagId": 20987,
    "tagName": "Voltage",
    "unit": "V",
    "readDate": "2020-08-05T18:32:04",
    "readValue": 229.07001,
    "isCritical": false,
    "isAlarm": false
    },
    {
    "tagId": 20356,
    "tagName": "Current",
    "unit": "A",
    "readDate": "2020-08-05T18:33:24",
    "readValue": 0.42,
    "isCritical": false,
    "isAlarm": false
    },
    {
    "tagId": 21342,
    "tagName": "P",
    "unit": "kW",
    "readDate": "2020-08-05T18:33:35",
    "readValue": 0.174,
    "isCritical": false,
    "isAlarm": false
    }
    ]
    }
    ]
    }

    Thanks in advance,

    posted in User help read more
  • N
    Nurr

    Hi @CraigWeb ,

    We check all context points, none of them is disabled. Although all context points are enabled, we get an error.

    Thanks in advance,

    posted in User help read more
  • N
    Nurr

    Hi All!

    We are getting an error while using meta points. We calculate meta points by combining Modbus, SNMP, Virtual, and Meta type points. We get a data source event like below when we restart mango or save/edit meta points. When we check the context points of meta point, context points are neither disabled nor null.

    What could cause to this event? How can we solve ?

    Error:
    'DataSource1': A context point is unavailable in point "Device1 - Point1" because Point with xid DP_d9934f8a-6e3e-48e6-b033-1488500d0b4a for variable named 'P1' is disabled.

    Thanks!

    posted in User help read more
  • N
    Nurr

    Hi All,

    A day ago I have been trying to start mango as a service when the server shut down and startup. For this purpose first of all, I have created a task via Windows Task Scheduler in order to start mango automatically whenever server startup. In this way, I couldn't start mango after restarting the server. Then I created a shortcut of ma-start.bat in the folder C:\Users\user1\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup, mango did not start again after restarting the server.
    Then, I have deleted both windows schedular task and shortcut. Before all, method 1 was working properly.

    What could cause to that? How can I solve it?

    Method 1:

    1. Open C:\Program Files (x86)\mango\bin

    2. Click ma-start.bat
      or

    3. Open cmd window

    4. Run command : cd C:\Program Files (x86)\BMS\bin

    5. Run command ma-start.bat

      Result: Mango gives error like below
      Error: ERROR Null object returned for RollingRandomAccessFile in Appenders.
      ERROR Unable to locate appender "logfile" for logger config "root"

    Method 2

    1. Run cmd as an administrator.
    2. Run command cd C:\Program Files (x86)\BMS\bin
    3. Run commandma-start.bat

    Result: Mango works properly.

    Thanks in advance.

    posted in User help read more
  • N
    Nurr

    Hi! @MattFox @terrypacker

    Is there any update about it?

    Thanks

    posted in How-To read more
  • N
    Nurr

    @MattFox , I have tested via swagger-ui page. When I use datapoint xids it responses properly on swagger-ui.

    I have used the code below in the global script, and getting response like below.

    Response:

    {"cause":"MismatchedInputException: Cannot deserialize instance of `java.lang.String[]` out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 1]","mangoStatusName":null,"mangoStatusCode":-1,"localizedMessage":"Bad Request — com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String[]` out of START_OBJECT token\n at [Source: (PushbackInputStream); line: 1, column: 1]"}
    
    function httpReq(url,method,callback,headers,params)
    {//Second format, full request
        if(headers===undefined){headers={};}
        if(params===undefined){params={};}
        if(method=="get")
        {
        HttpBuilder.get(url,headers,params)
    	.err(function(status, headers, content) { //setErrorCallback for linguistic completion
    		  //setErrorCallback for linguistic completion
                	print(status);	print(content);
    	}).resp( 
    	 callback
    
     ).excp(function(exception) { //setExceptionCallback
    		throw exception.getMessage();
    	}).execute();
        }
        else
        {
             HttpBuilder.post(url,headers,params)
    	.err(function(status, headers, content) { //setErrorCallback for linguistic completion
    		  //setErrorCallback for linguistic completion
                	print(status);	print(content);
    	}).resp( 
    	 callback
    	
    	 ).excp(function(exception) { //setExceptionCallback
    		throw exception.getMessage();
    	}).execute();
        }
    }
    
    var url = "http://10.167.35.76:8080/rest/v2/events/data-point-summaries";
    var method = "post";  //Or "post"
    var headers = {ContentType : "application/json", Authorization: "Bearer eyJhbGciOiJFUzUxMiJ9.eyJzdWIiOiJhZG1pbiIsImV4cCI6MTU5MjQ1OTMyNiwiaWQiOjEsInYiOjEsInR5cCI6ImF1dGgifQ.AZBrTRgtnP7W-88iiNbTn8oHFtjAMieGzEtC-Lr2uLRcZsDftzHKqct-gABlixlEErQqrmTRxF-y8aTprxld59tYAVdcggptg-jyJ-tPHqKSiaIY9VwNnefsxDf-qUTRQ9WeGi95jf1pQDhDQnSqsNsJ_HAFrD_Z0DiFoQwY9Z01iWcE" };
    
    var parameters ={xids:["DP_c244739c-86cd-43e3-95c5-b76acf4730b2"]}; /* If needed exclude if not*/
    
    var handleResponse = function(status, headers, content)
    {
       var data = JSON.parse(content);
    
      print(data);
    
    }
    
    httpReq(url, method, handleResponse , headers);
    

    posted in How-To read more
  • N
    Nurr

    @MattFox yes I have done this as you said. When I post, still couldn't get a response. Are we posting parameters in true format?

    We use Mango core version 3.7.5.

    posted in How-To read more
  • N
    Nurr

    @terrypacker Mango core version is 3.7.5 and I have tested on new UI. We are looking forward to seeing Mango 4.0 release, when it will be available for us?

    Thanks!

    posted in Mango feedback read more
  • N
    Nurr

    Hello All!

    We faced with error 1 while configuration import.

    Steps we have done is shown below.

    1. Open Configuration import/export page
    2. Select Event Handlers
    3. Click Export
    4. Click Import, without any change
    5. Then, Error 1 is seen on the screen.

    When we check the event handler, which gives an error, in the event handlers import JSON file, we see that some detectorsXID and dataPointXID is null shown like below.

    For Situation 1 , we have defined an event detector to the point "DP_74d73b67-41d1-49c1-a0fc-1b29d6921bb3" and selected the event handler for this event detector. After that, we directly deleted the event detector. Although we deleted the event detector, the point is seen as below in the event handler JSON export.

    For Situation2, we deleted point which has an event detector that we selected an event handler. Although we deleted point, the point is seen as below in the event handler JSON export.

    We solved the problem by deleting objects with null properties. How we can prevent from this problem, not to have the problem again?

    //Situation 1
            {
              "sourceType": "DATA_POINT",
              "dataPointXID": "DP_74d73b67-41d1-49c1-a0fc-1b29d6921bb3",
              "detectorXID": null
            },
    //Situation 2
            {
              "sourceType": "DATA_POINT",
              "dataPointXID": null,
              "detectorXID": null
            },
    

    Error 1:
    Event handler 'EH_086295d6-da94-4714-b350-3104832ca77e': saved
    Event handler 'EH_20bb44aa-cc63-417d-9781-92934af4b6ff': saved
    Event handler 'EH_d290da12-b346-4d0f-99fc-9dbfa160ab7a': Event type must have a 'detectorXID'
    Event handler 'EH_8ca1bc17-18b9-4ec1-a92e-0f94c9f35a7b': Event type must have a 'detectorXID'
    Event handler 'EH_33742af8-5d69-435f-8d2d-1493e91aa2dd': Event type must have a 'dataPointXID'
    Event handler 'EH_f0ff4774-bc57-4612-b3e5-b6fdaf151fa9': Event type must have a 'detectorXID'
    Event handler 'EH_1fb091b1-ea9a-4092-8172-799f677676e0': Event type must have a 'detectorXID'
    Event handler 'EH_a89c16f2-336a-438e-a8dd-58ca2fefd86d': Event type must have a 'dataPointXID'

    Thanks a lot!

    posted in Mango feedback read more
  • N
    Nurr

    @MattFox Thank you for your time and solution. I did what you have said and it works !!

    posted in How-To read more
  • N
    Nurr

    Hello!

    I am trying to use /events/data-point-summaries API function which is shown in swagger. I could not get a response.
    The code used is shown below.

    How should I use /events/data-point-summaries API to get a successful response?

    Thanks!

    
    var eventsum = HttpBuilder.request({
        path: "http://localhost:8080/rest/v2/events/data-point-summaries",
        method: "POST",
        headers: {
            "Host": "10.167.35.76:8080",
          "Accept": "application/json, text/plain",
            "Content-Type": "application/json;charset=UTF-8",
            "Authorization":
                "Bearer+"token,
        },
        parameters:{
            "xids":[
              "DP_a638a144-5b1d-45c7-bcb1-b89097cbb08a",
              "DP_a7e64a32-8229-4909-95e3-a992208382c4"
            ]},
        err: function (status, headers, content) {
            throw "Request got bad response: " + status;
        },
        resp: function (status, headers, content) {
            return JSON.parse(content);
        },
    });
    

    posted in How-To read more
  • N
    Nurr

    Hi @Euclides-Martins,

    Have you tried to get data with PROFINET?

    Thanks!

    posted in User help read more