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

Unable to start Sync Gateway using docker-compose up command line tool #88

Open
Visput opened this issue Dec 21, 2017 · 2 comments
Open

Comments

@Visput
Copy link

Visput commented Dec 21, 2017

I am using docker-compose to run couchbase server and sync gateway.
I am following instructions as described in README.md.

Couchbase is running fine. I was able to start and configure it.
However Sync Gateway throwing an error:

WARNING: Error from Incr in sequence allocator (0) - attempt (3/3): EOF -- db.(*sequenceAllocator).incrWithRetry() at sequence_allocator.go:88

And then

FATAL: Error opening database: Unable to increment sequence: EOF -- rest.RunServer() at config.go:758

Full logs:

docker-compose up
Starting couchbaseserversyncgateway_sync-gateway_1 ...
couchbaseserversyncgateway_couchbase-server_1 is up-to-date
Starting couchbaseserversyncgateway_sync-gateway_1 ... done
Attaching to couchbaseserversyncgateway_couchbase-server_1, couchbaseserversyncgateway_sync-gateway_1
sync-gateway_1 | 2017-12-21T22:16:32.095Z Enabling logging: [HTTP+]
sync-gateway_1 | 2017-12-21T22:16:32.096Z ==== Couchbase Sync Gateway/1.4.0(2;9e18d3e) ====
sync-gateway_1 | 2017-12-21T22:16:32.096Z requestedSoftFDLimit < currentSoftFdLimit (5000 < 1048576) no action needed
sync-gateway_1 | 2017-12-21T22:16:32.096Z Opening db /db as bucket "default", pool "default", server http://couchbase-server:8091
sync-gateway_1 | 2017-12-21T22:16:32.097Z Opening Couchbase database default on http://couchbase-server:8091 as user "default"
sync-gateway_1 | _time=2017-12-21T22:16:32.118+00:00 _level=INFO _msg= Trying with selected node 0
sync-gateway_1 | _time=2017-12-21T22:16:32.120+00:00 _level=INFO _msg= Trying with http://172.19.0.3:8091/pools/default/bucketsStreaming/default
couchbase-server_1 | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs
couchbase-server_1 | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs
couchbase-server_1 | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs
couchbase-server_1 | Starting Couchbase Server -- Web UI available at http://:8091 and logs available in /opt/couchbase/var/lib/couchbase/logs
sync-gateway_1 | _time=2017-12-21T22:16:32.130+00:00 _level=INFO _msg=Got new configuration for bucket default
sync-gateway_1 | _time=2017-12-21T22:16:32.293+00:00 _level=INFO _msg= Trying with selected node 0
sync-gateway_1 | 2017-12-21T22:16:32.440Z WARNING: Error from Incr in sequence allocator (0) - attempt (1/3): EOF -- db.(*sequenceAllocator).incrWithRetry() at sequence_allocator.go:88
sync-gateway_1 | 2017-12-21T22:16:32.453Z WARNING: Error from Incr in sequence allocator (0) - attempt (2/3): EOF -- db.(*sequenceAllocator).incrWithRetry() at sequence_allocator.go:88
sync-gateway_1 | 2017-12-21T22:16:32.466Z WARNING: Error from Incr in sequence allocator (0) - attempt (3/3): EOF -- db.(*sequenceAllocator).incrWithRetry() at sequence_allocator.go:88
sync-gateway_1 | 2017-12-21T22:16:32.476Z WARNING: Too many unsuccessful Incr attempts in sequence allocator - giving up (0): EOF -- db.(*sequenceAllocator).incrWithRetry() at sequence_allocator.go:94
sync-gateway_1 | 2017-12-21T22:16:32.476Z WARNING: Error from Incr in _reserveSequences(0): Unable to increment sequence: EOF -- db.(*sequenceAllocator)._reserveSequences() at sequence_allocator.go:65
sync-gateway_1 | 2017-12-21T22:16:32.476Z FATAL: Error opening database: Unable to increment sequence: EOF -- rest.RunServer() at config.go:758
couchbaseserversyncgateway_sync-gateway_1 exited with code 1

@tleyden
Copy link
Contributor

tleyden commented Dec 21, 2017

I think it might be related to the order in which the containers are started. Note this SG issues which mentions that same error when the underlying couchbase server bucket is deleted:

couchbase/sync_gateway#1655

So that error might have happened when you were configuring couchbase server.

The docker compose script looks flawed in the sense that SG will try to connect to an un-configured Sync Gateway.

Is it possible to restart one container in the docker compose?

If not, I'd recommend just ignoring the docker compose and starting the containers individually, and make sure they are in the same network.

@rajagp do you have that blog post about Couchbase + Sync Gateway in docker handy?

@Visput
Copy link
Author

Visput commented Dec 22, 2017

Tried to restart just sync-gateway with command docker-compose restart sync-gateway.
Sync Gateway restarts and fail again with the same error.

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