While running the couchbase 4.5 server pre configured image arungupta/couchbase-server, the rest calls being made towards setting up of data,index,query and fts services is returning 400 bad request error.
The first 2 curls mentioned in the configure-node.sh are returning 400 bad request.
curl -v -X POST http://127.0.0.1:8091/pools/default -d memoryQuota=256 -d indexMemoryQuota=256 -d ftsMemoryQuota=256 —> 400 bad request
curl -v http://127.0.0.1:8091/node/controller/setupServices -d services=kv%2Cn1ql%2Cindex%2Cfts —> 400 bad request
arungupta/couchbase-server was using an older tag of EE 4.5.0, just updated to the latest version. And I could run the server as:
Starting Couchbase Server -- Web UI available at http://<ip>:8091
{error_logger,{{2016,8,27},{2,32,47}},"global_trace:~n~p",[{loop_the_locker,{multi,[],[],[],'nonode@nohost',false,false}}]}
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
> POST /pools/default HTTP/1.1
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:8091
> Accept: */*
> Content-Length: 55
> Content-Type: application/x-www-form-urlencoded
>
} [55 bytes data]
* upload completely sent off: 55 out of 55 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Sat, 27 Aug 2016 02:33:01 GMT
< Content-Length: 0
< Cache-Control: no-cache
<
100 55 0 0 100 55 0 16671 --:--:-- --:--:-- --:--:-- 27500
* Connection #0 to host 127.0.0.1 left intact
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
> POST /node/controller/setupServices HTTP/1.1
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:8091
> Accept: */*
> Content-Length: 32
> Content-Type: application/x-www-form-urlencoded
>
} [32 bytes data]
* upload completely sent off: 32 out of 32 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Sat, 27 Aug 2016 02:33:01 GMT
< Content-Length: 0
< Cache-Control: no-cache
<
100 32 0 0 100 32 0 10266 --:--:-- --:--:-- --:--:-- 16000
* Connection #0 to host 127.0.0.1 left intact
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
> POST /settings/web HTTP/1.1
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:8091
> Accept: */*
> Content-Length: 50
> Content-Type: application/x-www-form-urlencoded
>
} [50 bytes data]
* upload completely sent off: 50 out of 50 bytes
< HTTP/1.1 200 OK
< Server: Couchbase Server
< Pragma: no-cache
< Date: Sat, 27 Aug 2016 02:33:01 GMT
< Content-Type: application/json
< Content-Length: 39
< Cache-Control: no-cache
<
{ [39 bytes data]
100 89 100 39 100 50 9740 12487 --:--:-- --:--:-- --:--:-- 16666
* Connection #0 to host 127.0.0.1 left intact
* Trying 127.0.0.1...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0* Connected to 127.0.0.1 (127.0.0.1) port 8091 (#0)
* Server auth using Basic with user 'Administrator'
> POST /sampleBuckets/install HTTP/1.1
> Authorization: Basic QWRtaW5pc3RyYXRvcjpwYXNzd29yZA==
> User-Agent: curl/7.40.0-DEV
> Host: 127.0.0.1:8091
> Accept: */*
> Content-Length: 17
> Content-Type: application/x-www-form-urlencoded
>
} [17 bytes data]
* upload completely sent off: 17 out of 17 bytes
< HTTP/1.1 202 Accepted
< Server: Couchbase Server
< Pragma: no-cache
< Date: Sat, 27 Aug 2016 02:33:01 GMT
< Content-Type: application/json
< Content-Length: 2
< Cache-Control: no-cache
<
{ [2 bytes data]
100 19 100 2 100 17 194 1656 --:--:-- --:--:-- --:--:-- 1700
* Connection #0 to host 127.0.0.1 left intact
{"newBaseUri":"http://127.0.0.1:8091/"}[]/entrypoint.sh couchbase-server
And the updated server looks like:
Can you try again?
It works now :). I think part of the problem was that I had an old arungupta/couchbase-server image residing in the docker machine. I flushed it and ran the latest one and I get 200 ok for all the 4 curls. Thanks for your help.
I wonder if anyone has experiences in running dockers in RHEL 7++. I am receiving error and the image terminated.
{error_logger,{{2016,8,26},{6,41,42}},“global_trace:~n~p”,[{loop_the_locker,{multi,,,,‘nonode@nohost’,false,false}}]}
Eshell V5.10.4.0.0.1 (abort with ^G)
(babysitter_of_ns_1@127.0.0.1)1> *** Terminating erlang (‘babysitter_of_ns_1@127.0.0.1’)
here is the dockerfile
FROM rhel:7.2
MAINTAINER Andrew Mak
ADD docker.repo /etc/yum.repos.d/
ADD not-certified.repo /etc/yum.repos.d/
ADD zeus.repo /etc/yum.repos.d/
RUN yum -y install couchbase-server
EXPOSE 8091 8092 8093 8094 11207 11210 11211 18091 18092 18093
VOLUME /opt/couchbase/var
CMD [“/opt/couchbase/bin/couchbase-server”]
@chakrar27 Apology for hijacking your post.
@wai.kwang.mak please start a new thread!