kafka-connect-ui icon indicating copy to clipboard operation
kafka-connect-ui copied to clipboard

kafka-connect-ui exit(2) when running on linux

Open iamacoderguy opened this issue 3 years ago • 5 comments

Hi team,

When lunching the image landoop/kafka-connect-ui on linux, it exited with error code = 2. The logs are as following

Landoop Kafka Connect UI
Visit <https://github.com/Landoop/kafka-connect-ui/tree/master/docker>
to find more about how you can configure this container.

Enabling proxy. You can disable this via PROXY=false.
Note: if you use a PORT lower than 1024, please note that kafka-connect-ui can
now run under any user. In the future a non-root user may become the default.
In this case you will have to explicitly allow binding to such ports, either by
setting the root user or something like '--sysctl net.ipv4.ip_unprivileged_port_start=0'.

Activating privacy features... done.
http://0.0.0.0:8000
panic: runtime error: slice bounds out of range

goroutine 1 [running]:
github.com/mholt/caddy/vendor/github.com/miekg/dns.ClientConfigFromFile(0xb5fb42, 0x10, 0x0, 0x0, 0x0)
        /var/folders/d4/3d8k5bgd62v9h2c5f05xkyx80000gn/T/gopath_02-19-2255.179888757/src/github.com/mholt/caddy/vendor/github.com/miekg/dns/clientconfig.go:86 +0x9c4
github.com/mholt/caddy/vendor/github.com/xenolf/lego/acme.getNameservers(0xb5fb42, 0x10, 0xf79b40, 0x2, 0x2, 0xbe7720, 0xc42007e2d0, 0xc420061f58)
        /var/folders/d4/3d8k5bgd62v9h2c5f05xkyx80000gn/T/gopath_02-19-2255.179888757/src/github.com/mholt/caddy/vendor/github.com/xenolf/lego/acme/dns_challenge.go:40 +0x4d

Our docker compose configuration:

connect-ui:
    image: landoop/kafka-connect-ui
    container_name: connect-ui
    depends_on:
      - connect
    ports:
      - "8001:8000"
    environment:
      - "CONNECT_URL=http://connect:8083"

It's running well when using docker in windows with WSL.

Do you have any suggestions?

Thank you,

iamacoderguy avatar Jun 11 '21 14:06 iamacoderguy

I am having exactly the same issue. While troubleshooting I found out that running the container without docker-compose actually works.

So this works:

docker run -d -it -p 8083:8000 \
 -e "CONNECT_URL=http://10.10.0.10:8083" \
 landoop/kafka-connect-ui

But within docker-compose throws in the error.

Edit: Continuing my troubleshooting I have this service running with docker-compose on another server which runs Ubuntu 18. The error I am getting on Ubuntu 20 and docker-compose. Changing to an older docker-compose version didn't have any effect.

spirit986 avatar Jul 07 '21 11:07 spirit986

The workaround is to add this line

network_mode: bridge

for service in docker-compose.yml

user578 avatar Sep 17 '21 12:09 user578

the solution of @user578 is also working. the problem of it is that it creates a new, isolated network for kafka-connect-ui and if you have a kafka-connect instance on docker-compose file. it can't be accessible by kafka-connect-ui.

to overcome this issue, my setup below worked well.

version: '3.6'
services:
  ...
  kafka_connect_ui:
    container_name: kafka_connect_ui
    image: landoop/kafka-connect-ui
    ports:
      - "9001:8000"
    environment:
      CONNECT_URL: http://connect1:8083
    depends_on:
      - connect1
    network_mode: bridge
    extra_hosts:
      - "connect1:host-gateway"
  connect1:
    image: debezium/connect:1.5
    volumes:
      - connect
    ports:
      - "8083:8083"
    depends_on:
      - kafka1
      - kafka2
      - kafka3
    environment:
      - BOOTSTRAP_SERVERS=kafka1:9092,kafka2:9092,kafka3:9092
      - GROUP_ID=1
      - CONFIG_STORAGE_TOPIC=my_connect_configs
      - OFFSET_STORAGE_TOPIC=my_connect_offsets
      - STATUS_STORAGE_TOPIC=my_connect_statuses
    ....

wilius avatar Oct 04 '21 10:10 wilius

I am also experiencing this on Ubuntu 20.10 are there an alternative solution to running it in bridge mode?

looopTools avatar Apr 11 '23 11:04 looopTools

p.s for who don't wanna build docker and simple want this issue fixed docker:

base on the latest version currently, I've built one

docker pull nov30th/kafka-connect-ui:v1.0.0

nov30th avatar Dec 17 '23 10:12 nov30th