Comments (18)
Finally got it up and running :)
Thank you :)
from ngx_kafka_module.
Seems like you hadn't compiled ngx_kafka_module into nginx.
Try the following command:
ldd /your/path/to/nginx | grep librdkafka
Is there any output?
from ngx_kafka_module.
Below is the output
[root@smsc ~]# ldd /usr/local/nginx/sbin/nginx |grep librdkafka
librdkafka.so.1 => not found
[root@smsc ~]# locate librdkafka.so.1
/opt/librdkafka/src/librdkafka.so.1
/usr/local/lib/librdkafka.so.1
so I copied the binary to /lib64/
[root@smsc lib64]# cp /usr/local/lib/librdkafka.so.1 .
[root@smsc lib64]# ldd /usr/local/nginx/sbin/nginx |grep librdkafka
librdkafka.so.1 => /lib64/librdkafka.so.1 (0x00007f64bbb46000)
but even after that when I restart i get the below error
[root@smsc lib64]# service nginx restart
nginx: [emerg] unknown directive "kafka" in /etc/nginx/nginx.conf:37
nginx: configuration file /etc/nginx/nginx.conf test failed
[root@smsc lib64]#
[root@smsc lib64]#
[root@smsc lib64]# ldd /usr/local/nginx/sbin/nginx |grep librdkafka
librdkafka.so.1 => /lib64/librdkafka.so.1 (0x00007f3a77c4b000)
[root@smsc lib64]#
from ngx_kafka_module.
seems like you have more than one nginx installed in your system:
/usr/local/nginx/sbin/nginx
and /usr/sbin/nginx
make sure which nginx is used when executing service nginx restart
.
Maybe you should try /usr/local/nginx/sbin/nginx -t
from ngx_kafka_module.
Thanks you were right my system has two nginx installed.
I am getting the below error after restarting with the right instance if nginx.
[root@smsc lib64]# service nginx restart
nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful
Stopping nginx: [FAILED]
grep: unrecognized option '--add-module=/opt/ngx_kafka_module'
Usage: grep [OPTION]... PATTERN [FILE]...
Try `grep --help' for more information.
useradd: unrecognized option '--add-module=/opt/ngx_kafka_module'
from ngx_kafka_module.
Oh, it seems like there is something wrong with your service scripts (/etc/init.d/nginx
)
Please do those operations as follows to check if your nginx is worked:
sudo killall nginx
/usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf -t
If test ok:
/usr/local/nginx/sbin/nginx -c /etc/nginx/nginx.conf
If it works, It is means that you should fix some errors in /etc/init.d/nginx
.
from ngx_kafka_module.
Hi,
I am unable to send msgs to kafka via the curl command
curl http://172.16.23.17:8000/alarmdata/kafkatopic/ -d "message send to kafka topic"
[root@smsc ~]# netstat -anlp|grep nginx
tcp 0 0 0.0.0.0:3000 0.0.0.0:* LISTEN 24346/nginx
tcp 0 0 0.0.0.0:8000 0.0.0.0:* LISTEN 24346/nginx
tcp 0 0 172.16.23.17:38532 172.16.23.15:9092 ESTABLISHED 24347/nginx
unix 3 [ ] STREAM CONNECTED 196746843 24346/nginx
unix 3 [ ] STREAM CONNECTED 196746842 24346/nginx
Do we have to specify a different port for nginx's kafka module ??
from ngx_kafka_module.
Oh, It looks like a FAQ, check config/server.properties
and nginx.conf
again.
Make sure the value of host.name
in config/server.properties
equals to the hostname of kafka_broker_list
in nginx.conf
.
Many users make wrong configuration as follows:
file config/server.properties
:
host.name=localhost
file nginx.conf
:
kafka_broker_list 127.0.0.1:9092;
With this context, kafka could not recv msgs from nginx, because the resolver of kafka cannot resolve localhost
to 127.0.0.1
successfully.
I read nginx.txt
you attached upon, you set kafka_broker_list 172.16.23.15:9092;
. So, plz check file /path/to/kafka/config/server.properties
in 172.16.23.15, have you set host.name=172.16.23.15
?
from ngx_kafka_module.
Hi,
can we send the data to a particular Id of the kafka topic??
from ngx_kafka_module.
For now, we send data to kafka topic for automatic partitioning using the topic's partitioner function.
However, I think this requirement is rather reasonable. So, I am adding a directive named kafka_partition
as soon as possiable.
Maybe you will see this feature tomorrow.
from ngx_kafka_module.
can we send the data to a particular Id of the kafka topic?
@divgwd A new directive kafka_partition
is added. Does it satisfies your requirement?
from ngx_kafka_module.
Sorry was caught up with other issues...I wanted know if we could insert the data to kafka after routing it thru haproxy??
from ngx_kafka_module.
Of course you can
from ngx_kafka_module.
so I set
include /etc/nginx/conf.d/*.conf;
kafka;
kafka_broker_list <I.P>:8086 ; # host:port ...
8086 is the port my haproxy is binding to
from ngx_kafka_module.
No, that's wrong, absolutely. The right architecture should be:
HAProxy -> Nginx -> Kafka
I'm really confused why you set HAProxy on the front of Kafka.
from ngx_kafka_module.
we were pushing netdata's data from the site servers to the local kafka installation we had nginx set up on one of the site servers which has a public IP which intern routes it to haproxy installation on one of our local servers which has a public IP .
from ngx_kafka_module.
8086 is the port my haproxy is binding to
The kafka_broker_list <ip>:<port>
set in nginx.conf must be the port kafka is binding to
from ngx_kafka_module.
Thank you!!
I changed the proxy server from HAproxy to Nginx now.
the set up is now
kafka<Nginx_with_kafka<Nginx<list_of_netdata_servers
from
kafka<HAproxy<Nginx_with_kafka<list_of_netdata_servers
from ngx_kafka_module.
Related Issues (20)
- Return Statements not supported HOT 1
- NGINX common variables not passed to kafka topic HOT 18
- Nginx to kafka over socket HOT 1
- Add support for using SSL with librdkafka HOT 1
- Options to Set Kafka Producer Configs HOT 1
- No errors when kafka_broker_list is unavailable HOT 1
- Kafka Partition Key Routing HOT 6
- 352a507c78da1dea6dd42a5867d3c2cc
- Missing check for NULL HOT 1
- data is lost HOT 3
- nginx integrates Kafka Kafka consumers don't get the data HOT 1
- I need send http head params in kafak option message
- When making librdkafka, there is a warning
- /ngx_kafka_module/config: line 13: syntax error: unexpected end of file
- nginx 启动报错 HOT 3
- 请完善从nginx临时文件读取数据的TODO部分代码 HOT 1
- Make librdkafka message buffer size configurable to handle large messages HOT 1
- 希望提供docker 镜像
- cannot handle in-file-post-buf
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ngx_kafka_module.