2

I have redhat running on VMware and deployed docker container for kafka. When I try to access control center from browser as localhost:9021,I get "connection was reset" error.

     Name                  Command            State                Ports              
--------------------------------------------------------------------------------------
base              /bin/sh                     Up      8083/tcp, 9092/tcp              
connect           /etc/confluent/docker/run   Up      0.0.0.0:8083->8083/tcp, 9092/tcp
control-center    /etc/confluent/docker/run   Up      0.0.0.0:9021->9021/tcp          
kafka-1           /etc/confluent/docker/run   Up      9092/tcp                        
kafka-2           /etc/confluent/docker/run   Up      9092/tcp                        
kafka-3           /etc/confluent/docker/run   Up      9092/tcp                        
ksql-cli          /bin/sh                     Up                                      
ksql-server       /etc/confluent/docker/run   Up      0.0.0.0:8088->8088/tcp          
rest-proxy        /etc/confluent/docker/run   Up      8082/tcp                        
schema-registry   /etc/confluent/docker/run   Up      8081/tcp                        
zk-1              /etc/confluent/docker/run   Up      2181/tcp, 2888/tcp, 3888/tcp    
zk-2              /etc/confluent/docker/run   Up      2181/tcp, 2888/tcp, 3888/tcp    
zk-3              /etc/confluent/docker/run   Up      2181/tcp, 2888/tcp, 3888/tcp 

Tried to reach the port via nmap and curl. Both are giving response as below. The issue is only with the browser (chrome and firefox).

[root@localhost confluent-ops]# nmap -p 9021 localhost

Starting Nmap 6.40 ( http://nmap.org ) at 2020-04-22 15:48 EDT
Nmap scan report for localhost (127.0.0.1)
Host is up (0.00011s latency).
Other addresses for localhost (not scanned): 127.0.0.1
PORT     STATE SERVICE
9021/tcp open  panagolin-ident

Nmap done: 1 IP address (1 host up) scanned in 0.36 seconds


[root@localhost confluent-ops]# curl -vvv -X GET http://localhost:9021
* About to connect() to localhost port 9021 (#0)
*   Trying ::1...
* Connected to localhost (::1) port 9021 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.29.0
> Host: localhost:9021
> Accept: */*
> 

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245

1 Answers1

0

You need to setup port-forwarding from the VM to your host, or you need to setup a NAT network to the VM.

In general, I suggest installing Docker directly on your host or using docker-machine rather than a full VM

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • I dont have option to setup docker, how can we solve this issue? – PAA Mar 25 '21 at 15:19
  • The question post is specifically about Docker. If you don't use Docker, then you don't need port forwarding, so you have some other issues, and should open a new post – OneCricketeer Mar 26 '21 at 22:02
  • I use the docker and setup confluent kafka, I still see tis issue, How can we fix this? I am using dedicated VM - Linux Oracle 8 and trying to install - http://vm-ip/9091 – PAA Mar 31 '21 at 17:52
  • @Pra_A I've already answered your issue on your other question https://stackoverflow.com/questions/66801867/control-center-is-not-accessible-outside-of-vm And since I am unaware of your network setup, I cannot say what IP/address you should be connecting to other than localhost with a port-forward – OneCricketeer Mar 31 '21 at 18:20