Quantcast
Channel: Mobile - Couchbase Forums
Viewing all articles
Browse latest Browse all 1117

Couldn't start Sync Gateway in Docker

$
0
0

First time docker user. I managed to launch CB Server (defined buckets, users and etc) but when SG fails with the following error message:

 ~ % docker logs unruffled_jennings

2023-03-02T13:54:22.004Z ==== Couchbase Sync Gateway/3.0.5(8;godeps/) EE ====

2023-03-02T13:54:22.005Z [INF] Loading content from [https://config/sg-config.json] ...

2023-03-02T13:54:22.879Z [INF] Found unknown fields in startup config. Attempting to read as legacy config.

2023-03-02T13:54:22.879Z [INF] Loading content from [https://config/sg-config.json] ...

2023-03-02T13:54:23.070Z [INF] Config is a legacy config, and disable_persistent_config was not requested. Attempting automatic config upgrade.

2023-03-02T13:54:23.075Z [WRN] gocb: Pipeline Client 0x40002940e0 failed to bootstrap: check server ports and cluster encryption setting: dial tcp 127.0.0.1:11210: connect: connection refused -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:26.075Z [WRN] gocb: CCCPPOLL: Failed to retrieve CCCP config. check server ports and cluster encryption setting: dial tcp 127.0.0.1:11210: connect: connection refused -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:26.075Z [WRN] gocb: CCCPPOLL: Failed to retrieve config from any node. -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:28.076Z [WRN] gocb: Pipeline Client 0x40002940e0 failed to bootstrap: check server ports and cluster encryption setting: dial tcp 127.0.0.1:11210: connect: connection refused -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:31.582Z [WRN] gocb: CCCPPOLL: Failed to retrieve CCCP config. check server ports and cluster encryption setting: dial tcp 127.0.0.1:11210: connect: connection refused -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:31.582Z [WRN] gocb: CCCPPOLL: Failed to retrieve config from any node. -- base.GoCBCoreLogger.Log() at logger_external.go:80

2023-03-02T13:54:33.075Z [ERR] Couldn't start Sync Gateway: unambiguous timeout | {"InnerError":{"InnerError":{"InnerError":{},"Message":"unambiguous timeout"}},"OperationID":"WaitUntilReady","Opaque":"","TimeObserved":10000218462,"RetryReasons":["NOT_READY"],"RetryAttempts":15,"LastDispatchedTo":"","LastDispatchedFrom":"","LastConnectionID":""} -- rest.ServerMain() at main.go:26

the command I used for SyncGateway is

docker run -p 4984:4984 -d couchbase/sync-gateway https://config/sg-config.json

my config.json file:

{
    "log": [
        ""
    ],
    "databases": {
        "db": {
            "server": "http://127.0.0.1:8091",
            "bucket": "test_bucket",
            "username": "username",
            "password": "pwdpwdpwd",
            "enable_shared_bucket_access": true,
            "num_index_replicas": 0,
            "import_docs": true,
            "users": {
                "GUEST": {
                    "disabled": true
                },
                "username": {
                    "password": "pwdpwdpwd",
                    "admin_channels": [
                        ""
                    ]
                },
            },
            "sync": "function(doc, oldDoc) {\n  if (doc.replRole) {\n    requireRole('replicator');\n    if (doc.replRole !== 'replicator') {\n      requireRole(doc.replRole);\n      channel(doc.replRole);\n      if (doc.channels && doc.channels.length) {\n        doc.channels.each(function(channel) {\n          channel(doc.replRole + '_' + channel);\n        });\n      }\n    }\n  } else {\n    requireRole('sync_daemon');\n    channel(doc.channels);\n  }\n}"
            
        }
    }
    }

In a different machine, I installed them both without docker and both have started. I am in MacOS (M1 if that matters).

CB inspect returns the following:


Ports

11207/tcp Not bound

---

11210/tcp 0.0.0.0:11210

---

11210/tcp :::11210

---

11211/tcp Not bound

---

18091/tcp Not bound

---

18092/tcp Not bound

---

18093/tcp Not bound

---

18094/tcp Not bound

---

18095/tcp Not bound

---

18096/tcp Not bound

---

8091/tcp 0.0.0.0:8091

---

8091/tcp :::8091

---

8092/tcp 0.0.0.0:8092

---

8092/tcp :::8092

---

8093/tcp 0.0.0.0:8093

---

8093/tcp :::8093

---

8094/tcp 0.0.0.0:8094

---

8094/tcp :::8094

---

8095/tcp Not bound

---

8096/tcp Not bound

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1117

Trending Articles