Hello,
Im trying to get the Sync Gateway running with the ios userprofile example to know, if this server is suitable for me.
First problem:
Was failing to run the docker compose scripts. The Init Couchbase Server is failing. I have needed to go into the docker container and execute all the commands again manually. So the automatic script/example is not really working.
Second problem:
Example is not up to date. I want to run a simple PoC, where I sync two different collections. The example just uses the default collection + default scope. I have then changed a little bit of the Replicator Initialization (adding default collection + custom collection). Then at least the default collection with the user profile is working. But it complains, that the remote server has not the custom collection. I tried different things now, but for me the documentation is not very clear.
What I have found until now:
The sync gateway configuration seems to be based on the old 2.X version, which has already everything included with database stuff and so on. But the 3.X version has splitted all this things up. So I need to initialize the stuff with the bootstrap configuration and then get the database configuration at some other way on the sync gatway?
Following is the modified sync gateway config json:
{
"api": {
"admin_interface": "127.0.0.1:4985",
"public_interface": ":4984"
},
"bootstrap": {
"server": "couchbase://couchbase-server",
"server_tls_skip_verify": true,
"use_tls_server": false,
"password": "P@ssw0rd12",
"username": "Administrator"
},
"database_credentials": {
"userprofile": {
"username": "admin",
"password": "P@ssw0rd"
}
},
"logging": {
"log_file_path": "/var/tmp/sglogs",
"console": {
"log_level": "debug",
"log_keys": ["*"]
},
"error": {
"enabled": true,
"rotation": {
"max_size": 20,
"max_age": 180
}
},
"warn": {
"enabled": true,
"rotation": {
"max_size": 20,
"max_age": 90
}
},
"info": {
"enabled": false
},
"debug": {
"enabled": true
}
}
}
At least this is the first configuration where the sync gateway is starting. But it’s absolutely not reachable with the admin interface. Also telnet is directly closing the connection if I want connect to that port.
But in the logs its just saying it trying to attempt to get the configuration from the bucket.
2024-09-22T10:42:36.588Z [DBG] Config+: b:userprofile Checking for database config (attempt 1/5)
2024-09-22T10:42:36.589Z [DBG] Config+: b:userprofile Bucket "userprofile" did not contain any configs for group "default"
2024-09-22T10:42:36.589Z [WRN] Config: No database configs for group "default". Continuing startup to allow REST API database creation -- rest.(*ServerContext).initializeBootstrapConnection() at server_context.go:2154
2024-09-22T10:42:36.589Z [INF] Config: Starting background polling for new configs/buckets: 10s
2024-09-22T10:42:36.589Z [INF] Finished initializing bootstrap connection
2024-09-22T10:42:36.589Z [INF] Diagnostic API not enabled - skipping.
2024-09-22T10:42:36.589Z [INF] Starting metrics server on 127.0.0.1:4986
2024-09-22T10:42:36.589Z [INF] Starting admin server on 127.0.0.1:4985
2024-09-22T10:42:36.589Z [INF] Starting server on :4984 ...
2024-09-22T10:42:46.590Z [DBG] Config+: Fetching configs from buckets in cluster for group "default"
2024-09-22T10:42:46.597Z [DBG] Config+: b:userprofile Checking for database config (attempt 1/5)
2024-09-22T10:42:46.598Z [DBG] Config+: b:userprofile Bucket "userprofile" did not contain any configs for group "default"
2024-09-22T10:42:56.591Z [DBG] Config+: Fetching configs from buckets in cluster for group "default"
2024-09-22T10:42:56.597Z [DBG] Config+: b:userprofile Checking for database config (attempt 1/5)
2024-09-22T10:42:56.598Z [DBG] Config+: b:userprofile Bucket "userprofile" did not contain any configs for group "default"
2024-09-22T10:43:06.591Z [DBG] Config+: Fetching configs from buckets in cluster for group "default"
2024-09-22T10:43:06.599Z [DBG] Config+: b:userprofile Checking for database config (attempt 1/5)
2024-09-22T10:43:06.600Z [DBG] Config+: b:userprofile Bucket "userprofile" did not contain any configs for group "default"
2024-09-22T10:43:16.591Z [DBG] Config+: Fetching configs from buckets in cluster for group "default"
2024-09-22T10:43:16.598Z [DBG] Config+: b:userprofile Checking for database config (attempt 1/5)
2024-09-22T10:43:16.599Z [DBG] Config+: b:userprofile Bucket "userprofile" did not contain any configs for group "default"
I would assume, after I would get this sync gateway into a running state, I need to create the database configuration with the API? Or is there a simpler, more automatic way, by giving that configuration directly at startup?