Error starting Couchbase Sync Gateway Service

When I edit the serviceconfig.json file and start the Couchbase Sync Gateway service, a window appears with an error message.
image

I am using the latest versions of Couchbase Server and Sync Gateway.
S.O. Windows 10

serviceconfig.json

{
  "adminInterface": "127.0.0.1:4985",
  "interface": "0.0.0.0:4984",
  "databases": {
    "my-database": {
      "server": "http://127.0.0.1:8091",
      "bucket": "my-database", 
      "username": "sync_gateway", 
      "password": "123456",
      "enable_shared_bucket_access": true, 
      "import_docs": true, 
      "num_index_replicas": 0, 
      "users": {
        "GUEST": { "disabled": false, "admin_channels": ["*"] } 
      }
    }
  },
  "logging": { 
    "console": {
      "log_level": "debug",
      "log_keys": ["*"]
    }
  }
}

sg_info.log

2022-04-27T01:12:05.319-03:00 ==== Couchbase Sync Gateway/3.0.0(541;46803d1) CE ====
2022-04-27T01:12:05.325-03:00 ==== Couchbase Sync Gateway/3.0.0(541;46803d1) CE ====
2022-04-27T01:12:05.325-03:00 [INF] Loading content from [C:\Program Files\Couchbase\Sync Gateway\serviceconfig.json] …
2022-04-27T01:12:05.326-03:00 [INF] Config: Starting in persistent mode using config group “default”
2022-04-27T01:12:05.326-03:00 [INF] Logging: Console to stderr
2022-04-27T01:12:05.326-03:00 [INF] Logging: Files to C:\Program Files\Couchbase\Sync Gateway\var\lib\couchbase\logs
2022-04-27T01:12:05.326-03:00 [INF] Logging: Console level: debug
2022-04-27T01:12:05.326-03:00 [INF] Logging: Console keys: [* HTTP]
2022-04-27T01:12:05.326-03:00 [INF] Logging: Redaction level: partial
2022-04-27T01:12:05.327-03:00 [ERR] Couldn’t start Sync Gateway: 1 errors:
Must use secure scheme in Couchbase Server URL, or opt out by setting bootstrap.use_tls_server to false. Current URL: couchbase://127.0.0.1 – rest.ServerMain() at main.go:26
2022-04-27T01:19:14.977-03:00 ==== Couchbase Sync Gateway/3.0.0(541;46803d1) CE ====
2022-04-27T01:19:14.982-03:00 ==== Couchbase Sync Gateway/3.0.0(541;46803d1) CE ====
2022-04-27T01:19:14.982-03:00 [INF] Loading content from [C:\Program Files\Couchbase\Sync Gateway\serviceconfig.json] …
2022-04-27T01:19:14.983-03:00 [INF] Config: Starting in persistent mode using config group “default”
2022-04-27T01:19:14.983-03:00 [INF] Logging: Console to stderr
2022-04-27T01:19:14.983-03:00 [INF] Logging: Files to C:\Program Files\Couchbase\Sync Gateway\var\lib\couchbase\logs
2022-04-27T01:19:14.984-03:00 [INF] Logging: Console level: debug
2022-04-27T01:19:14.984-03:00 [INF] Logging: Console keys: [* HTTP]
2022-04-27T01:19:14.984-03:00 [INF] Logging: Redaction level: partial
2022-04-27T01:19:14.984-03:00 [ERR] Couldn’t start Sync Gateway: 1 errors:
Must use secure scheme in Couchbase Server URL, or opt out by setting bootstrap.use_tls_server to false. Current URL: couchbase://127.0.0.1 – rest.ServerMain() at main.go:26

Hello,

Because you aren’t using TLS - you need to disable it in your config:

So something like this should fix it:

bootstrap_config: {
use_tls_server: false
},

Please remember don’t do this in production!

Thanks
Aaron

1 Like

I think I got it resolved. Thanks.

1 Like