You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2020/02/24 13:14:12 UTC

[GitHub] [couchdb] razcakappa opened a new issue #2594: replication_auth_error with adding a Fauxton replication

razcakappa opened a new issue #2594: replication_auth_error with adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594
 
 
   [NOTE]: # ( ^^ Provide a general summary of the issue in the title above. ^^ )
   
   From fauxton, when adding a replication request for simply replicate two local dbs, it fails. Couchdb server dumps following 
   ```
   [error] 2020-02-24T13:02:38.833469Z nonode@nohost <0.25331.2> -------- throw:{replication_auth_error,{session_request_failed,"http://localhost:5960/_session","root",{conn_failed,{error,econnrefused}}}}: Replication b74453cfeaebef74832d4b6e3458c4eb+create_target failed to start "http://localhost:5960/adsman/" -> "http://localhost:5960/adsman2/" doc <<"shards/80000000-9fffffff/_replicator.1582536482">>:<<"9524c7d42d681a16e48cedd5c9004cba">> stack:[{couch_replicator_httpc,setup,1,[{file,"src/couch_replicator_httpc.erl"},{line,63}]},{couch_replicator_api_wrap,db_open,4,[{file,"src/couch_replicator_api_wrap.erl"},{line,74}]}]
   ```
   
   [NOTE]: # ( Describe the problem you're encountering. )
   [TIP]:  # ( Do NOT give us access or passwords to your actual CouchDB! )
   
   1. Run a new couchdb docker instance with correct port mapping to host machin.
   2. Open up Fauxton and create an admin user.
   3. With same user add a DB with sample document.
   4. With the same user add a replication from Fauxton screen to replicate the above DB to new DB
   5. Submit the request and subscribe to Couchdb server log to see the error
   
   [NOTE]: # ( Include commands to reproduce, if possible. curl is preferred. )
   
   Two DBs should be properly replicated.
   
   [NOTE]: # ( Tell us what you expected to happen. )
   
   Docker-compose environment with following yaml.
   ```
   adsman_couchdb:
   container_name: vg_node_express_adsman_couchdb
     image: couchdb:latest
     ports:
     - "5960:5984"
     volumes:
     - adsman_data:/opt/couchdb/data
      - adsman_lib:/var/lib/couchdb
   ```
   
   [TIP]:  # ( Include as many relevant details about your environment as possible. )
   [TIP]:  # ( You can paste the output of curl http://YOUR-COUCHDB:5984/ here. )
   
   * v 2.31
   * Firefox 73.0.1 (64-bit) on ubuntu
   * Couchdb runs on docker debian
   
   ## Additional Context
   
   [TIP]:  # ( Add any other context about the problem here. )
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] razcakappa commented on issue #2594: replication_auth_error while adding a Fauxton replication

Posted by GitBox <gi...@apache.org>.
razcakappa commented on issue #2594: replication_auth_error while adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594#issuecomment-590700454
 
 
   @nickva Thanks for pointing out my silly mistake. I just edited the raw replication document and added localhost:5984 and it started to work. 
   
   However I assume on Fauxton, it still gets the browser's port when recording replication data about local DBs. Isn't this supposed to be a bug or am I missing something again as usual?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] nickva commented on issue #2594: replication_auth_error while adding a Fauxton replication

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #2594: replication_auth_error while adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594#issuecomment-590403678
 
 
   @razcakappa it looks like the container is trying to connect to the container's 5960 port n localhost. Make sure that it can can reach that port and connect to it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] nickva edited a comment on issue #2594: replication_auth_error while adding a Fauxton replication

Posted by GitBox <gi...@apache.org>.
nickva edited a comment on issue #2594: replication_auth_error while adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594#issuecomment-590403678
 
 
   @razcakappa it looks like the container is trying to connect to the container's 5960 port on localhost. Make sure that it can can reach that port and connect to it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] razcakappa commented on issue #2594: replication_auth_error while adding a Fauxton replication

Posted by GitBox <gi...@apache.org>.
razcakappa commented on issue #2594: replication_auth_error while adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594#issuecomment-591820796
 
 
   I just checked the [Fauxton code](https://github.com/apache/couchdb-fauxton/blob/f64e88d211a113b34e3935f31c9f90bac49baeb3/app/helpers.js#L81) and it simply grabs the URL from the window object it seems.
   ```
   Helpers.getRootUrl = ({origin, pathname} = window.location) => {
     return url.resolve(origin + pathname, app.host);
   };
   ```
   If CouchDB provides a way to get server URL with ports then this can be fixed from the Fauxton end.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [couchdb] nickva commented on issue #2594: replication_auth_error while adding a Fauxton replication

Posted by GitBox <gi...@apache.org>.
nickva commented on issue #2594: replication_auth_error while adding a Fauxton replication
URL: https://github.com/apache/couchdb/issues/2594#issuecomment-591510274
 
 
   Glad it worked.
   
   And agree it does seem like a bug. I don't know much about how Fauxton builds the local UR. It might grab whatever it sees from the browser's location perhaps? But I can see in general how running from a container with port forwarding there might not even be a way to determine a proper "local" version for the endpoints.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services