How to restart sync gateway to work?

Hi,

Today my synch gateway stopped suddenly. So i tried to restart synch gateway and server. Now both are showing active (running) But if i try to hit the following link it is working.

http://ipaddress:8091/ui/index.html

But when i hit the following link. It is not working. So my synchgate way not returning any result to my Mobile application.

http://ipaddress:4984/

Here attached all the required screenshots.
31%20AM40%20AM

Please send full log trace from Sync gateway (with the last message that is output).

Also include details of the version of Sync Gateway and the platform you are installing on.

You can add it as a [gist][https://gist.github.com) and link it to here. From the snippet, it appears that it stops and starts again. So something is amiss (and thats the same reason why it probably stopped suddenly). But we would need to know the messages after the “Started” line below

Hi Priya,

Here, I attached the link and sync gateway service status from the terminal.

sync gateway error logs link

From:

2018-05-11T14:13:41.323Z WARNING: Error opening bucket: default. Error: authentication error – base.GetCouchbaseBucketGoCB() at bucket_gocb.go:118
2018-05-11T14:13:41.323Z Debug: RetryLoop retrying Attempt to connect to bucket : default after 10 ms.

It looks like it doesn’t have the proper credentials to connect to the bucket. Do you have an RBAC user on Couchbase Server and is SG configured to use that RBAC users?

@jamiltz if you know of any good docs that explain this, can you link them here?

Looks like this is a duplicate thread to: My synch-gateway stopped, How to revert?

No, I don’t have any RBAC users. please see attachements.

For your refrence i am attaching my sync gateway error link Here i seen fatal error: runtime: out of memory also.

Oh I’d missed that initially.

It looks like you are using Walrus:

/usr/local/go/1.7.4/go/src/encoding/gob/encoder.go:175 +0x61 fp=0xc420037ef0 sp=0xc420037eb0
github.com/couchbaselabs/walrus.(*WalrusBucket)._save(0xc42008ea20, 0x0, 0x0)
/home/couchbase/jenkins/workspace/sgw-unix-build@2/1.5.1/community/godeps/src/github.com/couchbaselabs/walrus/persist.go:28 +0x17f fp=0xc420037f48 sp=0xc420037ef0
github.com/couchbaselabs/walrus.(*WalrusBucket)._saveSoon.func1(0xc42008ea20)

which stores everything in memory, and so as the amount of data grows the amount of memory that is used will keep increasing.

Can you change your SG config and make sure that Couchbase Server is being used everywhere and there are no Walrus usages, and then post your results?

Sure, I will uninstall couchbsae server and couchbase sync gateway. Will do from scratch again.

{
	"log": ["*"],	
	"databases": {
		"db": {
			"server": "http://myipaddress:8091",
			"usernam" :"admin",
			"password":"password",
			"bucket": "bucketname",
			"users": {
				"GUEST": {"disabled": false, "admin_channels": ["*"] }
			}
		}
	}
}

Here really required to give username and password and assign role in couchbase UI or else can i make it public?

I want to sync all the data from the server to mobile through sync gateway and vice versa, either data was added/updated from N1QL or 8091 or any REST API, as well as from the mobile. is Above configuration is enough? Do i need add anything more?

This appears to be a duplicate post. Please refrain from asking duplicate questions …

sure, i will take care next time onwards.

@itssrinadh we’ve updated the getting started page with some instructions for RBAC https://developer.couchbase.com/documentation/mobile/2.0/installation/sync-gateway/index.html.

Did you fix the “username” typo as I suggested in the other post ?

sure, i will check it.

Sorry, I was uninstalled my couchbase and want to start fresh, due to my data was stored into Walrus.

Just for a refrence. any couchbase partner shall we find in couchbase support. like They need set up and mange the server and solve the issues.