Re: [Dev] Error after installed the certs to IOT

2017-01-17 Thread Lakshman Udayakantha
Hi Susinda,

If IOT using latest kernel version, you should be able to skip host name
verification by following [1]

[1] https://docs.wso2.com/display/ADMIN44x/Enabling+HostName+Verification

Thanks,
Lakshman

On Wed, Jan 18, 2017 at 11:59 AM, Susinda Perera  wrote:

> Hi All
> Im getting following error when trying to acess https://10.10.10.82:
> 9443/devicemgt. and it redirects to localhost and gives this error in BE
> Note that i followed the https://docs.wso2.com/
> display/IoTS300/Configuring+the+WSO2+IoTS+Ports+for+iOS and add the
> jaggery config as well.
> any idea?
>
> IoT-Core] ERROR - TargetHandler I/O error: Host name verification failed
> for host : localhost
> javax.net.ssl.SSLException: Host name verification failed for host :
> localhost
> at org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(
> ClientSSLSetupHandler.java:171)
> at org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(
> SSLIOSession.java:308)
> at org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(
> SSLIOSession.java:451)
> at org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(
> AbstractIODispatch.java:152)
> at org.apache.http.impl.nio.reactor.BaseIOReactor.
> writable(BaseIOReactor.java:180)
> at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(
> AbstractIOReactor.java:342)
> at org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(
> AbstractIOReactor.java:316)
> at org.apache.http.impl.nio.reactor.AbstractIOReactor.
> execute(AbstractIOReactor.java:277)
> at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(
> BaseIOReactor.java:105)
> at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$
> Worker.run(AbstractMultiworkerIOReactor.java:586)
> at java.lang.Thread.run(Thread.java:745)
> [2017-01-18 11:53:37,512] [IoT-Core]  WARN - EndpointContext Endpoint :
> admin--DeviceManagement_APIproductionEndpoint_8 with address
> https://localhost:9443/api/device-mgt/v1.0/devices will be marked
> SUSPENDED as it failed
> [2017-01-18 11:53:37,513] [IoT-Core]  WARN - EndpointContext Suspending
> endpoint : admin--DeviceManagement_APIproductionEndpoint_8 with address
> https://localhost:9443/api/device-mgt/v1.0/devices - last suspend
> duration was : 3ms and current suspend duration is : 3ms - Next
> retry after : Wed Jan 18 11:54:07 IST 2017
> [2017-01-18 11:53:37,529] [IoT-Core] ERROR - handlebars-module An
> exception thrown when executing the script '/app/pages/cdmf.page.
> dashboard/dashboard.js'.
> [2017-01-18 11:53:37,533] [IoT-Core] ERROR - dynamic-files-renderer
> Unexpected token: <
> org.mozilla.javascript.EcmaError: SyntaxError: Unexpected token: <
> (/devicemgt/lib/modules/handlebars/handlebars-v2.0.0.js#2236(Function)#2)
> at org.mozilla.javascript.ScriptRuntime.constructError(
> ScriptRuntime.java:3687)
> at org.mozilla.javascript.ScriptRuntime.constructError(
> ScriptRuntime.java:3665)
> at org.mozilla.javascript.NativeJSON.parse(NativeJSON.java:112)
> at org.mozilla.javascript.NativeJSON.parse(NativeJSON.java:119)
> at org.jaggeryjs.scriptengine.util.HostObjectUtil.parseJSON(
> HostObjectUtil.java:70)
> at org.jaggeryjs.scriptengine.engine.RhinoTopLevel.parse(
> RhinoTopLevel.java:51)
> at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(
> DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:497)
> at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
> at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
> at org.mozilla.javascript.optimizer.OptRuntime.callName(
> OptRuntime.java:63)
> at org.jaggeryjs.rhino.devicemgt.app.modules.business_
> controllers.c1._c_anonymous_8(/devicemgt/app/modules/
> business-controllers/device.js:188)
> at org.jaggeryjs.rhino.devicemgt.app.modules.business_
> controllers.c1.call(/devicemgt/app/modules/business-controllers/device.js)
> at org.mozilla.javascript.optimizer.OptRuntime.callName(
> OptRuntime.java:63)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_
> anonymous_3(/devicemgt/app/modules/oauth/token-protected-
> service-invokers.js:125)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/
> devicemgt/app/modules/oauth/token-protected-service-invokers.js)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_
> anonymous_5(/devicemgt/app/modules/oauth/token-protected-
> service-invokers.js:138)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/
> devicemgt/app/modules/oauth/token-protected-service-invokers.js)
> at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_
> anonymous_6(/devicemgt/app/modules/oauth/token-protected-
> service-invokers.js:148)
> at org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/
> 

[Dev] Error after installed the certs to IOT

2017-01-17 Thread Susinda Perera
Hi All
Im getting following error when trying to acess
https://10.10.10.82:9443/devicemgt. and it redirects to localhost and gives
this error in BE
Note that i followed the
https://docs.wso2.com/display/IoTS300/Configuring+the+WSO2+IoTS+Ports+for+iOS
and add the jaggery config as well.
any idea?

IoT-Core] ERROR - TargetHandler I/O error: Host name verification failed
for host : localhost
javax.net.ssl.SSLException: Host name verification failed for host :
localhost
at
org.apache.synapse.transport.http.conn.ClientSSLSetupHandler.verify(ClientSSLSetupHandler.java:171)
at
org.apache.http.nio.reactor.ssl.SSLIOSession.doHandshake(SSLIOSession.java:308)
at
org.apache.http.nio.reactor.ssl.SSLIOSession.outboundTransport(SSLIOSession.java:451)
at
org.apache.http.impl.nio.reactor.AbstractIODispatch.outputReady(AbstractIODispatch.java:152)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.writable(BaseIOReactor.java:180)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvent(AbstractIOReactor.java:342)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.processEvents(AbstractIOReactor.java:316)
at
org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:277)
at
org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:105)
at
org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:586)
at java.lang.Thread.run(Thread.java:745)
[2017-01-18 11:53:37,512] [IoT-Core]  WARN - EndpointContext Endpoint :
admin--DeviceManagement_APIproductionEndpoint_8 with address
https://localhost:9443/api/device-mgt/v1.0/devices will be marked SUSPENDED
as it failed
[2017-01-18 11:53:37,513] [IoT-Core]  WARN - EndpointContext Suspending
endpoint : admin--DeviceManagement_APIproductionEndpoint_8 with address
https://localhost:9443/api/device-mgt/v1.0/devices - last suspend duration
was : 3ms and current suspend duration is : 3ms - Next retry after
: Wed Jan 18 11:54:07 IST 2017
[2017-01-18 11:53:37,529] [IoT-Core] ERROR - handlebars-module An exception
thrown when executing the script
'/app/pages/cdmf.page.dashboard/dashboard.js'.
[2017-01-18 11:53:37,533] [IoT-Core] ERROR - dynamic-files-renderer
Unexpected token: <
org.mozilla.javascript.EcmaError: SyntaxError: Unexpected token: <
(/devicemgt/lib/modules/handlebars/handlebars-v2.0.0.js#2236(Function)#2)
at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3687)
at
org.mozilla.javascript.ScriptRuntime.constructError(ScriptRuntime.java:3665)
at org.mozilla.javascript.NativeJSON.parse(NativeJSON.java:112)
at org.mozilla.javascript.NativeJSON.parse(NativeJSON.java:119)
at
org.jaggeryjs.scriptengine.util.HostObjectUtil.parseJSON(HostObjectUtil.java:70)
at
org.jaggeryjs.scriptengine.engine.RhinoTopLevel.parse(RhinoTopLevel.java:51)
at sun.reflect.GeneratedMethodAccessor187.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:126)
at org.mozilla.javascript.FunctionObject.call(FunctionObject.java:386)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at
org.jaggeryjs.rhino.devicemgt.app.modules.business_controllers.c1._c_anonymous_8(/devicemgt/app/modules/business-controllers/device.js:188)
at
org.jaggeryjs.rhino.devicemgt.app.modules.business_controllers.c1.call(/devicemgt/app/modules/business-controllers/device.js)
at org.mozilla.javascript.optimizer.OptRuntime.callName(OptRuntime.java:63)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_anonymous_3(/devicemgt/app/modules/oauth/token-protected-service-invokers.js:125)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/devicemgt/app/modules/oauth/token-protected-service-invokers.js)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_anonymous_5(/devicemgt/app/modules/oauth/token-protected-service-invokers.js:138)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/devicemgt/app/modules/oauth/token-protected-service-invokers.js)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0._c_anonymous_6(/devicemgt/app/modules/oauth/token-protected-service-invokers.js:148)
at
org.jaggeryjs.rhino.devicemgt.app.modules.oauth.c0.call(/devicemgt/app/modules/oauth/token-protected-service-invokers.js)
at org.mozilla.javascript.optimizer.OptRuntime.callN(OptRuntime.java:52)
at
org.jaggeryjs.rhino.devicemgt.app.modules.business_controllers.c1._c_anonymous_7(/devicemgt/app/modules/business-controllers/device.js:186)
at
org.jaggeryjs.rhino.devicemgt.app.modules.business_controllers.c1.call(/devicemgt/app/modules/business-controllers/device.js)
at org.mozilla.javascript.optimizer.OptRuntime.callProp0(OptRuntime.java:85)
at