Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

not able to run docker image #67

Closed
k92ankita opened this issue Oct 15, 2018 · 5 comments
Closed

not able to run docker image #67

k92ankita opened this issue Oct 15, 2018 · 5 comments

Comments

@k92ankita
Copy link

Hi,

I am getting following error while trying to use docker image:

sudo docker run -ti --rm -p 9308:9308 danielqsj/kafka-exporter --kafka.server=kafka1ip:9092 --kafka.server=kafka2ip:9092 --kafka.server=kafka3ip:9092
INFO[0000] Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=74450bffe4fd6df1a8c85c54bb2babb7506ac7fc) source="kafka_exporter.go:423"
INFO[0000] Build context (go=go1.9, user=travis@travis-job-999c3d4e-5314-489c-97c2-b78ee2befa68, date=20181008-03:07:38) source="kafka_exporter.go:424"
panic: runtime error: index out of range

goroutine 1 [running]:
main.main()
/home/travis/gopath/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:429 +0x520c

can you please help?
go version: go version go1.9.3 linux/amd64

@wakeful
Copy link
Contributor

wakeful commented Oct 16, 2018

can you share your docker-compose file? did you check that you can resolve kafka3ip from inside the container?

@skiloop
Copy link
Contributor

skiloop commented Oct 22, 2018

this is an arguments parsing error, default value for kafka.labels makes it fail to split

skiloop added a commit to skiloop/kafka_exporter that referenced this issue Oct 22, 2018
skiloop added a commit to skiloop/kafka_exporter that referenced this issue Oct 23, 2018
@mkaranasou
Copy link

👍

@StephanX
Copy link

StephanX commented Oct 24, 2018

this latest update breaks for me. Have reverted to v1.2.0 for now.

> ku logs -f p8s-kafka-exporter-579fd7f7d8-xt2wb    

time="2018-10-24T15:53:49Z" level=info msg="Starting kafka_exporter (version=1.2.0, branch=HEAD, revision=74450bffe4fd6df1a8c85c54bb2babb7506ac7fc)" source="kafka_exporter.go:423"
time="2018-10-24T15:53:49Z" level=info msg="Build context (go=go1.9, user=travis@travis-job-999c3d4e-5314-489c-97c2-b78ee2befa68, date=20181008-03:07:38)" source="kafka_exporter.go:424"
panic: runtime error: index out of range

goroutine 1 [running]:
main.main()
	/home/travis/gopath/src/github.com/danielqsj/kafka_exporter/kafka_exporter.go:429 +0x520c

kind: Deployment
metadata:
  name: p8s-kafka-exporter
  namespace: deploy
spec:
  replicas: 1
  strategy:
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: p8s-kafka-exporter
        component: node-exporter
    spec:
      securityContext:
        runAsNonRoot: true
        runAsUser: 1000
      containers:
      - image: danielqsj/kafka-exporter:latest
        command: ["sh", "-c", "kafka_exporter --kafka.server=kafka-0.kafka:9092 --kafka.server=kafka-1.kafka:9092 --kafka.server=kafka-2.kafka:9092"]
        securityContext:
          capabilities:
            drop:
            - SETPCAP
            - MKNOD
            - AUDIT_WRITE
            - CHOWN
            - NET_RAW
            - DAC_OVERRIDE
            - FOWNER
            - FSETID
            - KILL
            - SETGID
            - SETUID
            - NET_BIND_SERVICE
            - SYS_CHROOT
            - SETFCAP
          readOnlyRootFilesystem: true
        livenessProbe:
          httpGet:
            path: /health
            port: 9308
          initialDelaySeconds: 30
          timeoutSeconds: 10
        name: p8s-kafka-exporter
        ports:
        - containerPort: 9308
        env:
        readinessProbe:
          httpGet:
            path: /health
            port: 9308
          initialDelaySeconds: 10
          timeoutSeconds: 10
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 25m
            memory: 64Mi
      restartPolicy: Always

danielqsj added a commit that referenced this issue Nov 6, 2018
@danielqsj
Copy link
Owner

thanks @skiloop , merged PR.
Closed this issue, if problem still existing, we can reopen it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants