Hello!
I am aware that this is potentially a duplicate of https://community.datastax.com/questions/4118/clustering-key-columns-must-exactly-match-columns.html but that thread didn't solve my issue.
I am following this guide https://docs.datastax.com/en/docker/doc/docker/docker68/dockerOpscenter.html to create an OpsCenter container in Docker. I have run these two docker commands:
docker run -e DS_LICENSE=accept -p 8888:8888 --name my-opscenter -d datastax/dse-opscenter docker run -e DS_LICENSE=accept --link my-opscenter:opscenter --name my-dse -d datastax/dse-server:6.8.7
I have then logged onto the container through localhost:8888, clicked 'Manage Cluster', gave the GUI the correct IP of the container, and it errors out after about 40 seconds with "OpsCenter was not able to add the cluster: Shutting down services for cluster 'Test_Cluster' after failed schema creation ".
Looking at the logs of the Docker Container itself, I see that this SQL Statement:
CREATE TABLE if not exists "OpsCenter"."backup_reports" ( week text, event_time timestamp, backup_id text, type text, destination text, deleted_at timestamp, keyspaces text, status text, full_status text, PRIMARY KEY ((week), event_time, backup_id, type, destination) ) WITH comment='{"version": [6, 7, 4], "info": "OpsCenter management data."}' AND CLUSTERING ORDER BY (event_time DESC)
fails with this traceback
failed to completed because: com.datastax.driver.core.exceptions.InvalidQueryException: Clustering key columns must exactly match columns in CLUSTERING ORDER BY directive. (MainThread) 2020-12-01 10:52:28,832 [Test_Cluster] INFO: Sleeping for 10s before retrying schema creation (MainThread) 2020-12-01 10:52:38,839 [Test_Cluster] ERROR: Error when attempting to create OpsCenter schema: (AlterSchemaFailed) Traceback (most recent call last): File "/opt/opscenter/lib/py/twisted/internet/defer.py",line 1122, in _inlineCallbacks result = result.throwExceptionIntoGenerator(g) File "/opt/opscenter/lib/py/twisted/python/failure.py", line 389, in throwExceptionIntoGenerator return g.throw(self.type, self.value, self.tb) File "/usr/share/opscenter/Lib/site-packages/opscenterd/WrappedDriver.py", line 200, in execute_schema_change AlterSchemaFailed: Failure applying schema change
It retries about 3 times before ultimately failing. I am unsure how I can manually change the key columns, as I'm not manually passing any SQL queries through, I'm just running the wizard through the GUI. I have tried this with several images at https://hub.docker.com/r/datastax/dse-server/tags?page=1&ordering=last_updated from 6.8.7 down to 6.0.14, and they all give me the same error message.
If anyone has any advice how can I get this GUI to work and create a local OpsCentre container as set out in the guide I'm following, I would be very grateful. Thankyou