AL VN27
AL VN27

Reputation: 41

Fix SymmetricDS config

I got 601 error and I cannot find any documents on that.

[master-engine] - RegistrationService - Could not register. Sleeping for 28000ms before attempting again. [master-engine] - RegistrationService - This node is unregistered. It will attempt to register using the registration.url [master-engine] - DataLoaderService - Using registration URL of http://symmetricds-service:31415/sync/register/registration [master-engine] - RegistrationService - Unexpected error during registration: Received an unexpected response code of 601 from the server org. jumpmind.exception.HttpException: Received an unexpected response code of 601 from the server

my setup using k8s

cat <<EOF | kubectl apply -f -
apiVersion: apps/v1
kind: Deployment
metadata:
  name: symmetricds-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: symmetricds
  template:
    metadata:
      labels:
        app: symmetricds
    spec:
      containers:
      - name: symmetricds
        image: jumpmind/symmetricds:3.15.7
        ports:
        - containerPort: 31415
        command: ["/bin/sh", "-c"]
        args:
          - |
            apk update && apk add curl
            mkdir -p /opt/symmetric-ds/engines &&
            curl -L -o /opt/symmetric-ds/lib/mariadb-java-client.jar https://downloads.mariadb.com/Connectors/java/connector-java-2.7.5/mariadb-java-client-2.7.5.jar &&
            echo "engine.name=master-engine
            db.driver=org.mariadb.jdbc.Driver
            # com.mysql.cj.jdbc.Driver
            db.url=jdbc:mysql://mariadb1-service:3306/source_db
            db.user=root
            db.password=root_password1
            group.id=source
            external.id=node1
            sync.url=http://symmetricds-service:31415/sync/master-engine
            registration.url=http://symmetricds-service:31415/sync/register
            db.target.driver=org.mariadb.jdbc.Driver
            # com.mysql.cj.jdbc.Driver
            db.target.url=jdbc:mysql://mariadb2-service:3306/target_db
            db.target.user=root
            db.target.password=root_password2
            db.additional.driver=org.mariadb.jdbc.Driver
            # com.mysql.cj.jdbc.Driver
            db.additional.url=jdbc:mysql://mariadb3-service:3306/additional_db
            db.additional.user=root
            db.additional.password=root_password3
            channel.default.max_batch_size=1000
            channel.default.enabled=true
            create.sym_node_group=true
            create.sym_node_group_link=true
            trigger.exclude.tables.regex=^(mysql|information_schema|performance_schema|sys)\\..*$
            trigger.include.tables.regex=^[^mysql|information_schema|performance_schema|sys].*\\.%
            sync.interval.ms=60000
            log.level=INFO
            initial.load.create.first=true
            " > /opt/symmetric-ds/engines/engine.properties &&
            /opt/symmetric-ds/bin/sym
---

apiVersion: v1
kind: Service
metadata:
  name: symmetricds-service
spec:
  selector:
    app: symmetricds
  ports:
  - protocol: TCP
    port: 31415
    targetPort: 31415
  type: LoadBalancer

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mariadb1-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mariadb1
  template:
    metadata:
      labels:
        app: mariadb1
    spec:
      containers:
      - name: mariadb1
        image: mariadb:latest
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: root_password1
        - name: MYSQL_DATABASE
          value: source_db
        ports:
        - containerPort: 3306

---

apiVersion: v1
kind: Service
metadata:
  name: mariadb1-service
spec:
  selector:
    app: mariadb1
  ports:
  - protocol: TCP
    port: 3306
    targetPort: 3306
  type: ClusterIP

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mariadb2-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mariadb2
  template:
    metadata:
      labels:
        app: mariadb2
    spec:
      containers:
      - name: mariadb2
        image: mariadb:latest
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: root_password2
        - name: MYSQL_DATABASE
          value: target_db
        ports:
        - containerPort: 3306

---

apiVersion: v1
kind: Service
metadata:
  name: mariadb2-service
spec:
  selector:
    app: mariadb2
  ports:
  - protocol: TCP
    port: 3306
    targetPort: 3306
  type: ClusterIP

---

apiVersion: apps/v1
kind: Deployment
metadata:
  name: mariadb3-deployment
spec:
  replicas: 1
  selector:
    matchLabels:
      app: mariadb3
  template:
    metadata:
      labels:
        app: mariadb3
    spec:
      containers:
      - name: mariadb3
        image: mariadb:latest
        env:
        - name: MYSQL_ROOT_PASSWORD
          value: root_password3
        - name: MYSQL_DATABASE
          value: additional_db
        ports:
        - containerPort: 3306

---

apiVersion: v1
kind: Service
metadata:
  name: mariadb3-service
spec:
  selector:
    app: mariadb3
  ports:
  - protocol: TCP
    port: 3306
    targetPort: 3306
  type: ClusterIP

EOF
full logs
https://drive.google.com/file/d/1Y6Y-0MW0KmT5QuSRjJzvN0iRPmuxqqvu/view?usp=drive_link

It does have play ground for k8s, and docker desktop has k8s too. https://labs.play-with-k8s.com/

Symmetric can sync from 1 source to 2 targets

Upvotes: 0

Views: 150

Answers (1)

Catherine
Catherine

Reputation: 31

The engine it's registered to is either not started up or failing to start up, would you be able to attach the symmetric.log file here so we can get more information on what error is occurring?

Upvotes: 2

Related Questions