1

I'm trying to move clickhouse data directory to another partition /dev/sdb1. So here's what I've done:

sudo systemctl stop clickhouse-server
mv /var/lib/clickhouse /var/lib/clickhouse-orig
mkdir /var/lib/clickhouse
chown clickhouse:clickhouse /var/lib/clickhouse
mount -o user /dev/sdb1 /var/lib/clickhouse 
cp -Rv /var/lib/clickhouse-orig/* /var/lib/clickhouse/
chown -Rv clickhouse:clickhouse /var/lib/clickhouse
sudo systemctl start clickhouse-server

but it shows an error when it started:

Processing configuration file '/etc/clickhouse-server/config.xml'.
Sending crash reports is disabled
Starting ClickHouse 21.6.4.26 with revision 54451, build id: 12B138DBA4B3F1480CE8AA18884EA895F9EAD439, PID 10431
starting up
OS Name = Linux, OS Version = 5.4.0-1044-gcp, OS Architecture = x86_64
Calculated checksum of the binary: 26864E69BE34BA2FCCE2BD900CF631D4, integrity check passed.
Setting max_server_memory_usage was set to 882.18 MiB (980.20 MiB available * 0.90 max_server_memory_usage_to_ram_ratio)
DB::Exception: Settings profile `default` not found
shutting down
Stop SignalListener thread

EDIT apparently even without new partition it doesn't start, so probably the config.xml or the macro.xml is the culprit

1 Answer 1

2

check /var/lib/clickhouse/preprocessed_configs/users.xml file it should contains XPath /yandex/profiles/default

apt-get install -y libxml2-utils
xmllint --xpath /yandex/profiles/default /var/lib/clickhouse/preprocessed_configs/users.xml

also, look to source configs /etc/clickhouse-server/users.xml and possible /etc/clickhouse-server/users.d/*.xml or /etc/clickhouse-server/conf.d/*.xml

1
  • yes, found the culprit, i'm using config.xml and macro.xml from docker compose, that are wrong (but it works on docker-compose), so I replace it with original config.xml with my own addition.
    – Kokizzu
    Commented Jun 15, 2021 at 8:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.