Problem with org.apache.http.conn.ConnectTimeoutException
See original GitHub issueHi Folks, I am using Jest 2.0.0 within my application. The code can be seen in the following patch particularly within the following lines. When I run the code I get the following stack trace which is causing me trouble to debug the connection timeout. I wonder if anyone can have a look over the code and tell me if there looks to be anything I am doing wrong? Additionally, does anyone have an idea about what the ConnectTimeoutException may be caused by? Thank you Lewis
java.lang.Exception: org.apache.http.conn.ConnectTimeoutException: Connect to 172.XX.XX.XX:XXXXX[/172.XX.XX.XX] failed: Connection timed out
at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:529)
Caused by: org.apache.http.conn.ConnectTimeoutException: Connect to 172.XX.XX.XX:XXXXX[/172.XX.XX.XX] failed: Connection timed out
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:138)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:318)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:363)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:86)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:184)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:82)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:106)
at io.searchbox.client.http.JestHttpClient.execute(JestHttpClient.java:48)
at org.apache.nutch.indexwriter.memex.MemexIndexWriter.write(MemexIndexWriter.java:110)
at org.apache.nutch.indexer.IndexWriters.write(IndexWriters.java:85)
at org.apache.nutch.indexer.IndexerOutputFormat$1.write(IndexerOutputFormat.java:50)
at org.apache.nutch.indexer.IndexerOutputFormat$1.write(IndexerOutputFormat.java:41)
at org.apache.hadoop.mapred.ReduceTask$OldTrackingRecordWriter.write(ReduceTask.java:493)
at org.apache.hadoop.mapred.ReduceTask$3.collect(ReduceTask.java:422)
at org.apache.nutch.indexer.IndexerMapReduce.reduce(IndexerMapReduce.java:356)
at org.apache.nutch.indexer.IndexerMapReduce.reduce(IndexerMapReduce.java:56)
at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:444)
at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:392)
at org.apache.hadoop.mapred.LocalJobRunner$Job$ReduceTaskRunnable.run(LocalJobRunner.java:319)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
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:745)
Caused by: java.net.ConnectException: Connection timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:579)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:123)
... 26 more
2015-11-24 00:27:35,397 ERROR indexer.IndexingJob - Indexer: java.io.IOException: Job failed!
at org.apache.hadoop.mapred.JobClient.runJob(JobClient.java:836)
at org.apache.nutch.indexer.IndexingJob.index(IndexingJob.java:145)
at org.apache.nutch.indexer.IndexingJob.run(IndexingJob.java:223)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.nutch.indexer.IndexingJob.main(IndexingJob.java:232)
Issue Analytics
- State:
- Created 8 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
How to resolve org.apache.http.conn ... - Stack Overflow
How to resolve org.apache.http.conn.ConnectTimeoutException in Http Request to another server? · 2 · You cannot resolve it if its genuinely not ...
Read more >Caused by: org.apache.http.conn.ConnectTimeoutException ...
Describe the bug. Service discovery error. Client Version. e.g. 13.0.2. Kubernetes Version. e.g. 1.20.+. Java Version. e.g. Java 11.0.5 ...
Read more >Getting org.apache.http.conn.ConnectTimeoutException
I am getting org.apache.http.conn.ConnectTimeoutException: Connect to <host>:<port> timed out error when executing the test caseusing TestRunner command.
Read more >[SOLVED] org.apache.http.conn.ConnectTimeoutException
This means that the problem is in your server. There is probably some DDOS protection or QOS service running that prevents multiple calls...
Read more >org.apache.http.conn.ConnectTimeoutException java code ...
A timeout while connecting to an HTTP server or waiting for an available connection from an HttpConnectionManager.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
OK I actually resolve the issue(s) here. They are as follows
Thank you @kramer for your help Sir. I really appreciate it.
hi @kramer ,l have met a similar problem ,as you mentioned on the second floor ->"Are you getting this error as soon as you run the code or after some successful connections? If it’s the latter I would suspect no free connections in the pool, ",i guess i get the latter,i use the regular way to get the JestClient ,but when i startup the app ,it works well,but i refresh the page after a few minutes, it tells me the error ’ connection reset’, how can i solve the problem ,