Altinity / clicktail

Apache License 2.0
283 stars 57 forks source link

Abnormal non-200 response from ClickHouse server: 403 #8

Open imomo86 opened 5 years ago

imomo86 commented 5 years ago

Hi I'm trying to send nginx logs from a Server-A to ClickHouse server, by following command:

sudo clicktail --api_host=http://172.16.116.241:8123/ -p nginx -f /var/log/nginx/access.log -d NL --nginx.conf=/etc/nginx/nginx.conf --nginx.format=click


But it gets this response:

Could not connect to ClickHouse server: Abnormal non-200 response from ClickHouse server: 403 Response body: <!DOCTYPE html>

403 Forbidden file type or location

403 Forbidden file type or location


Whereas service is up properly on port 8123 and I can do telnet on this port from Server-A as follows: sudo netstat -anpltu | grep 8123 tcp 0 0 172.16.116.241:8123 0.0.0.0: LISTEN 11334/clickhouse-se tcp6 0 0 ::1:8123 ::: LISTEN 11334/clickhouse-se

telnet 172.16.116.241 8123 Trying 172.16.116.241... Connected to 172.16.116.241. Escape character is '^]'.


By clicktail command I can connect from ClickHouse server (localhost) as follows:

sudo clicktail --api_host=http://127.0.0.1:8123/ -p nginx -f /var/log/nginx/access.log -d NL --nginx.conf=/etc/nginx/nginx.conf --nginx.format=click


would somebody give me some tips please?

imomo86 commented 5 years ago

No Idea??

pekindenis commented 5 years ago

No Idea??

You need add user and pass to url. Example: http://user:pass@127.0.0.1:8123/