Google map can not be used and can not add datasource
-
I use MangoES. I can not open google map on mangoES. But I can test it on other MangoES. Can use google map.
I do not know where to set it.Same Key API
Other MangoES
ma.log
WARN 2018-06-15T19:55:52,271 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:55:49.737+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472) WARN 2018-06-15T19:55:53,068 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/administration/home, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:55:50.346+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_th.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472) WARN 2018-06-15T19:56:29,119 (com.infiniteautomation.mango.rest.v2.ServerRestV2Controller.postClientError:222) - Client error [user=admin, cause=Possibly unhandled rejection: {"requireType":"scripterror","requireModules":["https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_en.js"],"originalError":{"isTrusted":true}}, location=http://192.168.0.199/ui/dashboard, userAgent=Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:60.0) Gecko/20100101 Firefox/60.0, language=th, date=2018-06-15T19:56:26.387+07:00, timezone=Asia/Bangkok] Error: Script error for "https://cdnjs.cloudflare.com/ajax/libs/angular-i18n/1.7.2/angular-locale_en.js" http://requirejs.org/docs/errors.html#scripterror at makeError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:108173) at onScriptError (http://192.168.0.199/modules/mangoUI/web/mangoUi~ngMango~ngMangoServices.js?v=8e197a301817e1747ef0:39:123472) WARN 2018-06-15T19:57:10,753 (com.serotonin.m2m2.web.mvc.spring.security.MangoAccessDeniedHandler.handle:54) - Denying access to Mango resource /rest/v2/server/client-error to IP 192.168.0.5
Can not add tag data source
-
Hi JoHn-Beer
What versions of Mango are running on each ES? It could be related to: https://forum.infiniteautomation.com/topic/3577/query-an-external-web-service-from-a-mango-page
For the one that is not rendering Google Maps, can you right click on the page, click 'inspect' and copy any errors from the console in the developer tools?
Can not add tag data source
You should check the ma.log for an error when it says status 500. Offhand I would guess you should delete your Mango/work/jsp directory on the machine that is giving you that 500 error.
-
@JoHn-Beer You can set
web.security.contentSecurityPolicy
to an empty string. e.g.web.security.contentSecurityPolicy=
to disable the CSP completely. This might be acceptable if the machine is not exposed to the internet.Otherwise this will let you just allow access to google maps
web.security.contentSecurityPolicy=default-src 'self'; style-src 'self' 'unsafe-inline'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://maps.google.com https://maps.googleapis.com; connect-src 'self' ws: wss:; img-src 'self' data: https://maps.google.com https://maps.gstatic.com
-
Can not add tag data source
You should check the ma.log for an error when it says status 500. Offhand I would guess you should delete your Mango/work/jsp directory on the machine that is giving you that 500 error.i check ma.log.
WARN 2018-06-15T19:35:26,493 (com.serotonin.m2m2.web.mvc.spring.exception.ExceptionUtils.logWebException:56) - REQUEST URL http://192.168.100.199/data_source_properties.shtm REQUEST PARAMETERS dsid=2 REQUEST HEADERS Cookie=MANGO80=1ufyl8p6kezag2myi5xleqv6a; XSRF-TOKEN=ef0c6800-d270-43a3-9c2e-e356f0e16a3d X-Requested-With=XMLHttpRequest Accept=*/* Connection=keep-alive User-Agent=Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.87 Safari/537.36 Referer=http://192.168.100.199/data_sources.shtm Host=192.168.100.199 Accept-Encoding=gzip, deflate Accept-Language=th-TH,th;q=0.9 Content-Type=application/x-www-form-urlencoded REQUEST ATTRIBUTES org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER=org.springframework.web.context.request.async.WebAsyncManager@1d0f7ea javax.servlet.error.status_code=500 org.springframework.web.servlet.DispatcherServlet.CONTEXT=WebApplicationContext for namespace 'springDispatcher-servlet': startup date [Fri Jun 15 19:25:40 ICT 2018]; parent: Root WebApplicationContext javax.servlet.jsp.jstl.fmt.localizationContext.request=org.springframework.web.servlet.support.JstlUtils$SpringLocalizationContext@144ba27 org.springframework.web.servlet.HandlerMapping.introspectTypeLevelMapping=false __spring_security_session_mgmt_filter_applied=true modulePath=/modules/internal org.springframework.web.servlet.DispatcherServlet.LOCALE_RESOLVER=org.springframework.web.servlet.i18n.SessionLocaleResolver@417648 org.springframework.web.servlet.HandlerMapping.bestMatchingPattern=/data_source_properties.shtm org.springframework.web.servlet.DispatcherServlet.OUTPUT_FLASH_MAP=FlashMap [attributes={}, targetRequestPath=null, targetRequestParams={}] javax.servlet.error.exception_type=class org.apache.jasper.JasperException commPorts=[ - /dev/rs485-1] org.springframework.web.servlet.DispatcherServlet.FLASH_MAP_MANAGER=org.springframework.web.servlet.support.SessionFlashMapManager@2fdc6c lang=th lastUpgrade=1528942750 availableLanguages=[] javax.servlet.http.HttpServletResponse=org.springframework.security.web.header.HeaderWriterFilter$HeaderWriterResponse@b405e4 _csrf=org.springframework.security.web.csrf.DefaultCsrfToken@511d17 __spring_security_filterSecurityInterceptor_filterApplied=true javax.servlet.error.servlet_name=springDispatcher javax.servlet.error.message=org.apache.jasper.JasperException: An exception occurred processing JSP page /WEB-INF/jsp/dataSourceProperties.jsp at line 78
-
Did you try deleting your Mango/work/jsp directory?