Import javascript library
-
Yeah, almost certainly restarting is all that is required. Command line restarting options on a MangoES...
sudo service mango reload #tell the Mango service to restart sudo /opt/mango/bin/ma.sh restart #more or less what restarting the service is going to do sudo /opt/mango/bin/ma.sh restart; sleep 120; if [ ! -z $(pidof java) ] && [ -e /opt/mango/RESTART ]; then sudo kill -9 $(pidof java); fi #tell Mango to restart, kill it in two minutes if it hasn't restarted sudo reboot #reboot the ES
-
This post is deleted! -
@phildunlap said in Import javascript library:
Yeah, almost certainly restarting is all that is required. Command line restarting options on a MangoES...
sudo service mango reload #tell the Mango service to restart sudo /opt/mango/bin/ma.sh restart #more or less what restarting the service is going to do sudo /opt/mango/bin/ma.sh restart; sleep 120; if [ ! -z $(pidof java) ] && [ -e /opt/mango/RESTART ]; then sudo kill -9 $(pidof java); fi #tell Mango to restart, kill it in two minutes if it hasn't restarted sudo reboot #reboot the ES
so after this, the site completely went down and i cant even login anymore. The Mango ES is up and in the process lists i see Mango but the web is not working. Cant even login
-
Which did you do? You probably would have to have had done one of the last two, I doubt the first two work in this case.
tail -n 30 /opt/mango/logs/ma.log
This will always kill Mango (and any other Java processes running):
kill -9 $(pidof java);
(edit: okay, it won't kill a process in D sleep)This will start Mango with both stdout and stderr coming back to the command line, if you think Mango is having trouble starting:
sudo /opt/mango/bin/ma.sh start
-
@phildunlap said in Import javascript library:
kill -9 $(pidof java
ok. that worked andi could login. I went to the htp get data source and disabled/enabled the data source and i got that timer already canceled error again :(
-
Upload your entire ma.log file. I also provided steps for trying again on a clean setup.
-
@phildunlap [0_1500562677214_ma.log](Uploading 100%)
Thanks. Are you able to see this file that i just uploaded? Thanks. -
Hi Arvand,
No but I just changed something that might fix it. Can you try again?
-
@phildunlap [0_1500564092507_ma.log](Uploading 100%)
-
@phildunlap said in Import javascript library:
Hi Arvand,
No but I just changed something that might fix it. Can you try again?
i odnt think its working. i can share it on google drive an send it to you privately.
-
@phildunlap said in Import javascript library:
Hi Arvand,
No but I just changed something that might fix it. Can you try again?
Should i attempt to upgrade before trying clean?
-
I do not see Timer Already Cancelled errors in your log after you restarted Mango.
-
@phildunlap said in Import javascript library:
I do not see Timer Already Cancelled errors in your log after you restarted Mango.
my bad. that was an old log. i sent you a newer one.
-
You ran out of memory using a large excel report. Are you using rollups? You should probably be watching the console output while you're developing your solution.
-
@phildunlap said in Import javascript library:
You ran out of memory using a large excel report. Are you using rollups? You should probably be watching the console output while you're developing your solution.
i dont understand. what i was developing is that simple httpget, unless that javascript load issue is causing issues up again.
-
ERROR 2017-07-19 13:31:23,974 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run:76) - Error in work item java.lang.OutOfMemoryError: Java heap space at org.apache.xmlbeans.impl.store.Xobj$AttrXobj.newNode(Xobj.java:2780) at org.apache.xmlbeans.impl.store.Xobj.copyNode(Xobj.java:1112) at org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2337) at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2411) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:169) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:152) at org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:122) at org.apache.poi.xssf.usermodel.XSSFRow.onDocumentWrite(XSSFRow.java:501) at org.apache.poi.xssf.usermodel.XSSFSheet.write(XSSFSheet.java:3357) at org.apache.poi.xssf.usermodel.XSSFSheet.commit(XSSFSheet.java:3321) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:464) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:469) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:211) at com.infiniteautomation.mango.excelreports.rt.ExcelReportWorkItem.execute(ExcelReportWorkItem.java:527) at com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run(BackgroundProcessing.java:73) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
if you are not using Excel Reports then delete whatever report this is and restart Mango.
-
@phildunlap said in Import javascript library:
ERROR 2017-07-19 13:31:23,974 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run:76) - Error in work item java.lang.OutOfMemoryError: Java heap space at org.apache.xmlbeans.impl.store.Xobj$AttrXobj.newNode(Xobj.java:2780) at org.apache.xmlbeans.impl.store.Xobj.copyNode(Xobj.java:1112) at org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2337) at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2411) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:169) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:152) at org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:122) at org.apache.poi.xssf.usermodel.XSSFRow.onDocumentWrite(XSSFRow.java:501) at org.apache.poi.xssf.usermodel.XSSFSheet.write(XSSFSheet.java:3357) at org.apache.poi.xssf.usermodel.XSSFSheet.commit(XSSFSheet.java:3321) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:464) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:469) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:211) at com.infiniteautomation.mango.excelreports.rt.ExcelReportWorkItem.execute(ExcelReportWorkItem.java:527) at com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run(BackgroundProcessing.java:73) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
if you are not using Excel Reports then delete whatever report this is and restart Mango.
thanks. i deleted it and it worked. Now i see the httpget running. but the issue is that it runs only the first time (when i enable the datasource). My update period is set to 2 min but i dont see the time stamp for the virtual DP to be ever updated after that initial enable toggle button clicked, Thanks.
-
@arvand.owji said in Import javascript library:
@phildunlap said in Import javascript library:
ERROR 2017-07-19 13:31:23,974 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run:76) - Error in work item java.lang.OutOfMemoryError: Java heap space at org.apache.xmlbeans.impl.store.Xobj$AttrXobj.newNode(Xobj.java:2780) at org.apache.xmlbeans.impl.store.Xobj.copyNode(Xobj.java:1112) at org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2337) at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2411) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:169) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:152) at org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:122) at org.apache.poi.xssf.usermodel.XSSFRow.onDocumentWrite(XSSFRow.java:501) at org.apache.poi.xssf.usermodel.XSSFSheet.write(XSSFSheet.java:3357) at org.apache.poi.xssf.usermodel.XSSFSheet.commit(XSSFSheet.java:3321) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:464) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:469) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:211) at com.infiniteautomation.mango.excelreports.rt.ExcelReportWorkItem.execute(ExcelReportWorkItem.java:527) at com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run(BackgroundProcessing.java:73) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
if you are not using Excel Reports then delete whatever report this is and restart Mango.
thanks. i deleted it and it worked. Now i see the httpget running. but the issue is that it runs only the first time (when i enable the datasource). My update period is set to 2 min but i dont see the time stamp for the virtual DP to be ever updated after that initial enable toggle button clicked, Thanks.
ok, just to be exact, it does seem that it actualy updates the DP but it doesnt do it every 2 minutes. I left it since the last post and I see the value time stamp is 13:50.
-
@arvand.owji said in Import javascript library:
@arvand.owji said in Import javascript library:
@phildunlap said in Import javascript library:
ERROR 2017-07-19 13:31:23,974 (com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run:76) - Error in work item java.lang.OutOfMemoryError: Java heap space at org.apache.xmlbeans.impl.store.Xobj$AttrXobj.newNode(Xobj.java:2780) at org.apache.xmlbeans.impl.store.Xobj.copyNode(Xobj.java:1112) at org.apache.xmlbeans.impl.store.Xobj.copy_contents_from(Xobj.java:2337) at org.apache.xmlbeans.impl.store.Xobj.copy(Xobj.java:2411) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:169) at org.apache.xmlbeans.impl.values.XmlObjectBase._copy(XmlObjectBase.java:152) at org.apache.xmlbeans.impl.values.XmlObjectBase.copy(XmlObjectBase.java:122) at org.apache.poi.xssf.usermodel.XSSFRow.onDocumentWrite(XSSFRow.java:501) at org.apache.poi.xssf.usermodel.XSSFSheet.write(XSSFSheet.java:3357) at org.apache.poi.xssf.usermodel.XSSFSheet.commit(XSSFSheet.java:3321) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:464) at org.apache.poi.POIXMLDocumentPart.onSave(POIXMLDocumentPart.java:469) at org.apache.poi.POIXMLDocument.write(POIXMLDocument.java:211) at com.infiniteautomation.mango.excelreports.rt.ExcelReportWorkItem.execute(ExcelReportWorkItem.java:527) at com.serotonin.m2m2.rt.maint.BackgroundProcessing$1.run(BackgroundProcessing.java:73) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
if you are not using Excel Reports then delete whatever report this is and restart Mango.
thanks. i deleted it and it worked. Now i see the httpget running. but the issue is that it runs only the first time (when i enable the datasource). My update period is set to 2 min but i dont see the time stamp for the virtual DP to be ever updated after that initial enable toggle button clicked, Thanks.
ok, just to be exact, it does seem that it actualy updates the DP but it doesnt do it every 2 minutes. I left it since the last post and I see the value time stamp is 13:50.
ok, so the problem was that the virtual data point was set to update every 10 min and the httpget was 2 minutes. I changed virtual dp to 2 min and now its working as expected. Thanks for the help :)
-
Nice, glad you got it figured out!