1

I'm trying to clean my pom.xml files and store all repository configuration in the settings.xml file. I created a plugin group in nexus then configure a mirror with its url, i also have all credentials in jenkins. Here are my configs.

<profiles>
    <profile>
        <id>nexus</id>
        <activation>
            <activeByDefault>true</activeByDefault>
        </activation>
        <repositories>
            <repository>
                <id>train4</id>
                <url>http://train4</url>
                <releases><enabled>true</enabled></releases>
                <snapshots><enabled>true</enabled></snapshots>
                <layout>p2</layout>
            </repository>
     </profile>
    </profiles>

then the miror

    <mirror>
        <id>train4</id>
        <name>Train 4 Repository</name>
        <url>http://ip:8081/nexus/content/groups/train4/</url>
        <layout>p2</layout>
        <mirrorOfLayouts>p2</mirrorOfLayouts>
        <mirrorOf>*</mirrorOf>
    </mirror>

I got this error in jenkins:

!ENTRY org.eclipse.equinox.p2.transport.ecf 2 0 2017-06-28 18:31:55.062

!MESSAGE Connection to http://ip:8081/nexus/content/groups/train4/p2.index failed on Connection refused. Retry attempt 0 started !STACK 0 org.apache.http.conn.HttpHostConnectException: Connection refused at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:190) at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:151) at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:125)

Can anyone help ? Thanks in advance.

  • Is http://ip:8081 reachable from the Jenkins server? It looks like a firewall issue to me. – fhossfel Jun 29 '17 at 08:54
  • i can access to http://ip:8080/nexus, but not http://ip:8080 thought my browser. I think there is no proxy problem because before creating the plugin group in nexus the configuration worked well with the ... tags – Badam Mamane Jun 29 '17 at 09:07
  • Maybe it is a typo but your section refers to port 8081! – fhossfel Jun 29 '17 at 09:09
  • I pretty sure nexus listens at this port, because when i copy the link http://ip:8081/nexus/content/groups/train4/p2.index and paste it to a browser i can acces the page – Badam Mamane Jun 29 '17 at 09:15
  • I'm still not sure whether is 8080 or 8081 but you need to make sure that either of the following command works from a terminal on the jenkins machine. "wget -O - http:8081/nexus/content/groups/train4/p2.index" or "curl http:8081/nexus/content/groups/train4/p2.index" – fhossfel Jun 29 '17 at 12:34
  • ok, thank you. i just notified it as a repository, without any moror and it works fine – Badam Mamane Jun 29 '17 at 15:45

0 Answers0