ClickHouse fails with "Illegal instruction" when used with ntopng. What can I do?
ntopng cannot store flows in ClickHouse and clickhouse-client (or the server) exits with Illegal instruction. This happens when the installed ClickHouse build uses CPU instructions that your processor does not provide. It is a ClickHouse and CPU compatibility problem, not an ntopng configuration error.
1. Check the ntopng configuration
Open /etc/ntopng/ntopng.conf and verify the -F option. The format is:
-F="clickhouse;<host>@<port>;<dbname>;<user>;<password>"
Example:
-F="clickhouse;localhost;ntop;ntop;<password>"
2. Check the connection with clickhouse-client
clickhouse-client --host localhost --port 9000 --user ntop --password <password> -d ntopng
If the command prints Illegal instruction and exits, the ClickHouse binary cannot run on this CPU. Go to the next step.
3. Install a ClickHouse version that runs on your CPU
Roll back to ClickHouse 26.3.9.8. This version does not require the newer CPU instructions and has been verified to fix the problem:
apt-get install -y clickhouse-server=26.3.9.8 clickhouse-client=26.3.9.8 clickhouse-common-static=26.3.9.8
Then restart ClickHouse and ntopng, and repeat the clickhouse-client test above:
systemctl restart clickhouse-server
systemctl restart ntopng
Never post your real password in a bug report or in the community channels: replace it with a placeholder first. For more help see the community or report a bug.
Related questions
- Do ntopng Professional and Enterprise licenses need to be activated?
- How to use PagerDuty to Deliver ntopng Alerts
- Migrate the data directory in ntopng/nEdge
Learn more about ntopng
Ready to see it on your network?
Download the free Community edition, or talk to the ntop team about scale, licensing and support.