Problem create domain

I am running docker run --network=host --rm ubercadence/cli:master --do test-domain domain register -rd 1 after docker-compose up and I get the following error:

Error: Register Domain operation failed.
Error Details: code:unknown message:received unknown error calling service: "cadence-frontend", procedure: "WorkflowService::RegisterDomain", err: dial tcp 127.0.0.1:7933: connect: connection refused
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)
1 Like

Cadence CLI documentation mentions that you might need to specify the address.

docker run --rm ubercadence/cli:master --address host.docker.internal:7933  --do test-domain domain register -rd 1

rare, still not working and I get the same error

My guess is that your service is not running or failed to start for some reason. Are you able to reach UI at localhost:8088?

Yes, I can go in and see the cadence UI, that’s why it seems strange to me

You are running a master version of the CLI. Are you running the master version of the service as well? The versions are expected to match.

I would also recommend resetting your docker service:

docker-compose down
docker volume prune
docker-compose up

Oh, I had to download the server version and make some modifications to be able to connect to a Cassandra db, will it have to do with this? If so, how could I run it? Since everything works well with the modifications I made, I only need to raise the domain and do a test.

In this case don’t use the docker based CLI. Run it directly from the service repo root directory:

./cadence ...

It assumes that you don’t run docker version of the service at all. But you run your local version through

./cadence-service

I explain what I am doing.

I have this docker-compose

         version: '3'
        services:
        statsd:
            image: graphiteapp/graphite-statsd
            ports:
            - "8080:80"
            - "2003:2003"
            - "8125:8125"
            - "8126:8126"
        cadence:
            image: testcassandra:v1
            ports:
            - "7933:7933"
            - "7934:7934"
            - "7935:7935"
            - "7939:7939"
            environment:
            - "SSL_VERSION=TLSv1_2"
            - "SSL_VALIDATE=false"
            - "CASSANDRA_SEEDS=myuser.myhost"
            - "STATSD_ENDPOINT=statsd:8125"
            - "LOG_LEVEL=debug"
            - "CASSANDRA_USERNAME=user"
            - "CASSANDRA_PASSWORD=password"
            - "KEYSPACE=cadence"
            depends_on:
            - statsd
        cadence-web:
            image: ubercadence/web:latest
            environment:
            - "CADENCE_TCHANNEL_PEERS=cadence:7933"
            ports:
            - "8088:8088"
            depends_on:
            - cadence

I run the docker-compose up and everything works fine, what I need now is to be able to create the domain and do the tests.,
testcassandra: v1 is the image I create based on cadence’s CLI-go

How do you know that “everything works fine”? It might be not working fine and fail the domain registration requests. I would recommend running the service from command line first to test it before introducing docker-compose complexity.

Sorry, I was a little confused, I was able to run the cadence commands, but I am getting the exact same error.

./cadence --do test-domain domain register --rd 10
Error: Register Domain operation failed.
Error Details: code:unknown message:received unknown error calling service: "cadence-frontend", procedure: "WorkflowService::RegisterDomain", err: dial tcp 127.0.0.1:7933: connect: connection refused
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)

It looks like service is returning error after your changes, so you will need to troubleshoot this.

You can try checking out the master branch and see if you see the same problem running these commands.

I tried the master branch and I still don’t get the error.

Error: Register Domain operation failed.
Error Details: code:unavailable message:EOF
('export CADENCE_CLI_SHOW_STACKS=1' to see stack traces)

Do you see anything in the service logs? Probably Cassandra is not reachable by the service. Have you followed the instruction from contributing README to set up your environment?

I would start form successfully running the service version compiled from the master branch (or better the latest release tag) before testing your changes.

Finally the schemas had not been created correctly in my cassandra and I could see logs where it said that certain tables did not exist. Now I have another question that I do not know if you can help me, I receive the following error:

Inserting into domains_by_name_v2 table. Error: 'notification_version is not supported yet

Add the schemas as they come in the file and I have to notification_version is -24,
How can i fix this? since my schema version is 0.28

How did you deployed the schema?

Did you run cadence-cassandra-tool?

What are the sequence of step you ran which resulted in that error?

In a first instance I modified the Dockerfile so that it would run the schemas and I created them all with version 0.0, I received the error that I was expecting at least version 2.8, so I modified the script again but that’s where I was missing many of the schemas, I think I will run them again with cadence-cassandra-tools locally and I will tell you how that works for me.

Now I get this error, the truth is not very descriptive

Error: Register Domain operation failed.
Error Details: code:unavailable message:EOF
1 Like

Looks like your service is not coming up properly. Please use the Helm Chart for any production setup. Docker-compose is only provided for local development so it does not expose all options to be configurable like CASSANDRA_USER, CASSANDRA_PASSWORD. But we plan to fix this in the future.

2 Likes

How you found this error?, where you searched for logs?