Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

jira collector java.net.SocketTimeoutException #866

Closed
JustLeo opened this issue Sep 23, 2016 · 10 comments
Closed

jira collector java.net.SocketTimeoutException #866

JustLeo opened this issue Sep 23, 2016 · 10 comments

Comments

@JustLeo
Copy link

JustLeo commented Sep 23, 2016

Jira version: 7.2.0

I'm getting the followin exception after running the collector on Jira:

2016-09-23 13:56:00,001 INFO  c.c.d.collector.CollectorTask - Running Collector: Jira
2016-09-23 13:56:00,011 INFO  c.c.d.collector.CollectorTask - -----------------------------------
2016-09-23 13:56:00,011 INFO  c.c.d.collector.CollectorTask - http://10.252.5.17:8080
2016-09-23 13:56:00,011 INFO  c.c.d.collector.CollectorTask - -----------------------------------
2016-09-23 13:56:20,265 ERROR c.c.d.collector.FeatureCollectorTask - Failed to collect jira information
java.lang.RuntimeException: java.net.SocketTimeoutException
        at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-14.0.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:256) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:249) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:276) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:272) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.atlassian.util.concurrent.Promises$2.onFailure(Promises.java:167) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.google.common.util.concurrent.Futures$4.run(Futures.java:1145) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293) ~[guava-14.0.jar!/:na]

Can anybody tell me what may be the issue here? The communication with Mongo is working fine and I believe I configured correctly the properties file. Will appreciate any help.

Thanks,

Leo

@MarkRx
Copy link
Contributor

MarkRx commented Sep 23, 2016

The collector is having issues communicating with jira. The connection is timing out. Try hitting the rest api manually to see if issues come back in a timely manner. You can also try decreasing the page size.

@JustLeo
Copy link
Author

JustLeo commented Sep 23, 2016

Alredy tried what you are suggesting. Tried with curl from same place where I'm running the collector and its working file, I'm getting the response. Also tried decreasing the page size. Don't know what else to try.

@MarkRx
Copy link
Contributor

MarkRx commented Sep 23, 2016

Turn up debugging by putting these in your properties file:

logging.level.com.atlassian.jira=INFO
logging.level.com.capitalone.dashboard=DEBUG
logging.level.com.capitalone.dashboard.collector=DEBUG

those options are not available through docker-compose so you have to modify the command that is run and point it to a mounted properties file.

Is there more to the stack trace? What line is failing on in the hygieia code?

@JustLeo
Copy link
Author

JustLeo commented Sep 23, 2016

Still not running anything with docker. I have Mongo Up, the API layer UP and connected to the DB, the UI is also showing me that is connected to the API successfully. Only the collector seems to be giving me problems, it is reaching the DB, cause i see it on the log file but for some reason is not getting anything from Jira and I'm getting that Timeout that I showed you.
I added the lines you gave me and here is the complete stack trace:

2016-09-23 16:40:00,003 INFO  c.c.d.collector.CollectorTask - Running Collector: Jira
2016-09-23 16:40:00,015 INFO  c.c.d.collector.CollectorTask - -----------------------------------
2016-09-23 16:40:00,015 INFO  c.c.d.collector.CollectorTask - http://10.252.5.17:8080/
2016-09-23 16:40:00,015 INFO  c.c.d.collector.CollectorTask - -----------------------------------
2016-09-23 16:40:00,015 DEBUG c.c.d.client.team.TeamDataClientImpl - Constructing data collection for the feature widget, team-level data...
2016-09-23 16:40:20,036 ERROR c.c.d.collector.FeatureCollectorTask - Failed to collect jira information
java.lang.RuntimeException: java.net.SocketTimeoutException
        at com.google.common.base.Throwables.propagate(Throwables.java:160) ~[guava-14.0.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:256) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.DefaultHttpClient$3.apply(DefaultHttpClient.java:249) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:276) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.atlassian.util.concurrent.Promises$Of$2.apply(Promises.java:272) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.atlassian.util.concurrent.Promises$2.onFailure(Promises.java:167) ~[atlassian-util-concurrent-2.4.0-M9.jar!/:na]
        at com.google.common.util.concurrent.Futures$4.run(Futures.java:1145) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.MoreExecutors$SameThreadExecutorService.execute(MoreExecutors.java:293) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.ExecutionList$RunnableExecutorPair.execute(ExecutionList.java:150) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.ExecutionList.execute(ExecutionList.java:135) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.AbstractFuture.setException(AbstractFuture.java:203) ~[guava-14.0.jar!/:na]
        at com.google.common.util.concurrent.SettableFuture.setException(SettableFuture.java:68) ~[guava-14.0.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1$2.run(SettableFuturePromiseHttpPromiseAsyncClient.java:59) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable$1.run(SettableFuturePromiseHttpPromiseAsyncClient.java:197) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:90) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:192) ~[atlassian-httpclient-apache-httpcomponents-0.13.2.jar!/:na]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_101]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_101]
        at java.lang.Thread.run(Thread.java:745) [na:1.8.0_101]
Caused by: java.net.SocketTimeoutException: null
        at org.apache.http.nio.protocol.HttpAsyncRequestExecutor.timeout(HttpAsyncRequestExecutor.java:279) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.client.LoggingAsyncRequestExecutor.timeout(LoggingAsyncRequestExecutor.java:128) ~[httpasyncclient-4.0-beta3-atlassian-1.jar!/:4.0-beta3-atlassian-1]
        at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onTimeout(DefaultHttpClientIODispatch.java:136) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.DefaultHttpClientIODispatch.onTimeout(DefaultHttpClientIODispatch.java:50) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.AbstractIODispatch.timeout(AbstractIODispatch.java:169) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.sessionTimedOut(BaseIOReactor.java:257) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.timeoutCheck(AbstractIOReactor.java:494) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.validate(BaseIOReactor.java:207) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.AbstractIOReactor.execute(AbstractIOReactor.java:284) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.BaseIOReactor.execute(BaseIOReactor.java:106) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor$Worker.run(AbstractMultiworkerIOReactor.java:604) ~[httpcore-nio-4.2.2.jar!/:4.2.2]
        ... 1 common frames omitted

@MarkRx
Copy link
Contributor

MarkRx commented Sep 23, 2016

Does curl work from within the running docker container? You can attach a bash shell to the container and run curl.

Is your user account locked that it is trying to use? Is jira behind a proxy?

The code is timing out attempting to get all of the projects on the jira server.

@oshingc
Copy link

oshingc commented Oct 13, 2016

I have the same issue.

loggg

@MarkRx
Copy link
Contributor

MarkRx commented Oct 13, 2016

@oshingc jira version? I have had problems with 7.1.9. In the past it could pull 200 issues in ~1 second. Now it takes 30 seconds. I had to decrease the page size to 25 to get it to work without timing out.

@oshingc
Copy link

oshingc commented Oct 16, 2016

The version I use is Jira v6.4.13

@JustLeo
Copy link
Author

JustLeo commented Oct 17, 2016

Did you resolve it?

@oshingc
Copy link

oshingc commented Oct 17, 2016

I solved this following @MarkRx instructions, see more here #901

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants