简体   繁体   中英

jenkins plugin connection refused

I have the following snippet that is part of a Jenkins plugin listed below. The problem is that when running it, I am getting "connection refused" . I am using a Tomcat web server on Ubuntu 16.0.4. It is being hosted on vultr.

The error message (from the console) is listed below - the connection is refused so nothing else can take place

I have also tried the actual IP address and "localhost"

Started by user admin
[EnvInject] - Loading node environment variables.
Building in workspace /var/lib/jenkins/workspace/testagain
Building WAR file for Project...
Opening WaveMaker project: Project
Sending WaveMaker a message: {"params":["Project"],"method":"openProject","id":5}
FATAL: Connection to http://127.0.0.1:8094 refused
java.net.ConnectException: Connection refused
    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

)

The code being called is as follows:


private boolean sendWaveMakerRequest(String serviceUrl, DefaultHttpClient client, String json, String expectedResponse, BuildListener listener) throws UnsupportedEncodingException, IOException, ClientProtocolException { HttpPost postRequest = new HttpPost(serviceUrl);

listener.getLogger().println("Sending WaveMaker a message: " + json); HttpResponse response = sendRequest(client, json, postRequest); if (!checkWaveMakerStatus(listener, response)) { return false; } if (!checkWaveMakerReason(listener, response)) { return false; } return checkJsonResponse(expectedResponse, listener, response); }

Question: What can I do to solve the problem? TIA

You can configure the proxy server that Jenkins will use by going to Manage Jenkins > Manage Plugins > Advanced. This is preferred over setting JVM properties.

https://wiki.jenkins.io/display/JENKINS/JenkinsBehindProxy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM