Skip to content

Commit 599450e

Browse files
committed
fix: conflicted ports
1 parent 85dabb9 commit 599450e

File tree

2 files changed

+22
-5
lines changed

2 files changed

+22
-5
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,20 @@ These are the microservices and server side developments with Nestjs and Nodejs
6060
}
6161
}
6262
```
63+
64+
### Check which process is using the port:
65+
66+
```bash
67+
lsof -i :2181
68+
```
69+
70+
```bash
71+
sudo lsof -nP -iTCP:2181 | grep LISTEN
72+
```
73+
74+
### Check for Running Kafka or Zookeeper Processes:
75+
76+
```bash
77+
ps aux | grep kafka
78+
ps aux | grep zookeeper
79+
```

standalone-apis/node-kafka-producer-consumer/docker-compose.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,19 @@ services:
33
zookeeper:
44
image: 'bitnami/zookeeper:latest'
55
ports:
6-
- '2181:2181'
6+
- '2182:2182'
77
environment:
88
- ALLOW_ANONYMOUS_LOGIN=yes
99
kafka:
1010
image: 'bitnami/kafka:latest'
1111
container_name: 'kafka'
1212
ports:
13-
- '9092:9092'
13+
- '9093:9093'
1414
environment:
1515
- KAFKA_BROKER_ID=1
16-
- KAFKA_LISTENERS=PLAINTEXT://:9092
17-
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092
18-
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
16+
- KAFKA_LISTENERS=PLAINTEXT://:9093
17+
- KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9093
18+
- KAFKA_ZOOKEEPER_CONNECT=zookeeper:2182
1919
- ALLOW_PLAINTEXT_LISTENER=yes
2020
depends_on:
2121
- zookeeper

0 commit comments

Comments
 (0)