Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem when I'm trying to install the Couchbase Sync Gateway #1

Open
engmsaleh opened this issue Oct 31, 2016 · 5 comments
Open

Problem when I'm trying to install the Couchbase Sync Gateway #1

engmsaleh opened this issue Oct 31, 2016 · 5 comments

Comments

@engmsaleh
Copy link

I have followed the steps and everything works well until I have a working couchbase server cluster, when I tried to install the sync gateway using the following

$ sudo docker run --net=host tleyden5iwx/couchbase-cluster-go update-wrapper sync-gw-cluster launch-sgw \
  --launch-nginx \
  --num-nodes=3 \
  --config-url=http://git.io/b9PK \
  --create-bucket todos \
  --create-bucket-size 200 \
  --create-bucket-replicas 1

The console output is as follow

core@ip-172-31-1-47 ~ $ sudo docker run --net=host tleyden5iwx/couchbase-cluster-go update-wrapper sync-gw-cluster launch-sgw \
>   --launch-nginx \
>   --num-nodes=3 \
>   --config-url=http://git.io/b9PK \
>   --create-bucket todos \
>   --create-bucket-size 200 \
>   --create-bucket-replicas 1
2016/10/31 14:05:14 Update-Wrapper: updating to latest code
2016/10/31 14:05:14 Error trying to go get: exec: "go": executable file not found in $PATH.  Ignoring it
2016/10/31 14:05:14 remainingargs: [launch-sgw --launch-nginx --num-nodes=3 --config-url=http://git.io/b9PK --create-bucket todos --create-bucket-size 200 --create-bucket-replicas 1], target: sync-gw-cluster
2016/10/31 14:05:14 Invoking target: sync-gw-cluster with args: [launch-sgw --launch-nginx --num-nodes=3 --config-url=http://git.io/b9PK --create-bucket todos --create-bucket-size 200 --create-bucket-replicas 1]
2016/10/31 14:05:14 ExtractEtcdServerList calling EtcdServerListFromEnv
2016/10/31 14:05:14 EtcdServerListFromEnv did not find --k8s-service-name
2016/10/31 14:05:14 Connect to etcd on localhost
2016/10/31 14:05:14 Launching sync gw
2016/10/31 14:05:14 Connect to etcd on localhost
2016/10/31 14:05:14 Couchbase node ip: 172.31.1.47
2016/10/31 14:05:14 Verifying REST service at http://172.31.1.47:8091/ to be up
2016/10/31 14:05:14 CreateBucketWithRetries(): {Name:todos RamQuotaMB:200 AuthType:none ReplicaNumber:1}
2016/10/31 14:05:14 Using username/password pulled from etcd
2016/10/31 14:05:14 POST to http://172.31.1.47:8091/pools/default/buckets
2016/10/31 14:05:14 CreateBucket error: Failed to POST to http://172.31.1.47:8091/pools/default/buckets.  Status code: 400.  Body: {"errors":{"proxyPort":"port is already in use"},"summaries":{"ramSummary":{"total":8886681600,"otherBuckets":402653184,"nodesCount":3,"perNodeMegs":200,"thisAlloc":629145600,"thisUsed":0,"free":7854882816},"hddSummary":{"total":17529999360,"otherData":2621827072,"otherBuckets":7672832,"thisUsed":0,"free":14900499456}}}
2016/10/31 14:05:14 Sleeping 0 seconds
2016/10/31 14:05:14 Using username/password pulled from etcd
2016/10/31 14:05:14 POST to http://172.31.1.47:8091/pools/default/buckets
2016/10/31 14:05:14 CreateBucket succeeded
2016/10/31 14:05:14 params.WAIT_UNTIL_RUNNING
2016/10/31 14:05:14 Sync Gw fleet unit: [Unit]
Description=sync_gw_node
After=docker.service
Requires=docker.service
After=etcd.service
Requires=etcd.service
After=fleet.service
Requires=fleet.service

[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker kill sync_gw
ExecStartPre=-/usr/bin/docker rm sync_gw
ExecStartPre=/usr/bin/docker pull couchbase/sync-gateway
ExecStartPre=/usr/bin/docker pull tleyden5iwx/couchbase-cluster-go:latest
ExecStartPre=/usr/bin/docker run --net=host tleyden5iwx/couchbase-cluster-go:latest update-wrapper couchbase-cluster wait-until-running
ExecStartPre=/usr/bin/docker run --net=host -v /home/core:/home/core tleyden5iwx/couchbase-cluster-go:latest update-wrapper sync-gw-config rewrite --destination /home/core/.sync-gw-config.json
ExecStart=/bin/bash -c '/usr/bin/docker run --name sync_gw --net=host -v /home/core:/home/core couchbase/sync-gateway /home/core/.sync-gw-config.json'
ExecStop=/usr/bin/docker stop sync_gw

[X-Fleet]
Conflicts=sync_gw_node*.service
2016/10/31 14:05:14 Launch fleet unit sync_gw_node (1)
2016/10/31 14:05:14 response body:
2016/10/31 14:05:14 Launch fleet unit sync_gw_node (2)
2016/10/31 14:05:15 response body:
2016/10/31 14:05:15 Launch fleet unit sync_gw_node (3)
2016/10/31 14:05:15 response body:
2016/10/31 14:05:15 Sync Gw sidekick fleet unit: [Unit]
Description=sync_gw_sidekick
After=docker.service
Requires=docker.service
After=etcd.service
Requires=etcd.service
[email protected]
[email protected]

[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker kill sync-gw-sidekick
ExecStartPre=-/usr/bin/docker rm sync-gw-sidekick
ExecStartPre=/usr/bin/docker pull tleyden5iwx/couchbase-cluster-go:latest
ExecStart=/bin/bash -c '/usr/bin/docker run --name sync-gw-sidekick --net=host tleyden5iwx/couchbase-cluster-go:latest update-wrapper sync-gw-cluster launch-sidekick --local-ip=$COREOS_PRIVATE_IPV4'
ExecStop=/usr/bin/docker stop sync-gw-sidekick

[X-Fleet]
[email protected]
2016/10/31 14:05:15 Launch fleet unit sync_gw_sidekick (1)
2016/10/31 14:05:15 response body:
2016/10/31 14:05:15 Sync Gw sidekick fleet unit: [Unit]
Description=sync_gw_sidekick
After=docker.service
Requires=docker.service
After=etcd.service
Requires=etcd.service
[email protected]
[email protected]

[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker kill sync-gw-sidekick
ExecStartPre=-/usr/bin/docker rm sync-gw-sidekick
ExecStartPre=/usr/bin/docker pull tleyden5iwx/couchbase-cluster-go:latest
ExecStart=/bin/bash -c '/usr/bin/docker run --name sync-gw-sidekick --net=host tleyden5iwx/couchbase-cluster-go:latest update-wrapper sync-gw-cluster launch-sidekick --local-ip=$COREOS_PRIVATE_IPV4'
ExecStop=/usr/bin/docker stop sync-gw-sidekick

[X-Fleet]
[email protected]
2016/10/31 14:05:15 Launch fleet unit sync_gw_sidekick (2)
2016/10/31 14:05:15 response body:
2016/10/31 14:05:15 Sync Gw sidekick fleet unit: [Unit]
Description=sync_gw_sidekick
After=docker.service
Requires=docker.service
After=etcd.service
Requires=etcd.service
[email protected]
[email protected]

[Service]
TimeoutStartSec=0
EnvironmentFile=/etc/environment
ExecStartPre=-/usr/bin/docker kill sync-gw-sidekick
ExecStartPre=-/usr/bin/docker rm sync-gw-sidekick
ExecStartPre=/usr/bin/docker pull tleyden5iwx/couchbase-cluster-go:latest
ExecStart=/bin/bash -c '/usr/bin/docker run --name sync-gw-sidekick --net=host tleyden5iwx/couchbase-cluster-go:latest update-wrapper sync-gw-cluster launch-sidekick --local-ip=$COREOS_PRIVATE_IPV4'
ExecStop=/usr/bin/docker stop sync-gw-sidekick

[X-Fleet]
[email protected]
2016/10/31 14:05:15 Launch fleet unit sync_gw_sidekick (3)
2016/10/31 14:05:15 response body:
2016/10/31 14:05:15 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1848]
2016/10/31 14:05:15 Sleeping 2 seconds
2016/10/31 14:05:17 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1866]
2016/10/31 14:05:17 Sleeping 4 seconds
2016/10/31 14:05:21 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1900]
2016/10/31 14:05:21 Sleeping 6 seconds
2016/10/31 14:05:27 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1928]
2016/10/31 14:05:27 Sleeping 8 seconds
2016/10/31 14:05:35 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1950]
2016/10/31 14:05:35 Sleeping 10 seconds
2016/10/31 14:05:45 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [1985]
2016/10/31 14:05:45 Sleeping 12 seconds
2016/10/31 14:05:57 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [2045]
2016/10/31 14:05:57 Sleeping 14 seconds
2016/10/31 14:06:11 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [2107]
2016/10/31 14:06:11 Sleeping 16 seconds
2016/10/31 14:06:27 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [2175]
2016/10/31 14:06:27 Sleeping 18 seconds
2016/10/31 14:06:45 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [2248]
2016/10/31 14:06:45 Sleeping 20 seconds
2016/10/31 14:07:05 syncGwIpAddresses returned err: Error getting key.  Err: 100: Key not found (/couchbase.com/sync-gw-node-state) [2331]
2016/10/31 14:07:05 Sleeping 22 seconds

and keeps that for ever and didn't complete.

@PaulCapestany
Copy link
Owner

Hi @engmsaleh,

Somehow I totally missed this issue in my inbox, sorry about that! I'm kind of amazed that any of the code still works at all considering I haven't touched it in 2+ years… heh. Did you end up figuring things out by any chance?

@engmsaleh
Copy link
Author

Hi @PaulCapestany no, I couldn't get the sync gateway to run in docker and always get stuck on the same problem above . I have switched to the normal server installation without Docker, But It will be very helpful if you could update.

@PaulCapestany
Copy link
Owner

Gotcha. Just out of curiosity, was there anything in particular you were interested in accomplishing/learning that brought you to my project?

If anything, due to the fact that fleet is deprecated, the better way to go about doing things nowadays would probably be to set up a similar cluster using kubernetes

@engmsaleh
Copy link
Author

I'm working on a project that use couchbase for my company and we were thinking to go all docker infrastructure.
When I searched for Terraform that automate the deployment of that infrastructure, I found your wonderful one and I wanted to use it as a base.
I have played a little with Docker, but still nothing major ... What do you suggest?

@PaulCapestany
Copy link
Owner

@engmsaleh I'm a fan of containers, but depending on your use case, your mileage may vary :)

FWIW, if I were to create a more up-to-date version of this repo I'd probably try using https://coreos.com/rkt/ as a potential alternative to Docker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants