You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Sundar Sankarnarayanan <Su...@aexp.com.INVALID> on 2014/10/03 23:45:45 UTC

Re: Error:not found

Hi Dave,

Curl and Dig looked ok to me. Here are the results
The curl Result is this

  *
Adding handle: conn: 0x7f93eb803000
* Adding handle: send: 0
* Adding handle: recv: 0
* Curl_addHandleToPipeline: length: 1
* - Conn 0 (0x7f93eb803000) send_pipe: 1, recv_pipe: 0
* About to connect() to proxy proxy-***** port **(#0)
*   Trying 148.XXX.XXX.XXX...
* Connected to proxy-****** (148.XXX.XXX.XXX) port ** (#0)
* Establish HTTP proxy tunnel to skimdb.npmjs.com:443
* Proxy auth using Basic with user ’sundars user ID'
> CONNECT skimdb.npmjs.com:443 HTTP/1.1
> Host: skimdb.npmjs.com:443
> Proxy-Authorization: Basic c3NhbmsxMzpwdXRodXN1LTM=
> User-Agent: curl/7.30.0
> Proxy-Connection: Keep-Alive
>
< HTTP/1.0 200 Connection established
<
* Proxy replied OK to CONNECT request
* TLS 1.2 connection using TLS_RSA_WITH_AES_256_CBC_SHA256
* Server certificate: skimdb.npmjs.com
* Server certificate: RapidSSL CA
* Server certificate: GeoTrust Global CA
* Server certificate: Equifax Secure Certificate Authority
> HEAD / HTTP/1.1
> User-Agent: curl/7.30.0
> Host: skimdb.npmjs.com
> Accept: */*
>
< HTTP/1.1 200 OK
* Server CouchDB/1.5.0 (Erlang OTP/R16B03) is not blacklisted
< Server: CouchDB/1.5.0 (Erlang OTP/R16B03)
< Date: Fri, 03 Oct 2014 21:08:31 GMT
< Content-Type: text/plain; charset=utf-8
< Content-Length: 127
< Cache-Control: must-revalidate

The dig result is




; <<>> DiG 9.8.3-P1 <<>> -t ANY skimdb.npmjs.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 34733
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;skimdb.npmjs.com. IN ANY

;; AUTHORITY SECTION:
com. 600 IN SOA PHXIPCQIPAPPL07.***.***.****.com. ***.***.com. 8586 21600 3600 604800 600

;; Query time: 53 msec
;; SERVER: 148.173.250.189#53(148.173.250.189)
;; WHEN: Fri Oct  3 14:43:27 2014
;; MSG SIZE  rcvd: 107




Thanks
Sundar S



Hi Sundar,

Alex’s point is that your server appears not to be able to resolve `skimdb.npmjs.com`. You need to fix this before replication will work inside CouchDB.

Does `curl -vXHEAD https://skimdb.npmjs.com/` work?

What output do you get from DNS, e.g. `drill -t skimdb.npmjs.com`

;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 31157 ;; flags: qr rd ra ; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0 ;; QUESTION SECTION: ;; skimdb.npmjs.com. IN A

;; ANSWER SECTION: skimdb.npmjs.com. 300 IN CNAME ec2-54-86-193-198.compute-1.amazonaws.com. ec2-54-86-193-198.compute-1.amazonaws.com. 86400 IN A 54.86.193.198

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 234 msec ;; SERVER: 10.0.0.138 ;; WHEN: Fri Oct  3 21:33:16 2014 ;; MSG SIZE  rcvd: 102

Let’s move this to the us...@couchdb.apache.org list, this list is for discussing the actual replication protocol itself, & not general support. Please send any further questions or replies to that list. Thanks!

— Dave Cottlehuber dc...@jsonified.com Sent from my Couch




From: Sundar Sankarnarayanan <Su...@aexp.com>>
Date: Friday, October 3, 2014 at 10:40 AM
To: "replication@couchdb.apache.org<ma...@couchdb.apache.org>" <re...@couchdb.apache.org>>
Subject: Re: Error:not found


Jeff,

This is what I get when I remove “cancel:true: from the option.


[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 0.25 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 0.5 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 1.0 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 2.0 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 4.0 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 8.0 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.804.0>] Retrying HEAD request to https://skimdb.npmjs.com/registry/express/ in 16.0 seconds due to error {conn_failed,{error,nxdomain}}
[info] [<0.111.0>] 127.0.0.1 - - POST /_replicate 500
[error] [<0.805.0>] ** Generic server <0.805.0> terminating
** Last message in was {'EXIT',<0.804.0>,killed}
** When Server state == {state,"https://skimdb.npmjs.com/registry/express/",
                               20,[],[],
                               {[],[]}}
** Reason for termination ==
** killed


=ERROR REPORT==== 3-Oct-2014::10:07:25 ===
** Generic server <0.805.0> terminating
** Last message in was {'EXIT',<0.804.0>,killed}
** When Server state == {state,"https://skimdb.npmjs.com/registry/express/",
                               20,[],[],
                               {[],[]}}
** Reason for termination ==
** killed
[error] [<0.805.0>] {error_report,<0.30.0>,
                     {<0.805.0>,crash_report,
                      [[{initial_call,
                         {couch_replicator_httpc_pool,init,['Argument__1']}},
                        {pid,<0.805.0>},
                        {registered_name,[]},
                        {error_info,
                         {exit,killed,
                          [{gen_server,terminate,6,
                            [{file,"gen_server.erl"},{line,746}]},
                           {proc_lib,init_p_do_apply,3,
                            [{file,"proc_lib.erl"},{line,239}]}]}},
                        {ancestors,
                         [<0.804.0>,couch_replicator_job_sup,
                          couch_primary_services,couch_server_sup,<0.31.0>]},
                        {messages,[]},
                        {links,[]},
                        {dictionary,[]},
                        {trap_exit,true},
                        {status,running},
                        {heap_size,376},
                        {stack_size,27},
                        {reductions,494}],
                       []]}}

=CRASH REPORT==== 3-Oct-2014::10:07:25 ===
  crasher:
    initial call: couch_replicator_httpc_pool:init/1
    pid: <0.805.0>
    registered_name: []
    exception exit: killed
      in function  gen_server:terminate/6 (gen_server.erl, line 746)
    ancestors: [<0.804.0>,couch_replicator_job_sup,couch_primary_services,
                  couch_server_sup,<0.31.0>]
    messages: []
    links: []
    dictionary: []
    trap_exit: true
    status: running
    heap_size: 376
    stack_size: 27
    reductions: 494
  neighbours:
[error] [<0.111.0>] httpd 500 error response:
 {"error":"timeout"}




> On Oct 3, 2014, at 9:41 AM, Sundar Sankarnarayanan <Su...@aexp.com.INVALID>>
wrote:
>
> curl -X POST http://admin:admin123@127.0.0.1:5984/_replicate -d '{"source":"https://skimdb.npmjs.com/registry",
"target":"http://admin:admin123@127.0.0.1:5984/registry", "continuous":true, "create_target":true,
"cancel":true}' -H "Content-Type: application/json"

Why did you add "cancel":true? That's to cancel an existing replication. If there's no replication
with those parameters already running, the 404 error is expected. Try taking out the cancel
property.

—Jens

From: Sundar Sankarnarayanan <Su...@aexp.com>>
Date: Friday, October 3, 2014 at 9:41 AM
To: "replication@couchdb.apache.org<ma...@couchdb.apache.org>" <re...@couchdb.apache.org>>
Subject: Error:not found

Hi,
Am new to couchDB and am running into replication issues using couchDB. Environments tried this on an RHEL server and my Mac. On both environments, Am behind a proxy and have exported http_proxy and https_proxy. I also have exported no_proxy for localhost and 127.0.0.1.  I do have admin account setup  (Admin and admin123 password) for the local couchDB instance and my log levels are set to debug.

All am trying to do is replicate from a remote ("https://skimdb.npmjs.com/registry” or http://isaacs.iriscouch.com/registry/“) to my local couch. I get a {error:not found”} and no reason is specified. The command I use is

curl -X POST http://admin:admin123@127.0.0.1:5984/_replicate -d '{"source":"https://skimdb.npmjs.com/registry", "target":"http://admin:admin123@127.0.0.1:5984/registry", "continuous":true, "create_target":true, "cancel":true}' -H "Content-Type: application/json"

I have tried with variations of this command, with admin username and password as part of the target, removing create_target, cancel and continuous, results seems to always be the same.

I have a suspicion that it is because couch / Erlang behind the proxy that is not using the proxy configs, but am not able to confirm that as there is nothing more that is being logged. Could you point me in the right direction to help figure what is going on?


Thanks
Sundar S





American Express made the following annotations
******************************************************************************
"This message and any attachments are solely for the intended recipient and may contain confidential or privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

American Express a ajouté le commentaire suivant le Ce courrier et toute pièce jointe qu'il contient sont réservés au seul destinataire indiqué et peuvent renfermer des 
renseignements confidentiels et privilégiés. Si vous n'êtes pas le destinataire prévu, toute divulgation, duplication, utilisation ou distribution du courrier ou de toute pièce jointe est interdite. Si vous avez reçu cette communication par erreur, veuillez nous en aviser par courrier et détruire immédiatement le courrier et les pièces jointes. Merci.

******************************************************************************

nxdomain (was Re: Error:not found)

Posted by Dave Cottlehuber <dc...@jsonified.com>.
> Hi Dave,
>  
> Curl and Dig looked ok to me. Here are the results
> The curl Result is this
>  
> *
> Adding handle: conn: 0x7f93eb803000
> * Adding handle: send: 0
> * Adding handle: recv: 0
> * Curl_addHandleToPipeline: length: 1
> * - Conn 0 (0x7f93eb803000) send_pipe: 1, recv_pipe: 0
> * About to connect() to proxy proxy-***** port **(#0)

Also I see your DNS issue is fixed or gone away, good.

> Am new to couchDB and am running into replication issues using couchDB. Environments  
> tried this on an RHEL server and my Mac. On both environments, Am behind a proxy and have  
> exported http_proxy and https_proxy. I also have exported no_proxy for localhost and  
> 127.0.0.1. I do have admin account setup (Admin and admin123 password) for the local  
> couchDB instance and my log levels are set to debug.

Next, the proxy of evil. using env vars is not sufficient for couchdb, please read

https://wiki.apache.org/couchdb/Replication#Replicating_through_a_proxy

and see if that helps. It’s not in the main documentation but I think it’s still
applicable. This should be suitable:

{
    "_id": "npm-skimdb",
    "target": “registry",
    "continuous": true,
    "owner": "admin",
    "roles": [
        "_admin"
    ],
    "source": "https://skimdb.npmjs.com/registry",
    "proxy": "http://proxy:12345"
}

I use the super http://httpie.org/ http tool:

http --json --pretty all --verbose --style fruity \
  post $COUCH/testy \
  _id=npm-skimdb \
  source=https://skimdb.npmjs.com/registry \
  target=registry \
  continuous:=true \
  owner=admin roles:='["_admin"]' \
  proxy="http://proxy:12345"

A+
Dave