(I’m not good at English, so I used a translator. I’m sorry.)
This is an offline Jenkins environment.
I am trying to do a Maven build and have installed the necessary plugins manually.
However, the following error occurs when building Maven.
Exception in thread “main” java.net.ConnectException: Connection refused (Connection refused)
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 java.net.Socket.connect(Socket.java:538)
at java.net.Socket.(Socket.java:434)
at java.net.Socket.(Socket.java:211)
at jenkins.maven3.agent.Maven35Main.main(Maven35Main.java:133)
at jenkins.maven3.agent.Maven35Main.main(Maven35Main.java:65)
[workspace] $ /bin/sh -xe {jenkins_dir}/temp/jenkins7436717266301016827.sh
ERROR: Failed to launch Maven. Exit code = 1
Finished: FAILURE
I searched, but the written solution did not solve the problem and the same error occurred.
Can you tell me where I missed it?
thank you
Jenkins setup:
Jenkins: 2.346.3
OS: Linux - 3.10.0-1160.114.2.el7.x86_64
Java: 1.8.0_202 - Oracle Corporation (Java HotSpot™ 64-Bit Server VM)
A stackoverflow article provides several helpful hints that may assist you as you configure Apache Maven for offline builds.
The question is not really related to Jenkins, but to Apache Maven. You may find more assistance from the Apache Maven community where they probably see this type of question more frequently.
Thank you for your answer.
An error is occurring before downloading Maven dependencies.
In the case of version 2.346.3, I knew that Java 8 version was available, so I used the version in the settings.
Can you let me know if there is a problem using Java 8 version?