i am developing flink application as Kafka source. I have completed all required changes to code, but its falling into following error when run on one emr cluster. Could you guys let me know the workaround if anyone already experienced.
Caused by: org.apache.flink.runtime.concurrent.FutureUtils$RetryException: Could not complete the operation. Number of retries has been exhausted.
at org.apache.flink.runtime.concurrent.FutureUtils.lambda$retryOperationWithDelay$8(FutureUtils.java:302)
at java.util.concurrent.CompletableFuture.uniWhenComplete(CompletableFuture.java:774)
at java.util.concurrent.CompletableFuture$UniWhenComplete.tryFire(CompletableFuture.java:750)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.completeExceptionally(CompletableFuture.java:1990)
at org.apache.flink.runtime.rest.RestClient.lambda$submitRequest$1(RestClient.java:342)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:500)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners0(DefaultPromise.java:493)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:472)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:413)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:538)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:531)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:111)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.fulfillConnectPromise(AbstractNioChannel.java:323)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:339)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:685)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(Thread.java:750)
Caused by: java.util.concurrent.CompletionException: org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: ip-xxx-xxx-xxx.dqa.capitalone.com/xx.xxx.xxx.xxx:38257
at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:292)
at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:308)
at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:957)
at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:940)
... 19 more
Caused by: org.apache.flink.shaded.netty4.io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: ip-xxx-xxx-xxx.dqa.capitalone.com/xx.xxx.xxx.xxx:38257
Caused by: java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method)
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:716)
at org.apache.flink.shaded.netty4.io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:327)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:336)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:685)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:632)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:549)
at org.apache.flink.shaded.netty4.io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:511)
at org.apache.flink.shaded.netty4.io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:918)
at org.apache.flink.shaded.netty4.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at java.lang.Thread.run(Thread.java:750)
EMR Cluster-id:
It's failing with a connection failure, trying to talk to ip-xxx-xxx-xxx.dqa.capitalone.com/xx.xxx.xxx.xxx:38257. It seems likely that internal corporate address is not reachable from inside of AWS.
Related
Context
Spring Batch Application & Postgres are hosted on the same server.
Spring Batch Step is running in a multi-threaded manner executing SELECT queries.
The Spring Batch Step executes correctly for awhile, then randomly hits the below error while executing a query against Postgres.
Error
2021-04-29 20:57:31.974 [SimpleAsyncTaskExecutor-1] ERROR org.springframework.batch.core.step.AbstractStep - Encountered an error executing step ECIP_TN in job ECIP_tom_JOB
com.lit.tom.core.exception.ApplicationException: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at com.lit.tom.core.driver.retriever.sql.SqlRetriever.getData(SqlRetriever.java:98) ~[tom-engine-1.2.11-SNAPSHOT.jar!/:1.2.11-SNAPSHOT]
at com.lit.tom.core.driver.retriever.LegacyDataRetriever.retrieveLegacyRecords(LegacyDataRetriever.java:48) ~[tom-engine-1.2.11-SNAPSHOT.jar!/:1.2.11-SNAPSHOT]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_292]
Caused by: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.springframework.jdbc.datasource.DataSourceUtils.getConnection(DataSourceUtils.java:82) ~[spring-jdbc-5.2.13.RELEASE.jar!/:5.2.13.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:371) ~[spring-jdbc-5.2.13.RELEASE.jar!/:5.2.13.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:452) ~[spring-jdbc-5.2.13.RELEASE.jar!/:5.2.13.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.query(JdbcTemplate.java:462) ~[spring-jdbc-5.2.13.RELEASE.jar!/:5.2.13.RELEASE]
at org.springframework.jdbc.core.JdbcTemplate.queryForList(JdbcTemplate.java:490) ~[spring-jdbc-5.2.13.RELEASE.jar!/:5.2.13.RELEASE]
at com.lit.tom.core.driver.retriever.sql.SqlRetriever.getData(SqlRetriever.java:59) ~[tom-engine-1.2.11-SNAPSHOT.jar!/:1.2.11-SNAPSHOT]
... 78 more
Caused by: org.postgresql.util.PSQLException: Connection to 127.0.0.1:5432 refused. Check that the hostname and port are correct and that the postmaster is accepting TCP/IP connections.
at org.postgresql.core.v3.ConnectionFactoryImpl.openConnectionImpl(ConnectionFactoryImpl.java:303) ~[postgresql-42.2.19.jar!/:42.2.19]
at org.postgresql.core.ConnectionFactory.openConnection(ConnectionFactory.java:51) ~[postgresql-42.2.19.jar!/:42.2.19]
at org.postgresql.jdbc.PgConnection.<init>(PgConnection.java:223) ~[postgresql-42.2.19.jar!/:42.2.19]
at org.postgresql.Driver.makeConnection(Driver.java:465) ~[postgresql-42.2.19.jar!/:42.2.19]
at org.postgresql.Driver.connect(Driver.java:264) ~[postgresql-42.2.19.jar!/:42.2.19]
... 78 more
Caused by: java.net.ConnectException: Cannot assign requested address (connect failed)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[?:1.8.0_292]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[?:1.8.0_292]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[?:1.8.0_292]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[?:1.8.0_292]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[?:1.8.0_292]
at java.net.Socket.connect(Socket.java:607) ~[?:1.8.0_292]
Investigative Work
Postgres
Postgres is running, and accepting data on that port.
#Relevant postgres configuration
#listen_addresses = 'localhost'
max_connections = 100
port = 5432
Java
The error is reached faster with more threads.
8, 6, 4, and 2 threads have failed.
Single threaded runs fine.
I'm lost on what to look at, any help would be appreciated.
I discovered the problem, and it was in line with the comments on this post.
The max number of connections was being reached.
The error was coming from a child project, and they had changed the DataSource from HikariCP to the DriverManagerDataSource.
Relevant documentation snippet:
NOTE: This class is not an actual connection pool; it does not actually pool Connections. It just serves as simple replacement for a full-blown connection pool, implementing the same standard interface, but creating new Connections on every call.
The solution was to change back to HikariCP.
I would like to make my Apache Camel application to be more resilient and start even when the MQTT broker is not reachable. We are using Camel on IoT devices with a possibly unstable internet connection and I want our application to start even without internet access.
An exemplary route looks like the following:
from("timer:heartbeat?period=5000")
.routeId("send heartbeat")
.setBody(simple("Hello World!"))
.to("paho:myhostnome/heartbeat?brokerUrl={{broker.url}}")
This works fine as long as the MQTT server is available. However when the server is not reachable, the context fails while warming up the PahoEndpoint.
Caused by: org.apache.camel.FailedToCreateRouteException: Failed to create route send heartbeat: Route(send heartbeat)[[From[timer:heartbeat?period={{heartbe... because of Unable to connect to server
at org.apache.camel.impl.RouteService.warmUp(RouteService.java:147) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3758) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3665) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:3451) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:3305) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:202) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3089) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:3085) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:3108) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:3085) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:3022) ~[camel-core-2.19.3.jar:2.19.3]
at org.apache.camel.spring.boot.RoutesCollector.maybeStart(RoutesCollector.java:242) ~[camel-spring-boot-2.19.3.jar:2.19.3]
at org.apache.camel.spring.boot.RoutesCollector.onApplicationEvent(RoutesCollector.java:217) ~[camel-spring-boot-2.19.3.jar:2.19.3]
... 13 common frames omitted
Caused by: org.eclipse.paho.client.mqttv3.MqttException: Unable to connect to server
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:79) ~[org.eclipse.paho.client.mqttv3-1.1.0.jar:na]
at org.eclipse.paho.client.mqttv3.internal.ClientComms$ConnectBG.run(ClientComms.java:650) ~[org.eclipse.paho.client.mqttv3-1.1.0.jar:na]
at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_121]
Caused by: java.net.ConnectException: Connection refused (Connection refused)
at java.net.PlainSocketImpl.socketConnect(Native Method) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206) ~[na:1.8.0_121]
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188) ~[na:1.8.0_121]
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) ~[na:1.8.0_121]
at java.net.Socket.connect(Socket.java:589) ~[na:1.8.0_121]
at org.eclipse.paho.client.mqttv3.internal.TCPNetworkModule.start(TCPNetworkModule.java:70) ~[org.eclipse.paho.client.mqttv3-1.1.0.jar:na]
My first idea was to disable auto startup on all routes involving Paho and start them manually. This does not work as the PahoEndpoint is started even when the route itself is not started.
I'm now looking for an alternative approach to handle this problem.
Apache Camel 2.20 onwards comes with a new functionality to let the startup procedure run using a superviser controller that takes over starting up from CamelContext itself. This allows to setup more advanced configuration to let the controller handle errors, and attempt to retry starting the failed routes etc.
There is an example where its configured via Spring Boot, but you can configure it from Java API as well: https://github.com/apache/camel/tree/master/examples/camel-example-spring-boot-supervising-route-controller
In the upcoming releases we will improve on this new functionality.
For older versions of Camel then its often the component itself that may or may not offer any kind of retry mechanism, you need to configure, instead of failing fast.
Camel has a try() catch() functionality.
Why not add a try() before calling the to() and catch the exception and then just log it? Something like:
from("timer:heartbeat?period=5000")
.routeId("send heartbeat")
.setBody(simple("Hello World!"))
.doTry()
.to("paho:myhostnome/heartbeat?brokerUrl={{broker.url}}")
.doCatch( java.net.ConnectException.class).log("failed")
.end()
I'm seeing below error in WSO2 API Manager 1.6 after running the wso2server.sh for sometime with average load. I got below error repeatedly on the error log.
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:196)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:127)
... 13 more
[2015-03-03 22:50:48,527] INFO - ReceiverGroup Resending the failed events....
[2015-03-03 22:50:48,527] ERROR - EventPublisher Cannot send events to TCP,localhost:7612,TCP,localhost:7712
org.wso2.carbon.databridge.agent.thrift.exception.EventPublisherException: Cannot send Events
at org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.publish(ThriftEventPublisher.java:93)
at org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.publishEvent(EventPublisher.java:130)
at org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.EventPublisher.run(EventPublisher.java:117)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:744)
Caused by: org.apache.thrift.transport.TTransportException: java.net.SocketException: Connection reset
at org.apache.thrift.transport.TIOStreamTransport.read(TIOStreamTransport.java:129)
at org.apache.thrift.transport.TTransport.readAll(TTransport.java:84)
at org.apache.thrift.protocol.TBinaryProtocol.readAll(TBinaryProtocol.java:378)
at org.apache.thrift.protocol.TBinaryProtocol.readI32(TBinaryProtocol.java:297)
at org.apache.thrift.protocol.TBinaryProtocol.readMessageBegin(TBinaryProtocol.java:204)
at org.apache.thrift.TServiceClient.receiveBase(TServiceClient.java:69)
at org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.recv_publish(ThriftEventTransmissionService.java:146)
at org.wso2.carbon.databridge.commons.thrift.service.general.ThriftEventTransmissionService$Client.publish(ThriftEventTransmissionService.java:133)
at org.wso2.carbon.databridge.agent.thrift.internal.publisher.client.ThriftEventPublisher.publish(ThriftEventPublisher.java:86)
... 5 more
What could be the reason and how can I fix this?
It seems like that you have enabled publishing runtime statistics to BAM. From the log i can see that the server is trying to publish to "TCP,localhost:7612,TCP,localhost:7712" which would be thrift ports. So if you don't have a BAM server running with thrift port 7612 this error would come. You can find more information on publishing runtime statistics to BAM here [1].
[1] https://docs.wso2.com/display/AM160/Publishing+API+Runtime+Statistics
WSO2 ESB sometimes lost JMS connection to Websphere MQ. Establishing new connection last at least 1-2 seconds. This cause timeouts in proxy service using this connection.
WSO2 ESB 4.8.1, IBM Webpshere MQ 7.0.1.12
Strange stacktrace:
2014-12-18 06:47:51,183 [-] [JMSCCThreadPoolWorker-7] ERROR ServiceTaskManager JMS Connection failed : JMSWMQ1107: A problem with this connection has occurred. - shutting down worker tasks
2014-12-18 06:47:52,212 [-] [JMSCCThreadPoolWorker-7] ERROR ServiceTaskManager Error closing shared Connection
com.ibm.msg.client.jms.DetailedJMSException: JMSWMQ0019: Failed to disconnect from queue manager 'name' using connection mode '1' and host name 'host(1441)'. Please see the linked exception for more information.
at com.ibm.msg.client.wmq.common.internal.Reason.reasonToException(Reason.java:608)
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:236)
at com.ibm.msg.client.wmq.internal.WMQConnection.close(WMQConnection.java:742)
at com.ibm.msg.client.jms.internal.JmsConnectionImpl.close(JmsConnectionImpl.java:352)
at com.ibm.mq.jms.MQConnection.close(MQConnection.java:93)
at org.apache.axis2.transport.jms.ServiceTaskManager.stop(ServiceTaskManager.java:237)
at org.apache.axis2.transport.jms.ServiceTaskManager.start(ServiceTaskManager.java:166)
at org.apache.axis2.transport.jms.ServiceTaskManager$MessageListenerTask.onException(ServiceTaskManager.java:631)
at com.ibm.msg.client.jms.internal.JmsProviderExceptionListener.run(JmsProviderExceptionListener.java:429)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.runTask(WorkQueueItem.java:209)
at com.ibm.msg.client.commonservices.workqueue.SimpleWorkQueueItem.runItem(SimpleWorkQueueItem.java:100)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueItem.run(WorkQueueItem.java:224)
at com.ibm.msg.client.commonservices.workqueue.WorkQueueManager.runWorkQueueItem(WorkQueueManager.java:298)
at com.ibm.msg.client.commonservices.j2se.workqueue.WorkQueueManagerImplementation$ThreadPoolWorker.run(WorkQueueManagerImplementation.java:1220)
Caused by: com.ibm.mq.MQException: JMSCMQ0001: WebSphere MQ call failed with compcode '2' ('MQCC_FAILED') reason '2009' ('MQRC_CONNECTION_BROKEN').
at com.ibm.msg.client.wmq.common.internal.Reason.createException(Reason.java:223)
... 12 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009
at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:428)
at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:350)
at com.ibm.mq.jmqi.remote.internal.RemoteHconn.enterCall(RemoteHconn.java:325)
at com.ibm.mq.jmqi.remote.internal.RemoteFAP.MQDISC(RemoteFAP.java:2541)
at com.ibm.msg.client.wmq.internal.WMQConnection.close(WMQConnection.java:724)
... 11 more
Caused by: com.ibm.mq.jmqi.JmqiException: CC=2;RC=2009;AMQ9213: A communications error for 'TCP' occurred. [1=java.net.SocketException[Unrecognized Windows Sockets error: 0: recv failed],4=TCP,5=sockInStream.read]
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.receive(RemoteTCPConnection.java:1418)
at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveBuffer(RemoteRcvThread.java:737)
at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.receiveOneTSH(RemoteRcvThread.java:701)
at com.ibm.mq.jmqi.remote.internal.RemoteRcvThread.run(RemoteRcvThread.java:146)
... 5 more
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:442)
at sun.security.ssl.InputRecord.read(InputRecord.java:480)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:927)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:884)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:102)
at com.ibm.mq.jmqi.remote.internal.RemoteTCPConnection.receive(RemoteTCPConnection.java:1409)
... 8 more
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR MessageInjector Proxy Service: monitoring_Service not found
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR JobRunShell Job synapse.simple.quartz.monitoring_Task threw an unhandled Exception:
org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found
at org.apache.synapse.startup.tasks.MessageInjector.handleError(MessageInjector.java:333)
at org.apache.synapse.startup.tasks.MessageInjector.execute(MessageInjector.java:217)
at org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
2014-12-18 06:49:53,302 [-] [DefaultQuartzScheduler_Worker-1] ERROR ErrorLogger Job (synapse.simple.quartz.monitoring_Task threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found]
at org.quartz.core.JobRunShell.run(JobRunShell.java:224)
at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)
Caused by: org.apache.synapse.SynapseException: Proxy Service: monitoring_Service not found
at org.apache.synapse.startup.tasks.MessageInjector.handleError(MessageInjector.java:333)
at org.apache.synapse.startup.tasks.MessageInjector.execute(MessageInjector.java:217)
at org.apache.synapse.startup.quartz.SimpleQuartzJob.execute(SimpleQuartzJob.java:88)
at org.quartz.core.JobRunShell.run(JobRunShell.java:213)
... 1 more
The key error you're seeing within the stacktrace is:
Caused by: java.net.SocketException: Unrecognized Windows Sockets error: 0: recv failed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
Which indicates that the JVM received something it wasn't expecting over a Windows socket. It looks like you're using an Oracle JVM rather than the IBM one shipped with MQ.
I'd suggest you try upgrading to a newer JVM if one is available. Note that the MQ 7.0.1 client you're using supports Java 5 and Java 6. If you want to use Java 7 you'll need to use an MQ client of 7.1 or later. All IBM MQ clients are available free of charge via the MQC support packs:
MQ 7.1 clients: http://www-01.ibm.com/support/docview.wss?uid=swg24031412
MQ 7.5 clients: http://www-01.ibm.com/support/docview.wss?uid=swg24032744
MQ 8.0 clients: http://www-01.ibm.com/support/docview.wss?uid=swg24037500
If a newer JVM isn't available from Oracle, I'd suggest opening a support ticket with them so they can investigate.
I am trying out GCM for communication between android client and a server application in java.
I am using XMPP based GCM as i need asynchronous, bidirectional messages.
On my client side,
1. Google Play Service check showed that an update is required.
google play services is out of date. Requires 4242000 but found 3136130
Api level- 17, Using AVD with google API, Android 4.2.2
Google play services Revision 15
How can i solve this?
But i can successfully register the device.
On Server side, i use
2. I am using smack library 3.4.1
i used the sample code in google docs.
I get the following error
gcm.googleapis.com:5235 Exception: XMPPError connecting to gcm.googleapis.com:5235.; : remote-server-error(502)
-- caused by: XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502) XMPPError connecting to gcm.googleapis.com:5235.
-- caused by: java.net.ConnectException: Connection timed out: connect
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:592)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at SmackCcsClient.connect(SmackCcsClient.java:247)
at SmackCcsClient.main(SmackCcsClient.java:341)
Nested Exception:
XMPPError connecting to gcm.googleapis.com:5235.: remote-server-error(502) XMPPError connecting to gcm.googleapis.com:5235.
-- caused by: java.net.ConnectException: Connection timed out: connect
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:565)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at SmackCcsClient.connect(SmackCcsClient.java:247)
at SmackCcsClient.main(SmackCcsClient.java:341)
Nested Exception:
java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(Unknown Source)
at org.jivesoftware.smack.XMPPConnection.connectUsingConfiguration(XMPPConnection.java:557)
at org.jivesoftware.smack.XMPPConnection.connect(XMPPConnection.java:1010)
at SmackCcsClient.connect(SmackCcsClient.java:247)
at SmackCcsClient.main(SmackCcsClient.java:341)
Exception in thread "main" java.lang.IllegalStateException: Not connected to server.
at org.jivesoftware.smack.XMPPConnection.sendPacket(XMPPConnection.java:483)
at SmackCcsClient.send(SmackCcsClient.java:131)
at SmackCcsClient.main(SmackCcsClient.java:356)
I have signed up the form for upstream messaging. but the approval is still pending. But the connection itself fails here. How can i solve this.
Please Help!
Thank you in advance!!
The ERROR CODE 502 implies that there is problem with connecting SERVER, There might be several reasons but some common problem are,
1 ) FIREWALL PROBLEM ----[configure properly your firewall]
2 ) Server internal error ----[retry latter]