Uploaded image for project: 'OpenShift Logging'
  1. OpenShift Logging
  2. LOG-4608

[httpserver] Connection refused on IPv6 cluster

XMLWordPrintable

    • False
    • None
    • False
    • NEW
    • NEW
    • Log Collection - Sprint 243

      Description of problem:

      The api is listening on "0.0.0.0:8443". which isn't a valid IPv6 address. it should listen to "[::]:8443" on IPv6-enabled clusters and to "0.0.0.0:8443" on IPv4-only ones.

      [api]
      enabled = true

      [sources.input-http]
      type = "http_server"
      address = "0.0.0.0:8443"
      decoding.codec = "json"

      How reproducible:

      Always

      Steps to Reproduce:

      1) Enable inputs.receiver.http on IPv6 single stack cluster.

      cat <<EOF |  oc apply -f -
      apiVersion: logging.openshift.io/v1
      kind: ClusterLogForwarder
      metadata:
        name: instance
        namespace: openshift-logging
      spec:
        inputs:
          - name: input-http
            receiver:
              http: 
                format: kubeAPIAudit
                receiverPort: 
                  name: httpserver
                  port: 443
                  targetPort: 8443
        pipelines:
          - name: to-default
            inputRefs:
            - input-http
            outputRefs:
            - default
      EOF
      
      cat <<EOF|oc create -f -
      apiVersion: "logging.openshift.io/v1"
      kind: "ClusterLogging"
      metadata:
        name: "instance"
        namespace: openshift-logging
      spec:
        managementState: "Managed"
        logStore:
          type: "elasticsearch"
          elasticsearch:
            nodeCount: 1
            resources:
              limits:
                memory: 2Gi
              requests:
                cpu: 200m
                memory: 2Gi
            storage: {}
            redundancyPolicy: "ZeroRedundancy"
        visualization:
          type: "kibana"
          kibana:
            replicas: 1
        collection:
          type: "vector"
      EOF
      

      2) send message to http server

      $ oc rsh collector-b6twt
      sh-5.1# curl -k https://httpserver.openshift-logging.svc:443 -x POST -d '

      {"test":"test1"}

      '

      Actual results:

      curl: (7) Failed to connect to httpserver.openshift-logging.svc port 443: Connection refused

      Expected results:

      Additional info:

      The httpserver can receive a message after I modified address = "[::]:8443"

            syedriko_sub@redhat.com Sergey Yedrikov
            rhn-support-anli Anping Li
            Anping Li Anping Li
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: