'OWASP Dependency Tracker Jenkins Plugin - Connection Refused
I have installed the Dependency tracker plugin in Jenkins but when I'm trying to configure it and test the connection, it is giving an error, and an error message is also not clear to me.
error message:
Connection failed
java.net.ConnectException: Connection refused (Connection refused)
at java.base/java.net.PlainSocketImpl.socketConnect(Native Method)
at java.base/java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:412)
at java.base/java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:255)
at java.base/java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:237)
at java.base/java.net.Socket.connect(Socket.java:609)
at java.base/sun.net.NetworkClient.doConnect(NetworkClient.java:177)
at java.base/sun.net.www.http.HttpClient.openServer(HttpClient.java:474)
Please help me resolve this issue.
Solution 1:[1]
Is both Jenkins and Dependency-Track running as a container?
If so, setting the Dependency-Track URL to http://localhost:9090 will result in Jenkins attempting to connect to port 9090 on its local container.
You can try setting the Dependency-Track URL to use the IP address of the docker network interface. (e.g. http://172.17.0.1:9090)
See https://www.baeldung.com/linux/docker-connecting-containers-to-host.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Paul Anand |


