Closed Sharvin26 closed 5 years ago
Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.
I think the issue might be KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
on your Kafka config, this is the address where you tell Kafka to listen to connections to & you told it to listen to an address that's only available to the containers that are part of the same docker-compose, please try KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://<my_vps_url>:9092
instead.
Hello @naorlivne
Thanks for the Response.
I changed KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://kafka:9092
to KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://<my_vps_url>:9092
.
But I am still facing the same issue.
docker-compose.yml
for Nebula Manager, Mongo, Kafka, Reporter and Zookeeper =>
version: '3'
services:
mongo:
container_name: mongo
hostname: mongo
image: mongo:4.0.1
ports:
- "27017:27017"
restart: unless-stopped
environment:
MONGO_INITDB_ROOT_USERNAME: nebula
MONGO_INITDB_ROOT_PASSWORD: nebula
manager:
container_name: manager
hostname: manager
depends_on:
- mongo
image: nebulaorchestrator/manager
ports:
- "80:80"
restart: unless-stopped
environment:
MONGO_URL: mongodb://nebula:nebula@mongo:27017/nebula?authSource=admin
SCHEMA_NAME: nebula
BASIC_AUTH_PASSWORD: nebula
BASIC_AUTH_USER: nebula
AUTH_TOKEN: nebula
zookeeper:
container_name: zookeeper
hostname: zookeeper
image: zookeeper:3.4.13
ports:
- 2181:2181
restart: unless-stopped
environment:
ZOO_MY_ID: 1
kafka:
container_name: kafka
hostname: kafka
image: confluentinc/cp-kafka:5.1.2
ports:
- 9092:9092
restart: unless-stopped
depends_on:
- zookeeper
environment:
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://<my_vps_url>:9092
KAFKA_BROKER_ID: 1
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
reporter:
container_name: reporter
hostname: reporter
depends_on:
- mongo
- kafka
image: nebulaorchestrator/reporter
restart: unless-stopped
environment:
MONGO_URL: mongodb://nebula:nebula@mongo:27017/nebula?authSource=admin
SCHEMA_NAME: nebula
BASIC_AUTH_PASSWORD: nebula
BASIC_AUTH_USER: nebula
KAFKA_BOOTSTRAP_SERVERS: kafka:9092
KAFKA_TOPIC: nebula-reports
Note:
Still think that the issue is kafka connectivity - can you confirm that your Kafka starts & stays up? (run docker ps
after a few minutes and see it's uptime is at least longer then a minute)
Assuming Kafka stays online Can you try connecting to it from the worker using Kafka CLI to test? my feeling is that when you enter PLAINTEXT://
Another option you can test is going back to the original compose file (before my suggestion to move from kafka
to the host public IP) & using extra-hosts on your worker configuration to add a host entry that will point kafka
to your kafka host public IP, assuming this works we will know for sure that my guesstimation to the issue cause is correct.
Reading the provided reporter logs I can see it tried connecting a few times and failed until it finally succeeded, this makes sense when you consider the time it takes Kafka to boot up & also means that connection to kafka from inside the compose network works and that the issue seems to be external access to it.
Thanks for the Response. It was my silly mistake I forgot to keep the port open of the VPS machine and that's why the issue was created.
Hello
I have configured the Nebula worker on the Raspberry Pi.
I am using Ubuntu 18.04 VPS on which I have the following containers =>
Expected/Wanted Behavior
The worker sends the current state to a Kafka cluster after every sync with the manager. The reporter component will pull from Kafka and populate the state data into the backend DB. Then the manager can query the new state data from the backend DB to let the admin know the state of managed devices.
Actual Behavior
When the nebula worker downloads and updates the application while reporting the state using Kafka I get the following error =>
1. Logs of Nebula worker =>
2. Logs of Nebula Reporter =>
Note As Kafka logs are too big I haven't added them but if you need them for debugging I can attach the log file.
Steps to Reproduce the Problem
Configured worker on Raspberry Pi using
docker-compose.yml
and docker custom built mentioned in the Specifications sectionConfigured Manager, Reporter, Mongo, Kafka, and zookeeper on Ubuntu 18.04 using
docker-compose.yml
as mentioned in the Specification section.Configured a Private Docker Registry for maintaining the Update release and Images.
Specifications
1. Nebula worker =>
At the worker side as I am using Raspberry Pi I had to build the Image on the Pi and start the container. For achieving this I did the following steps =>
Dir Structure =>
Docker file =>
docker-compose.yml for worker =>
2. Nebula Manager, Mongo, Kafka, Reporter and Zookeeper =>
docker-compose.yml
=>