Assistance needed with Mango 1.2 dslink for DGLux5
-
Hoping someone can help with an issue related to a Mango v 1.2dslink connection to a Mango 2.8.4 on the same pc not displaying all of the data points from Mango in DGLux5. It grabs a majority of them, but is now missing a few points which are still available in Mango.
This dslink connection had disconnected on it's own, and since re-establishing the connection, some of the points that were just there before, do not discover in DGLux5. I was wondering if the MangoAPI is somehow caching old information, and not allowing these points to be seen? Any help would be appreciated.Here is a log from the Mango dsLink when making the connection, and as it builds the point hierarchy:
[2017-12-08 14:48:48.044688] 2017-12-08 14:48:48.042 [Thread-5] INFO org.dsa.iot.mango.MangoLink - Base URL set - http://10.4.0.190:8082/rest [2017-12-08 14:48:48.834733] 2017-12-08 14:48:48.834 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - UserModel loading error [2017-12-08 14:48:48.834733] {} [2017-12-08 14:48:48.834733] java.lang.IllegalArgumentException: No enum constant io.swagger.client.model.UserModel.ReceiveAlarmEmailsEnum.IGNORE [2017-12-08 14:48:48.834733] at java.lang.Enum.valueOf(Unknown Source) [2017-12-08 14:48:48.834733] at io.swagger.client.model.UserModel$ReceiveAlarmEmailsEnum.valueOf(UserModel.java:22) [2017-12-08 14:48:48.834733] at org.dsa.iot.mango.MangoBodyBuilder.bodyBuilder(MangoBodyBuilder.java:70) [2017-12-08 14:48:48.834733] at io.swagger.client.ApiClient.build(ApiClient.java:448) [2017-12-08 14:48:48.834733] at io.swagger.client.ApiClient.deserialize(ApiClient.java:419) [2017-12-08 14:48:48.834733] at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:595) [2017-12-08 14:48:48.834733] at io.swagger.client.api.MangoDSLApi.login(MangoDSLApi.java:499) [2017-12-08 14:48:48.834733] at org.dsa.iot.mango.MangoConn.setLogin(MangoConn.java:79) [2017-12-08 14:48:48.834733] at org.dsa.iot.mango.MangoConn.start(MangoConn.java:72) [2017-12-08 14:48:48.834733] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:93) [2017-12-08 14:48:48.834733] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:77) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.node.actions.Action.invoke(Action.java:149) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.methods.responses.InvokeResponse.getJsonResponse(InvokeResponse.java:133) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.link.Responder.parse(Responder.java:126) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:186) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:178) [2017-12-08 14:48:48.834733] at org.dsa.iot.dslink.connection.DataHandler$1.run(DataHandler.java:73) [2017-12-08 14:48:48.834733] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [2017-12-08 14:48:48.834733] at java.util.concurrent.FutureTask.run(Unknown Source) [2017-12-08 14:48:48.834733] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [2017-12-08 14:48:48.834733] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [2017-12-08 14:48:48.834733] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [2017-12-08 14:48:48.834733] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [2017-12-08 14:48:48.834733] at java.lang.Thread.run(Unknown Source) [2017-12-08 14:48:48.834733] [2017-12-08 14:48:48.835733] 2017-12-08 14:48:48.834 [Thread-5] INFO org.dsa.iot.mango.MangoConn - Setting Cookie: MANGO8082=lsgkioei8t31ql9jwkplle3f [2017-12-08 14:48:48.835733] 2017-12-08 14:48:48.834 [Thread-5] INFO org.dsa.iot.mango.MangoConn - Got cookie: MANGO8082=lsgkioei8t31ql9jwkplle3f;Path=/ [2017-12-08 14:48:48.835733] 2017-12-08 14:48:48.835 [Thread-5] INFO org.dsa.iot.mango.MangoConn - Got cookie: XSRF-TOKEN=ef8cdafc-4d72-4fda-99cd-3a69a56559ef;Path=/ [2017-12-08 14:48:48.835733] 2017-12-08 14:48:48.835 [Thread-5] INFO org.dsa.iot.mango.MangoConn - Setting XSRF Token: ef8cdafc-4d72-4fda-99cd-3a69a56559ef [2017-12-08 14:48:48.835733] 2017-12-08 14:48:48.835 [Thread-5] INFO org.dsa.iot.mango.MangoConn - admin logged in [2017-12-08 14:48:48.902737] 2017-12-08 14:48:48.901 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.915738] 2017-12-08 14:48:48.914 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.923738] 2017-12-08 14:48:48.922 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.927738] 2017-12-08 14:48:48.927 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.933739] 2017-12-08 14:48:48.933 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.937739] 2017-12-08 14:48:48.937 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.945739] 2017-12-08 14:48:48.944 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.950740] 2017-12-08 14:48:48.950 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.960740] 2017-12-08 14:48:48.959 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.964740] 2017-12-08 14:48:48.964 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.973741] 2017-12-08 14:48:48.971 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:48.979741] 2017-12-08 14:48:48.979 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Real Time Model complete [2017-12-08 14:48:48.989742] 2017-12-08 14:48:48.987 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - Data Point Model complete [2017-12-08 14:48:49.830790] java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoBodyBuilder.bodyBuilder(MangoBodyBuilder.java:133) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.build(ApiClient.java:448) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.deserialize(ApiClient.java:419) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:595) [2017-12-08 14:48:49.830790] at io.swagger.client.api.MangoDSLApi.get(MangoDSLApi.java:946) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoBodyBuilder.pointSetter(MangoBodyBuilder.java:299) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoBodyBuilder.pointBuilder(MangoBodyBuilder.java:286) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoBodyBuilder.bodyBuilder(MangoBodyBuilder.java:97) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.build(ApiClient.java:448) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.deserialize(ApiClient.java:419) [2017-12-08 14:48:49.830790] at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:595) [2017-12-08 14:48:49.830790] at io.swagger.client.api.MangoDSLApi.getPointHierarchy(MangoDSLApi.java:340) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoFolder.getHierarchy(MangoFolder.java:144) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoFolder.init(MangoFolder.java:58) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoConn.setLogin(MangoConn.java:99) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoConn.start(MangoConn.java:72) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:93) [2017-12-08 14:48:49.830790] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:77) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.node.actions.Action.invoke(Action.java:149) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.methods.responses.InvokeResponse.getJsonResponse(InvokeResponse.java:133) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.link.Responder.parse(Responder.java:126) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:186) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:178) [2017-12-08 14:48:49.830790] at org.dsa.iot.dslink.connection.DataHandler$1.run(DataHandler.java:73) [2017-12-08 14:48:49.830790] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [2017-12-08 14:48:49.830790] at java.util.concurrent.FutureTask.run(Unknown Source) [2017-12-08 14:48:49.830790] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [2017-12-08 14:48:49.830790] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [2017-12-08 14:48:49.832790] at java.lang.Thread.run(Unknown Source) [2017-12-08 14:48:49.832790] 2017-12-08 14:48:49.830 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - PointHierarchyModel loading error [2017-12-08 14:48:49.832790] {} [2017-12-08 14:48:49.832790] java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.build(ApiClient.java:457) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.deserialize(ApiClient.java:419) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:595) [2017-12-08 14:48:49.832790] at io.swagger.client.api.MangoDSLApi.get(MangoDSLApi.java:946) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoBodyBuilder.pointSetter(MangoBodyBuilder.java:299) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoBodyBuilder.pointBuilder(MangoBodyBuilder.java:286) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoBodyBuilder.bodyBuilder(MangoBodyBuilder.java:97) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.build(ApiClient.java:448) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.deserialize(ApiClient.java:419) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.invokeAPI(ApiClient.java:595) [2017-12-08 14:48:49.832790] at io.swagger.client.api.MangoDSLApi.getPointHierarchy(MangoDSLApi.java:340) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoFolder.getHierarchy(MangoFolder.java:144) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoFolder.init(MangoFolder.java:58) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoConn.setLogin(MangoConn.java:99) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoConn.start(MangoConn.java:72) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:93) [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoLink$CreateConnHandler.handle(MangoLink.java:77) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.node.actions.Action.invoke(Action.java:149) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.methods.responses.InvokeResponse.getJsonResponse(InvokeResponse.java:133) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.link.Responder.parse(Responder.java:126) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:186) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.DSLink$2.handle(DSLink.java:178) [2017-12-08 14:48:49.832790] at org.dsa.iot.dslink.connection.DataHandler$1.run(DataHandler.java:73) [2017-12-08 14:48:49.832790] at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.FutureTask.run(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [2017-12-08 14:48:49.832790] at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [2017-12-08 14:48:49.832790] at java.lang.Thread.run(Unknown Source) [2017-12-08 14:48:49.832790] Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number [2017-12-08 14:48:49.832790] at org.dsa.iot.mango.MangoBodyBuilder.bodyBuilder(MangoBodyBuilder.java:133) [2017-12-08 14:48:49.832790] at io.swagger.client.ApiClient.build(ApiClient.java:448) [2017-12-08 14:48:49.832790] ... 29 more [2017-12-08 14:48:49.835790] [2017-12-08 14:48:49.835790] 2017-12-08 14:48:49.831 [Thread-5] INFO org.dsa.iot.mango.MangoFolder - Point Hierarchy completed
Thanks.
-
@raylatbasix said in Assistance needed with Mango 1.2 dslink for DGLux5:
4:48:48.042 [Thread-5] INFO or
Hi Ray,
I personally don't have experience with DSLink, but someone else may chime in with a better answer.
But, my experience with DGLux 2.5 would lead me to ask a few questions,
- Might these points have the same name in the same folder? If so, their hierarchy path is the same even if their device names are different.
- Do you have any trailing spaces on point names / folder names?
The point hierarchy is cached in Mango, but if you've restarted Mango without modifying the hierarchy and still experienced this then the caching is definitely not the issue.
-
Hi Phil,
Is there any way to clear that cache? All my points are named differently, with no spaces, just underscores, all in the same folder in Mango. All of these points were working fine in DGLux for almost a year, until the system was rebooted. We lost the dslink connection, and re-established it, to find some of the points missing.Also, this same thing happened about 3 months ago, and the only way I could get all the points back was to use a different connection string. It was using http://localhost:8082/rest so I changed it to http://10.4.0.190:8082/rest and it retrieved all of the points again. That's what led me to ask about the cache.
Any help is appreciated.
-
Oh, interesting. That's your browser cache I bet. You can open your developer tools and disable your cache to test that (if Chrome, there's a checkmark on the network tab)
It might be possible for us to fix the cache control in the DSLink module, but for the most part we encourage people to use our dashboards and dashboard design tools.
Edit: To clear the point hierarchy cache, you can save the point hierarchy.
-
So, I tried disabling the cache, no luck. Even tried a different browser, and different PC. I went into Mango and re-saved the point hierarchy as well.Still same problem.
I'm guessing it's the cache control in the DSLink.
There is this specific error in the DSLink log:
[2017-12-08 14:48:49.832790] 2017-12-08 14:48:49.830 [Thread-5] INFO org.dsa.iot.mango.MangoBodyBuilder - PointHierarchyModel loading error [2017-12-08 14:48:49.832790] {} [2017-12-08 14:48:49.832790] java.lang.RuntimeException: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Number
Not sure if that means anything.
also, is there a way to query this point hierarchy on it's own through the MangoAPI? I'm curious if I see the same limited list issue outside of DGLux5.
Again, I really appreciate the help.
-
That definitely does look related.
The code the the DSLink is open: https://github.com/infiniteautomation/dslink-java-mango
Yes there are endpoints for the point hierarchy through the API:
-
So the full hierarchy shows when querying separately in a browser through the Rest API.
When comparing the full API list to the DSLink list, I've noticed that the DSLink list completes building all of the data points in the first 2 Bacnet/IP datasources in Mango, and gets to the about the sixth data point in the "Meta" data source, and then stops populating the list. The rest of all the Meta points are excluded in the DSLink list.
Would you happen to know the person who helped write the Mango DSLink? I'm desparate, and willing to pay for any assistance with troubleshooting this.
-
Ray,
I wrote the dslink code for Mango 2.8. I’ll take a look at it since we will likely need to port it for Mango 3.3.0. I’ll get to that next week and get back to you.
-
Ray,
I've taken a closer look and basically Mango 2.8.4 version of Mango is not fully compatible with that version of the dslink. As Mango's api changes the dslink code can get out of date. I don't have a working version of DGlux5 so I can't test any code right now but I've made a few changes according to your log messages.
I'm attaching a new version that should fix some of the errors you are seeing. Please give it a try and let me know how it works. You will need to rename it from .txt to .zip to use the ds link.
I would specifically like to see some of the WARN level messages that get spit out that look like this:
Numeric point with xid: {xid of point} has a non numeric value of ???
That should help get us started figuring out what is going on.
-
Hi Terry,
I've emailed you a log file separately regarding this issue. Thanks for the help!