Thanks @regis. there’s same error in the log. and right now the clickhouse container keeps restarting.
$ tutor local logs --tail=100 -f cairn-clickhouse
Attaching to tutor_local_cairn-clickhouse_1
cairn-clickhouse_1 | chown: cannot read directory ‘/var/lib/clickhouse/store/64f/64f02898-3746-43fe-a964-71f8069ed43b/202202_75004_75734_205’: No such file or directory
cairn-clickhouse_1 | chown: cannot access ‘/var/lib/clickhouse/store/64f/64f02898-3746-43fe-a964-71f8069ed43b/202202_75736_75736_0’: No such file or directory
cairn-clickhouse_1 | chown: cannot access ‘/var/lib/clickhouse/store/64f/64f02898-3746-43fe-a964-71f8069ed43b/202202_75735_75735_0’: No such file or directory
cairn-clickhouse_1 | chown: cannot read directory ‘/var/lib/clickhouse/store/3cf/3cfb289e-fcc2-4763-9f2f-4706419c79b4/202202_94081_94081_0’: No such file or directory
…
Is there any file limitation on ClickHouse? It was good when we imported 30, 50 or a little more courses. This issue happened when we imported about 100 courses. I cleaned up /cairn/clickhouse/ folder and re-ran initialization and got same results.
No, there isn’t supposed to be any limit to the amount of data that you can add to Clickhouse. Can you please check whether there is any space left on the device?
We have 99% storage space available for /data/ and tutor config root folders.
Now I can use Clickhouse-Client and cairn-clickhouse container for running sql to create accounts but it’s just not so convenient as tutor commands.
I’m not sure I understand. Is tutor local run cairn-clickhouse cairn client now working? Also, can you describe more precisely how you imported the courses? Was it via the studio “import” function?
The tutor command “tutor local run cairn-clckhouse carin client” is still not working.
I used the following command to connect Clickhouse db and then ran sql queries: docker run -it --rm --link tutor_local_cairn-clickhouse_1:clickhouse-server --net tutor_local_default yandex/clickhouse-client --host cairn-clickhouse --port 9000 --user $user --password $passwd
We did not have problem with course import in studio. it was good with both “mongorestore” and studio “import” function. Could this impact Cairn?
This clickhouse issue happened when we imported 100 courses data into Cairn for initializaiton with command “tutor local init --limit=cairn” (or “quickstart” for Cairn fresh installation)
Both “tutor_local_cairn-clickhouse” and “cairn-clickhouse” are working fine for that connection.
The clickhouse container connection with “docker run …” is not a problem.
Currently our problem is the tutor commands for clickhouse are not working.
tutor local run cairn-clickhouse cairn client
tutor local run cairn-clickhouse cairn createuser USERNAME
OK I think that I’m starting to understand what is going on. The clickhouse client is attempting to chown the data volume, as per this line in the entrypoint. It could be failing because there is a lot of data. To confirm this theory, please attempt to run:
tutor local run -e CLICKHOUSE_DO_NOT_CHOWN=1 cairn-clickhouse client
If I’m correct then this command should be successful.