title: Local-to-remote replication times out or replicates only few documents CouchDb
body: <p>I run couchdb installed in Docker (klaemo/couchdb), and have port forwarded the installation so it is available to my local machine. I have not configured this database aside from adding an admin user.</p>
  
  <p>These are my vm port forwarding settings:
  <img src="https://i.stack.imgur.com/0E8Zj.png" alt="enter image description here"></p>
  
  <p>I can open localhost:5984/_utils, browse the data in the installation, and I can instantiate a replication from my remote database in AWS down to this couchDB, but if I initiate a replication the other way, it never updates in Futon (all I get is spinner in the menu bar).</p>
  
  <p>If I do the replication with Curl, like so:</p>
  
  <pre><code>curl -X POST http://localhost:5984/_replicate -d '{"source":"http://username:password@localhost:5984/database-name","target":"http://username:password@remote.url.com:5984/database-name","connection_timeout":"60000"}' -H "Content-Type: application/json"
  </code></pre>
  
  <p>I get a timeout.</p>
  
  <pre><code>{"error":"timeout"}
  </code></pre>
  
  <p>If I open Charles (a HTTP proxy) and add "proxy":"<a href="http://localhost:8888" rel="nofollow noreferrer">http://localhost:8888</a>" to the curl request payload, no traffic ever appears, so I assume the connection is never even attempted between local couch and remote couch.</p>
  
  <p>Any ideas why this is?</p>
  
  <p><strong>Edit</strong></p>
  
  <p>Note that the curl replication is executed inside a shell in the docker container. I am able to create new databases fine on both local and remote databases from the same container, only replication times out.</p>
  
  <p><strong>Edit 2</strong>
  After some trial and error, I get the replication to run, but it only replicates a subset of documents:</p>
  
  <p>Response after running replication cURL:</p>
  
  <p><code>{"ok":true,"session_id":"3c195aa3c723696bfb33679d4de3632a","source_last_seq":79,"replication_id_version":3,"history":[{"session_id":"3c195aa3c723696bfb33679d4de3632a","start_time":"Mon, 20 Apr 2015 13:42:37 GMT","end_time":"Mon, 20 Apr 2015 13:42:38 GMT","start_last_seq":0,"end_last_seq":79,"recorded_seq":79,"missing_checked":53,"missing_found":53,"docs_read":53,"docs_written":**53**,"doc_write_failures":0}]}</code>    </p>
  
  <p>the target DB was an empty DB, so it should replicate all documents. This, by the way is the result of cURL'in the local origin DB:</p>
  
  <p><code>{"db_name":"db-name","doc_count":**435**,"doc_del_count":0,"update_seq":43116,"purge_seq":0,"compact_running":false,"disk_size":384835704,"data_size":7091262,"instance_start_time":"1429537029129810","disk_format_version":6,"committed_update_seq":43116}</code></p>
  
  <p>So it should have replicated 435 documents and not 53.</p>
  
  <p>I thought if I ran the replication again it would continue the process, but it did not run (no_changes: true):</p>
  
  <p><code>{"ok":true,"no_changes":true,"session_id":"3c195aa3c723696bfb33679d4de3632a","source_last_seq":79,"replication_id_version":3,"history":[{"session_id":"3c195aa3c723696bfb33679d4de3632a","start_time":"Mon, 20 Apr 2015 13:42:37 GMT","end_time":"Mon, 20 Apr 2015 13:42:38 GMT","start_last_seq":0,"end_last_seq":79,"recorded_seq":79,"missing_checked":53,"missing_found":53,"docs_read":53,"docs_written":53,"doc_write_failures":0}]}</code></p>