jenkinsci / jenkinsci/java-client-api
HttpHostConnectException
- Langage dominant
- Java
- Étoiles
- 913
- Forks
- 466
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
my code like this:
js=new JenkinsServer(new URI("http://localhost:8080"), "xxx", "xxx");
JobWithDetails job = js.getJob("jobName");
QueueReference queueRef = job.build(map,true);
it report an exception:
org.apache.http.conn.HttpHostConnectException: Connect to 52.xxx.xxx.54:8080 [/52.xxx.xxx.54] failed: Connection timed out (Connection timed out)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.connect(PoolingHttpClientConnectionManager.java:319)
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 com.offbytwo.jenkins.client.JenkinsHttpClient.post(JenkinsHttpClient.java:257)
at com.offbytwo.jenkins.model.Job.build(Job.java:151)
at com.offbytwo.jenkins.model.Job.build(Job.java:125)
at com.xxx.App.build(App.java:67)
at com.xxx.App.execJob(App.java:42)
at com.xxx.App.main(App.java:28)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.mojo.exec.ExecJavaMojo$1.run(ExecJavaMojo.java:282)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.ConnectException: Connection timed out (Connection timed out)
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:350)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at org.apache.http.conn.socket.PlainConnectionSocketFactory.connectSocket(PlainConnectionSocketFactory.java:72)
at org.apache.http.impl.conn.HttpClientConnectionOperator.connect(HttpClientConnectionOperator.java:125)
... 20 more
I use local IP which is replaced by public IP when build it
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Start with the reported call path through Job.build and JenkinsHttpClient.post, then compare the supplied JenkinsServer URI with the endpoint in the exception. Reproduce the timeout and establish whether the client reports an actionable defect; done requires a confirmed client-side issue or a clarified, reproducible report.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- api
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 20/100