状态403:使用Couchbase时SG错误用户 [英] Status 403 : SG Wrong User while using Couchbase

查看:63
本文介绍了状态403:使用Couchbase时SG错误用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在发送POST请求,以通过Sync Gateway服务器将文档添加到Couchbase服务器.我正在使用serviceconfig.json,类似于

解决方案

响应表明您未使用正确的用户身份验证发布文档.您首先需要使用用户名/密码创建会话:

https://docs.couchbase.com/sync-gateway/2.1/rest-api.html#/session/post__db ___ session

POST会话请求将返回一个cookie和一个会话ID,在您的_bulk_docs中,您需要将cookie附加到POST请求中.

I'm sending a POST request to add Document to Couchbase Server via Sync Gateway Server. I'm using serviceconfig.json, similar to link. server key in "databases" contains a link to my Couchbase Server (http://localhost:8091). While firing the POST request, it shows a response shown below. Also, I have added the logs below,

404 no such database "fineract-cn"
400 invalid database name "favicon.ico"

解决方案

The response indicate you are not posting a doc with a proper user authentication. You need firstly create a session with username/password:

https://docs.couchbase.com/sync-gateway/2.1/rest-api.html#/session/post__db___session

the POST session request will return a cookie and a session id, in your _bulk_docs, you need to attach the cookie in your POST request.

这篇关于状态403:使用Couchbase时SG错误用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆