ApiProxy$FeatureNotEnabledException while XMPPConnection.connect(XMPPConnection.java:953) - google-app-engine

I'm getting following error:
exception(org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:953))
while connecting through my Android app deployed on google app engine.
com.google.apphosting.api.ApiProxy$FeatureNotEnabledException: The Socket API will be enabled for this application once billing has been enabled in the admin console.
at java.lang.Thread.getStackTrace(Thread.java:1568)
at com.google.apphosting.runtime.ApiProxyImpl.doSyncCall(ApiProxyImpl.java:253)
at com.google.apphosting.runtime.ApiProxyImpl.access$000(ApiProxyImpl.java:64)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:196)
at com.google.apphosting.runtime.ApiProxyImpl$1.run(ApiProxyImpl.java:193)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:193)
at com.google.apphosting.runtime.ApiProxyImpl.makeSyncCall(ApiProxyImpl.java:64)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:107)
at com.google.apphosting.api.ApiProxy.makeSyncCall(ApiProxy.java:56)
at com.google.appengine.api.socket.SocketApiHelper.apiProxyMakeSyncCall(SocketApiHelper.java:90)
at com.google.appengine.api.socket.SocketApiHelper.makeSyncCall(SocketApiHelper.java:58)
at com.google.appengine.api.socket.NameServiceImpl.lookupAllHostAddr(NameServiceImpl.java:61)
at com.google.apphosting.util.ResolverManager$AppEngineNameservice.lookupAllHostAddr(ResolverManager.java:42)
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1388)
at java.net.InetAddress.getAllByName0(InetAddress.java:1341)
at java.net.InetAddress.getAllByName(InetAddress.java:1255)
at java.net.InetAddress.getAllByName(InetAddress.java:1186)
at java.net.InetAddress.getByName(InetAddress.java:1136)
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:220)
at org.jivesoftware.smack.proxy.DirectSocketFactory.createSocket(DirectSocketFactory.java:28)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:512)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:953)
at ee.ut.notification.xmpp.server.SessionHandler.login(SessionHandler.java:28)
at ee.ut.notification.xmpp.server.SessionHandler.<init>(SessionHandler.java:21)
at ee.ut.notification.xmpp.server.MessagingFramework.initialize(MessagingFramework.java:33)
at ee.ut.notification.xmpp.server.MessagingFramework.<init>(MessagingFramework.java:18)

The Socket API will be enabled for this application once billing has been enabled in the admin console.
Isn't that error message verbose enough?

Related

gatling-3.0.0: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate

i am using Gatling 3.0.0 as a plugin in SBT i am configuring the browser as given in the https://gatling.io/docs/current/http/recorder/#recorder under configuration heading after then when i start the recorder using gatling:startRecorder in sbt and try to hit my website https://www.example.com/ Firefox displayed
Did Not Connect: Potential Security Issue
Firefox detected a potential security threat and did not continue to www.mydomain.com because this website requires a secure connection.
www.mydomain.com has a security policy called HTTP Strict Transport Security (HSTS), which means that Firefox can only connect to it securely. You can’t add an exception to visit this site
and here are the exception logs
ioEventLoopGroup-2-1] DEBUG io.netty.handler.ssl.util.InsecureTrustManagerFactory - Accepting a server certificate: CN=www.mydomain.com
14:44:55.604 [nioEventLoopGroup-4-2] DEBUG io.gatling.recorder.http.Mitm$ - Open new server channel
14:44:55.607 [nioEventLoopGroup-4-1] WARN io.netty.channel.DefaultChannelPipeline - An exceptionCaught() event was fired, and it reached at the tail of the pipeline. It usually means the last handler in the pipeline did not handle the exception.
io.netty.handler.codec.DecoderException: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:472)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:278)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1434)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:965)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:163)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:644)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:579)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:496)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:458)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:897)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: bad_certificate
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at java.base/sun.security.ssl.SSLEngineImpl.decode(SSLEngineImpl.java:672)
at java.base/sun.security.ssl.SSLEngineImpl.readRecord(SSLEngineImpl.java:627)
at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:443)
at java.base/sun.security.ssl.SSLEngineImpl.unwrap(SSLEngineImpl.java:422)
at java.base/javax.net.ssl.SSLEngine.unwrap(SSLEngine.java:634)
at io.netty.handler.ssl.SslHandler$SslEngineType$3.unwrap(SslHandler.java:294)
at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1297)
at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1199)
at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1243)
at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:502)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:441)
... 16 common frames omitted
14:44:55.609 [recorder-akka.actor.default-dispatcher-4] DEBUG io.gatling.recorder.http.flows.SecuredNoProxyMitmActor - Server channel 6acf48e4 was closed while in Connected state, closing
14:44:55.622 [recorder-akka.actor.default-dispatcher-2] DEBUG io.gatling.recorder.http.flows.PlainNoProxyMitmActor - serverChannel=8d7b2171 received init request http://detectportal.firefox.com/success.txt, connecting
14:44:55.622 [recorder-akka.actor.default-dispatcher-2] DEBUG io.gatling.recorder.http.flows.PlainNoProxyMitmActor - Connecting to Remote(detectportal.firefox.com,80)
14:44:55.629 [recorder-akka.actor.default-dispatcher-4] INFO akka.actor.RepointableActorRef - Message [io.gatling.recorder.http.flows.MitmMessage$ClientChannelInactive] without sender to Actor[akka://recorder/user/$a#-1754914561] was not delivered. [1] dead letters encountered. If this is not an expected behavior, then [Actor[akka://recorder/user/$a#-1754914561]] may have terminated unexpectedly, This logging can be turned off or adjusted with configuration settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-shutdown'.
14:44:55.655 [nioEventLoopGroup-2-2] DEBUG io.gatling.recorder.http.Mitm$ - Open new client channel
How did you configured proxy in your firefox? Do you have proxy only for http or also for https? If you are proxing also https requests then in recorder settings you need to switch "HTTPS mode" to "Certificate Authority". There will be a button to generate new certificate authority file that you need to import to your browser (Preferences / Privacy & Security / Certificates / View certificates / Import). After that your browser will know that it can trust Gatling proxy server and you should be able to proxy also ssl requests.

Apprtc - Websocket connection failed

I have installed and configured AppRTC, Collider, turn-server successfully.
But I am facing an issue of Websocket Error. Google chrome console errors are as follows:
Initializing; server= undefined.
apprtc.debug.js:5583 1.413: Initializing; room=undefined.
apprtc.debug.js:5583 5.209: Opening signaling channel.
apprtc.debug.js:5583 5.390: Got access to local media with mediaConstraints:
'{"audio":true,"video":{"optional":[{"minWidth":"1280"},{"minHeight":"720"}],"mandatory":{}}}'
apprtc.debug.js:5583 5.390: User has granted access to local media.
apprtc.debug.js:5583 5.391: Attaching local stream.
apprtc.debug.js:5092 WebSocket connection to 'wss://104.198.4.111:8089/ws' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED
(anonymous) # apprtc.debug.js:5092
apprtc.debug.js:5583 5.578: WebSocket open error: WebSocket error.
apprtc.debug.js:5583 5.584: WebSocket register error: WebSocket error.
apprtc.debug.js:5583 5.636: Joined the room.
Following is the screenshot of WebSocket error, which I am facing
Collider and AppRTC are on Google VM instance and I have used my own turn-server which has been setup on AWS EC2 instance.
Please help me to resolve this issue.
Is there any setting in Google APP engine, where I deployed an APP?
Advanced help would be appreciated !

IBM watson Discovery + Conversation

I followed the demo shown here. Everything works fine in the demo. But when I tried to use my discovery collection, it gave the error “Service seems to be down. Please try again after sometime or Please check the logs” and the local (wlp) server stopped. See the console log below. Where is the problem?
I used the workspace as used in the demo and changed the “Out-of-scope” intent questions. It retrieves answers from the conversation but not from the discovery?
[AUDIT ] CWWKZ0058I: Monitoring dropins for applications.
[AUDIT ] CWWKT0016I: Web application available (default_host): http://localhost:9080/
[AUDIT ] CWWKZ0001I: Application conversation-with-discovery-0.1-SNAPSHOT started in 10.257 seconds.
[AUDIT ] CWWKF0012I: The server installed the following features: [webProfile-7.0, jaxrs-2.0, json-1.0, appSecurity-2.0, jpa-2.1, cdi-1.2, jaxrsClient-2.0, distributedMap-1.0, websocket-1.1, el-3.0, beanValidation-1.1, ssl-1.0, jdbc-4.1, managedBeans-1.0, servlet-3.1, jsf-2.2, jsp-2.3, jndi-1.0, jsonp-1.0, ejbLite-3.2].
[AUDIT ] CWWKF0011I: The server defaultServer is ready to run a smarter planet.
2017-05-18 14:18:24,684 INFO Log4j appears to be running in a Servlet environment, but there's no log4j-web module available. If you want better web container support, please add the log4j-web JAR to your web archive or server lib directory.
14:18:24.817 [Default Executor-thread-13] INFO com.ibm.watson.apis.conversation_with_discovery.listener.AppServletContextListener - Deploying ServletContextListener
14:18:29.825 [Thread-12] INFO com.ibm.watson.apis.conversation_with_discovery.listener.SetupThread - Setup Complete
14:19:07.748 [Default Executor-thread-1] INFO com.ibm.watson.apis.conversation_with_discovery.discovery.DiscoveryClient - Creating Discovery Payload
[WARNING ] Application {http://rest.conversation_with_discovery.apis.watson.ibm.com/}ProxyResource has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault
[WARNING ] Exception in handleFault on interceptor org.apache.cxf.jaxrs.interceptor.JAXRSDefaultFaultOutInterceptor#54b2f9b0
org.apache.cxf.interceptor.Fault
[ERROR ] Error occurred during error handling, give up!
org.apache.cxf.interceptor.Fault
[ERROR ] SRVE0777E: Exception thrown by application class 'com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.postMessage:192'
java.lang.NullPointerException
at com.ibm.watson.apis.conversation_with_discovery.rest.ProxyResource.postMessage(ProxyResource.java:192)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at com.ibm.ws.jaxrs20.server.LibertyJaxRsServerFactoryBean.performInvocation(LibertyJaxRsServerFactoryBean.java:674)
at [internal classes]

Google App Engine URI Error: /_ah/xrds

In my GAE admin dashboard, everyday I have URI Error below:
/_ah/xrds 50 100%
The application was written in Java. Authentication type is (Experimental) Federated Login.
I checked the log:
"GET /_ah/xrds HTTP/1.0" 404 2107 - - "www.example.com" ms=27 cpu_ms=27
app_engine_release=1.8.0 instance=....
How to prevent this error? What is the cause of the URL error?
Thanks

spring-data-neo4j 2.2.0 has java.security.AccessControlException in Google App Engine

GAE is throwing the following error with spring-data-neo4j 2.2.0. Is there a way to disable threads in spring-data-neo4j?
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission modifyThreadGroup)
(spring-data-neo4j 2.1.0 apparently didn't play with threads and does work in GAE.)

Resources