On Fri, Mar 20, 2015 at 10:33 PM, Alexander Shorin <[email protected]> wrote:

> On Fri, Mar 20, 2015 at 7:50 PM, madhuka udantha
> <[email protected]> wrote:
> >
> > Q1) I also went through the REST API and I like to know weather we can
> add
> > nodes into clusters from the REST API (else only in config.)?
>
> Documentation is in progress, but here is python[1] example of how dev
> nodes becomes a cluster.


Python!, I did not notice it so far, I too had tried Flask for REST in
python[1] few days go for my master research(big-data project) Nice to hear
on python code in it. :)

[1]  http://madhukaudantha.blogspot.com/search/label/Python

You can also look on _nodes database which is
> available on backdoor (5986) port.
>

http://localhost:15986/_nodes -->
{"db_name":"_nodes","doc_count":1,"doc_del_count":0..}
http://localhost:25986/_nodes  -->
{"db_name":"_nodes","doc_count":1,"doc_del_count":0..}
http://localhost:35986/_nodes   -->
{"db_name":"_nodes","doc_count":1,"doc_del_count":0..}
[image 1]

I like to know what is *different of '_nodes' and 'node'*?

http://localhost:15986/nodes -->{"db_name":"nodes","doc_count":3..}
http://localhost:25986/nodes -->{"db_name":"nodes","doc_count":1..}
http://localhost:35986/nodes -->{"error":"not_found","reason":"no_db_file"}
[image 2]



>
> [1]: https://github.com/apache/couchdb/blob/master/dev/run#L298-L307

*Thanks, This is what I was asking. :)*
I too can support on documenting (blog for those) if is it ok with you?


>
> > Q2) When I am running the fauxton (http://localhost:8000/#/_all_dbs), I
> see
> > the list of DBs but when I click one of them and move to '
> > http://localhost:8000/#/database/test8000/_all_docs' it gives an error
> in
> > web UI with RED text saying 'bad request'. Some pages it shows 'Databases
> > is not exit' Here i am sharing my screen shoots.
> > Is it the way it work?
> > I think the reason for above Q2. is round-robin nature of Loadbalancer.
> Am
> > I correct?
>
> Could you open browser network console and say what the actual request
> Fauxton made to receive such response?
>

http://localhost:8000/test8000/_all_docs?startkey=%22_design%2F%22&endkey=%22_design0%22&include_docs=true&limit=501


*Use-case for issue*
1. Go to 'http://localhost:8000/' you will see DB (If you have added
previously)
2. Click one of the DB that is listed (I clicked on DB called 'test8000',
that I have created)
3. You will see the error on page '
http://localhost:8000/#/database/test8000/_all_docs'

I used network console to check what is request that page (
http://localhost:8000/#/database/test8000/_all_docs) sending this[2]
[image 3] showing my web page and network console of above

*My finding about this issue *

1. I sent web request for [2] --> {"error":"not_found","reason":"Database
does not exist."}
2. I sent request again --> {"error":"not_found","reason":"Database does
not exist."}
3. For the third time I sent request -->
{"total_rows":0,"offset":0,"rows":[ ]}
// 3rd request works fine  (I have created no docs in there, empty array
was return without error)
[image 4]

[image 1] https://app.box.com/s/bm9adp3vaajshwsbqbl7dev91y81qzqa
[image 2] https://app.box.com/s/ty7iq24ixwkqf5dvz3kp72j24qzhwysc
[image 3] https://app.box.com/s/lvfxsi1hgwzhpcl8cwhjoowfr1xiau99
[image 4] https://app.box.com/s/p0aey0imcw871e8udxcblsrzkkurs32h

[2]
http://localhost:8000/test8000/_all_docs?startkey=%22_design%2F%22&endkey=%22_design0%22&include_docs=true&limit=501

>
>
> --
> ,,,^..^,,,
>



-- 
Cheers,
Madhuka Udantha
http://madhukaudantha.blogspot.com

Reply via email to