openshiftv3 service url connection failed from within a project

8/9/2016

I'm just starting to use OpenShift v3. I've been looking for examples on setting up a ci/cd pipeline using jenkins, nexus, sonarqube on openshift. I've found this nice example project but unfortunately I can't get it to work. The project can be found here: https://github.com/OpenShiftDemos/openshift-cd-demo

The problem I'm running into is that once a jenkins job is starting it will try to connect to the nexus service using this url: nexus:8081. This url is made up out of the openshift template by this section:

# Sonatype Nexus
- apiVersion: v1
  kind: Service
  metadata:
    annotations:
      description: Sonatype Nexus repository manager's http port
    labels:
      app: nexus
    name: **nexus**
  spec:
    ports:
    - name: web
      port: **8081**
      protocol: TCP
      targetPort: 8081
    selector:
      app: nexus
      deploymentconfig: nexus
    sessionAffinity: None
    type: ClusterIP

However it seems that jenkins (ran as a pod on openshift within the same project as nexus) can't connect to the url http://nexus:8081 and shows the following:

Connect to nexus:8081 [nexus/172.30.190.210] failed: Connection refused @ line 81, column 25

any idea what is going on?

-- mmelsen
kubernetes
openshift
openshift-enterprise

0 Answers