I have been using STOMP and sockjs for some time now, but the error below happens at times.
12:57:30.976 [48] [tcp-client-loop-nio-4] INFO org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler - TCP connection failure in session w6s21o5d: failed to forward DISCONNECT session=w6s21o5d
reactor.netty.channel.AbortedException: io.netty.channel.StacklessClosedChannelException
at reactor.netty.FutureMono$FutureSubscription.wrapError(FutureMono.java:186) ~[reactor-netty-core-1.0.7.jar!/:1.0.7]
at reactor.netty.FutureMono$FutureSubscription.operationComplete(FutureMono.java:177) [reactor-netty-core-1.0.7.jar!/:1.0.7]
at io.netty.util.concurrent.DefaultPromise.notifyListener0(DefaultPromise.java:578) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListenersNow(DefaultPromise.java:552) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.DefaultPromise.notifyListeners(DefaultPromise.java:491) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.DefaultPromise.setValue0(DefaultPromise.java:616) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.DefaultPromise.setFailure0(DefaultPromise.java:609) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.DefaultPromise.tryFailure(DefaultPromise.java:117) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.safeSetFailure(AbstractChannel.java:1021) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannel$AbstractUnsafe.write(AbstractChannel.java:882) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.DefaultChannelPipeline$HeadContext.write(DefaultChannelPipeline.java:1367) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite(AbstractChannelHandlerContext.java:709) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:792) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.write(AbstractChannelHandlerContext.java:702) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.handler.timeout.IdleStateHandler.write(IdleStateHandler.java:304) [netty-handler-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWrite0(AbstractChannelHandlerContext.java:717) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext.invokeWriteAndFlush(AbstractChannelHandlerContext.java:764) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.AbstractChannelHandlerContext$WriteTask.run(AbstractChannelHandlerContext.java:1071) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:497) [netty-transport-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.65.Final.jar!/:4.1.65.Final]
at java.lang.Thread.run(Thread.java:829) [?:?]
Caused by: io.netty.channel.StacklessClosedChannelException
The disconnection message is send from frontend as shown below before page reload.
window.addEventListener("beforeunload", function () {
client.disconnect(function () {
log("disconnect websocket..");
});
});
No logic is written in backend to handle this spring-stomp handles rest of it.
I have gone through resources in STOMP and there is still no explanation on why or exactly on what scenarios this is happening. What could be the possible reasons for this error.
Related
I am using redisson api 'org.redisson:redisson:3.13.6' to consume redis(redis 6.2.5) stream in my java project. After running for months. shows error:
[02:45:28:123] [ERROR] - org.redisson.client.handler.PingConnectionHandler$1.run(PingConnectionHandler.java:79) - Unable to send PING command over channel: [id: 0x5aa1ca8d, L:0.0.0.0/0.0.0.0:56714]
org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://cruise-redis-master.reddwarf-cache.svc.cluster.local:6379]
at org.redisson.client.RedisConnection.lambda$async$1(RedisConnection.java:207) ~[redisson-3.13.6.jar!/:3.13.6]
at org.redisson.client.RedisConnection$$Lambda$952/0x000000003818de40.run(Unknown Source) ~[?:?]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at java.lang.Thread.run(Thread.java:836) [?:?]
[02:45:28:126] [ERROR] - org.redisson.client.handler.PingConnectionHandler$1.run(PingConnectionHandler.java:79) - Unable to send PING command over channel: [id: 0x306c5661, L:0.0.0.0/0.0.0.0:56750]
org.redisson.client.RedisTimeoutException: Command execution timeout for command: (PING), params: [], Redis client: [addr=redis://cruise-redis-master.reddwarf-cache.svc.cluster.local:6379]
at org.redisson.client.RedisConnection.lambda$async$1(RedisConnection.java:207) ~[redisson-3.13.6.jar!/:3.13.6]
at org.redisson.client.RedisConnection$$Lambda$952/0x000000003818de40.run(Unknown Source) ~[?:?]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.run(HashedWheelTimer.java:715) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.concurrent.ImmediateExecutor.execute(ImmediateExecutor.java:34) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$HashedWheelTimeout.expire(HashedWheelTimer.java:703) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$HashedWheelBucket.expireTimeouts(HashedWheelTimer.java:790) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.HashedWheelTimer$Worker.run(HashedWheelTimer.java:503) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [netty-common-4.1.70.Final.jar!/:4.1.70.Final]
at java.lang.Thread.run(Thread.java:836) [?:?]
I could connection to redis success, some channels works fine, some channels failed. anyone facing the same problem? why would this happen? what should I do to fix the problem?
My bad, I have copied the wrong url, the correct one should be: https://github.com/redisson/redisson/wiki/16.-FAQ#q-i-saw-a-redistimeoutexception-what-does-it-mean-what-shall-i-do-can-redisson-team-fix-it
I've created global route for all incoming requests and face with AbstractErrorWebExceptionHandler.
My application.yml
spring:
cloud:
gateway:
routes:
- id: global_route
uri: http://localhost:8082
predicates:
- Path=/**
filters:
- RewritePath=/service(?<segment>/?.*), $\{segment}
- id: authorization_route
uri: http://localhost:8082
predicates:
- Path=/key/login
filters:
- JWTFilter=RSA512,HS512
Logs when I run the application:
2020-10-28 09:31:58.606 ERROR 9184 --- [ctor-http-nio-1] a.w.r.e.AbstractErrorWebExceptionHandler : [6d5d3da0] 500 Server Error for HTTP GET "/keyfd"
io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information: localhost/127.0.0.1:8082
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [DefaultWebFilterChain]
|_ checkpoint ⇢ HTTP GET "/keyfd" [ExceptionHandlingWebHandler]
Stack trace:
Caused by: java.net.ConnectException: Connection refused: no further information
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.8.0_221]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:717) ~[na:1.8.0_221]
at io.netty.channel.socket.nio.NioSocketChannel.doFinishConnect(NioSocketChannel.java:330) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.channel.nio.AbstractNioChannel$AbstractNioUnsafe.finishConnect(AbstractNioChannel.java:334) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:702) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:650) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:576) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:493) ~[netty-transport-4.1.52.Final.jar:4.1.52.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.52.Final.jar:4.1.52.Final]
at java.lang.Thread.run(Thread.java:748) ~[na:1.8.0_221]
Thank you for help.
The error cause is that I specified uri for spring cloud gateway the same as uri I'm running this application. So application started on localhost:8082 and the uri for route was localhost:8082.
I'm trying to upload 250 files which size is approximately 5mb using my Azure Storage Client in version 12.4.0 on my Spring Boot app. Right after performing this upload with JMeter I receive the error, then waiting a few minutes most of the files are uploaded, some fail with error. I've added all logs and code below.
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-storage-blob</artifactId>
<version>12.4.0</version>
</dependency>
Client Code
public class AzureStorageClient implements StorageClient {
private final Logger LOGGER = LoggerFactory.getLogger(AzureStorageClient.class);
private final BlobContainerClient containerClient;
public AzureStorageClient(final AzureStorageServiceProvider provider, String storageContainer) {
var serviceClient = provider.createServiceClient();
this.containerClient = serviceClient.getBlobContainerClient(storageContainer);
if (!this.containerClient.exists()) {
throw new StorageClientInitException("No container exists with name " + storageContainer);
}
}
#Override
public void store(final String blobPath, final String originalFileName, final byte[] bytes) {
final BlobClient blobClient = containerClient.getBlobClient(blobPath);
final BlockBlobClient blockBlobClient = blobClient.getBlockBlobClient();
try (ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes)) {
LOGGER.info("Started: upload file {} with original name {}", blobPath, originalFileName);
blockBlobClient.upload(inputStream, bytes.length, true);
LOGGER.info("Finished: file {} with original name {}", blobPath, originalFileName);
} catch (BlobStorageException | IOException exc) {
throw new StorageException(exc);
}
}
}
Errors Right After Upload:
2020-04-06 21:55:00.374 WARN 1700 --- [ctor-http-nio-3] r.netty.http.client.HttpClientConnect : [id: 0x441e3068, L:/192.168.0.11:55049 - R:somestorageaccount.blob.core.windows.net/11.11.111.11:443] The connection observed an error
javax.net.ssl.SSLException: handshake timed out
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2001) ~[netty-handler-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2020-04-06 21:55:01.717 WARN 1700 --- [ctor-http-nio-3] r.netty.http.client.HttpClientConnect : [id: 0x16c7448d, L:/192.168.0.11:55085 - R:somestorageaccount.blob.core.windows.net/11.11.111.11:443] The connection observed an error
javax.net.ssl.SSLException: handshake timed out
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2001) ~[netty-handler-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2020-04-06 21:55:03.028 WARN 1700 --- [ctor-http-nio-6] r.netty.http.client.HttpClientConnect : [id: 0x13bee15d, L:/192.168.0.11:55064 - R:somestorageaccount.blob.core.windows.net/11.11.111.11:443] The connection observed an error
javax.net.ssl.SSLException: handshake timed out
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2001) ~[netty-handler-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2020-04-06 21:55:03.957 WARN 1700 --- [tor-http-nio-12] r.netty.http.client.HttpClientConnect : [id: 0x196d50c9, L:/192.168.0.11:55118 - R:somestorageaccount.blob.core.windows.net/11.11.111.11:443] The connection observed an error
javax.net.ssl.SSLException: handshake timed out
at io.netty.handler.ssl.SslHandler$5.run(SslHandler.java:2001) ~[netty-handler-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.PromiseTask.runTask(PromiseTask.java:98) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.ScheduledFutureTask.run(ScheduledFutureTask.java:170) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:164) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:472) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:500) ~[netty-transport-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:989) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) ~[netty-common-4.1.45.Final.jar:4.1.45.Final]
at java.base/java.lang.Thread.run(Thread.java:834) ~[na:na]
2020-04-06 21:55:13.369 WARN 1700 --- [ctor-http-nio-8] r.netty.http.client.HttpClientConnect : [id: 0x5a704036, L:0.0.0.0/0.0.0.0:55054] The connection observed an error
reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body
After some time files are uploaded, but not all:
020-04-06 21:58:38.989 INFO 1700 --- [io-8080-exec-34] c.c.f.cloud.AzureStorageClient : Finished: file 40fcbd8fc41b447f91fc9e01c11a79fb with original name oswietlenie.pdf
2020-04-06 21:58:51.835 WARN 1700 --- [ctor-http-nio-8] r.netty.http.client.HttpClientConnect : [id: 0xfc719110, L:0.0.0.0/0.0.0.0:55102] The connection observed an error
reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body
2020-04-06 21:58:56.033 WARN 1700 --- [tor-http-nio-12] r.netty.http.client.HttpClientConnect : [id: 0x870e83db, L:0.0.0.0/0.0.0.0:55082] The connection observed an error
reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body
2020-04-06 21:59:00.580 INFO 1700 --- [io-8080-exec-62] c.c.f.cloud.AzureStorageClient : Finished: file b007415bfd114a15b9fcbd3591f0b35a with original name oswietlenie.pdf
While running the command:
storm jar target/crawlIndexer-1.0-SNAPSHOT.jar org.apache.storm.flux.Flux --local es-injector.flux --sleep 86400000
I get an error saying:
8710 [Thread-26-status-executor[4 4]] ERROR c.d.s.e.p.StatusUpdaterBolt -
Can't connect to ElasticSearch
When running http://localhost:9200/ in browser ES successfully loads up. Kibana also connects to ES. So it must just be the connection from StromCrawler to ElasticSearch.
What could be the issue?
Snippet of full error:
8710 [Thread-26-status-executor[4 4]] ERROR c.d.s.e.p.StatusUpdaterBolt - Can't connect to ElasticSearch
java.lang.RuntimeException: java.net.UnknownHostException: http: nodename nor servname provided, or not known
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getClient(ElasticSearchConnection.java:107) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getConnection(ElasticSearchConnection.java:151) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at com.digitalpebble.stormcrawler.elasticsearch.persistence.StatusUpdaterBolt.prepare(StatusUpdaterBolt.java:141) [crawlIndexer-1.0-SNAPSHOT.jar:?]
at org.apache.storm.daemon.executor$fn__5044$fn__5057.invoke(executor.clj:791) [storm-core-1.1.0.jar:1.1.0]
at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:482) [storm-core-1.1.0.jar:1.1.0]
at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: java.net.UnknownHostException: http: nodename nor servname provided, or not known
at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) ~[?:1.8.0_151]
at java.net.InetAddress$2.lookupAllHostAddr(InetAddress.java:928) ~[?:1.8.0_151]
at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1323) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName0(InetAddress.java:1276) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_151]
at java.net.InetAddress.getByName(InetAddress.java:1076) ~[?:1.8.0_151]
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getClient(ElasticSearchConnection.java:104) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
... 6 more
8710 [Thread-18-__metricscom.digitalpebble.stormcrawler.elasticsearch.metrics.MetricsConsumer-executor[2 2]] ERROR c.d.s.e.m.MetricsConsumer - Can't connect to ElasticSearch
java.lang.RuntimeException: java.net.UnknownHostException: http
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getClient(ElasticSearchConnection.java:107) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getConnection(ElasticSearchConnection.java:151) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getConnection(ElasticSearchConnection.java:133) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at com.digitalpebble.stormcrawler.elasticsearch.metrics.MetricsConsumer.prepare(MetricsConsumer.java:68) [crawlIndexer-1.0-SNAPSHOT.jar:?]
at org.apache.storm.metric.MetricsConsumerBolt.prepare(MetricsConsumerBolt.java:77) [storm-core-1.1.0.jar:1.1.0]
at org.apache.storm.daemon.executor$fn__5044$fn__5057.invoke(executor.clj:791) [storm-core-1.1.0.jar:1.1.0]
at org.apache.storm.util$async_loop$fn__557.invoke(util.clj:482) [storm-core-1.1.0.jar:1.1.0]
at clojure.lang.AFn.run(AFn.java:22) [clojure-1.7.0.jar:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: java.net.UnknownHostException: http
at java.net.InetAddress.getAllByName0(InetAddress.java:1280) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1192) ~[?:1.8.0_151]
at java.net.InetAddress.getAllByName(InetAddress.java:1126) ~[?:1.8.0_151]
at java.net.InetAddress.getByName(InetAddress.java:1076) ~[?:1.8.0_151]
at com.digitalpebble.stormcrawler.elasticsearch.ElasticSearchConnection.getClient(ElasticSearchConnection.java:104) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
... 8 more
8714 [Thread-26-status-executor[4 4]] ERROR o.a.s.util - Async loop died!
java.lang.RuntimeException: java.lang.RuntimeException: java.net.UnknownHostException: http: nodename nor servname provided, or not known
at com.digitalpebble.stormcrawler.elasticsearch.persistence.StatusUpdaterBolt.prepare(StatusUpdaterBolt.java:145) ~[crawlIndexer-1.0-SNAPSHOT.jar:?]
at org.apache.storm.daemon.executor$fn__5044$fn__5057.invoke(executor.clj:791) ~[storm-core-1.1.0.jar:1.1.0]
Perhaps there is something I need to modify in elasticsearch.yml or es-conf.yml? (They both have default settings)
Got the application to work by playing around (for many hours).
Steps:
Reverted back Storm-Crawler-Core and Storm-Crawler-Elastic-Search to version 1.5 in the maven file.
Used the 1.5 flux/yaml config file versions from Storm-Crawler-Elastic-Search
Using Elastic Search 5.4.0
Using Kibana 5.4.0
Your error message above mentions ElasticSearchConnection.java:104 so you must be using a release and not the code from the master branch. Make sure the es conf corresponds to the same version. Did you copy the conf from the master branch? The next release will have a different format for the addresses
I am trying an example of Akka-Remoting. Every time I start my remote actor system I get this exception
[INFO] [11/25/2013 18:50:19.811] [main] [Remoting] Starting remoting
Exception in thread "main" org.jboss.netty.channel.ChannelException: Failed to bind to: /10.147.137.44:2555
at org.jboss.netty.bootstrap.ServerBootstrap.bind(ServerBootstrap.java:272)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:391)
at akka.remote.transport.netty.NettyTransport$$anonfun$listen$1.apply(NettyTransport.scala:388)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:206)
at scala.util.Try$.apply(Try.scala:161)
at scala.util.Success.map(Try.scala:206)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.Future$$anonfun$map$1.apply(Future.scala:235)
at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.processBatch$1(BatchingExecutor.scala:67)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply$mcV$sp(BatchingExecutor.scala:82)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at akka.dispatch.BatchingExecutor$Batch$$anonfun$run$1.apply(BatchingExecutor.scala:59)
at scala.concurrent.BlockContext$.withBlockContext(BlockContext.scala:72)
at akka.dispatch.BatchingExecutor$Batch.run(BatchingExecutor.scala:58)
at akka.dispatch.TaskInvocation.run(AbstractDispatcher.scala:42)
at akka.dispatch.ForkJoinExecutorConfigurator$AkkaForkJoinTask.exec(AbstractDispatcher.scala:386)
at scala.concurrent.forkjoin.ForkJoinTask.doExec(ForkJoinTask.java:260)
at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1339)
at scala.concurrent.forkjoin.ForkJoinPool.runWorker(ForkJoinPool.java:1979)
at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:107)
Caused by: java.net.BindException: Cannot assign requested address
at sun.nio.ch.Net.bind0(Native Method)
at sun.nio.ch.Net.bind(Net.java:444)
at sun.nio.ch.Net.bind(Net.java:436)
at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:214)
at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74)
at org.jboss.netty.channel.socket.nio.NioServerBoss$RegisterTask.run(NioServerBoss.java:193)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:366)
at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:290)
at org.jboss.netty.channel.socket.nio.NioServerBoss.run(NioServerBoss.java:42)
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)
Here is my application.conf details
remoteCalculator{
akka {
actor {
provider = "akka.remote.RemoteActorRefProvider"
}
remote {
transport = "akka.remote.netty.NettyRemoteTransport"
log-received-messages = on
log-sent-messages = on
log-remote-lifecycle-events = on
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
hostname = "10.147.137.44"
port = 2555
log-received-messages = on
log-sent-messages = on
log-remote-lifecycle-events = on
}
}
}
}
I tried finding the possibility of another application listening to the port 2555 by executing following command
sudo netstat -anp | grep 2555
But it doesn't gives anything. Please help me find out the reason why the application is not able to bind on the configured address.
I got the root cause of the problem. Actually it was not a configuration/proramming issue. I am working on a virtual host (Ubuntu) inside my window OS and I had not enabled the network bridge. So, the virtual host was not able to identify the hostName. After enabling the network bridge, the issue got solved.