Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Basic CouchDB Local-to-Remote Replication

I am playing around with CouchDB Replication and I'm wondering how to copy a local database of name "myDatabase" to a remote database on www.mySite.com that requires ssh access, and rename it to "myRemoteDatabase". How do I do that?

I am able to login to both the local and remote servers and run:

curl -X GET http://localhost:5984/

...and it will show me the result, but when I am on my local computer and I run:

curl -X GET http://my.ip.address:5984/

... or even

curl -X GET http://USER:[email protected]:5984/

I get:

curl: (7) couldn't connect to host

What am I missing in this picture?

like image 575
Lance Avatar asked Jul 12 '26 03:07

Lance


2 Answers

Given the data you supplied, it can only be one thing.

You have configured CouchDB to listen on the localhost interface and no other. I'm unfamiliar with how CouchDB is configured, but it will be some option about binding to 127.0.0.1 or (in an IPv6 world) ::1. Many configurations do this by default as it is fairly safe. It will not allow access by any host other than localhost.

One possibility that I was thinking about is that the two machines have firewalls up that are not allowing connections from the outside world to port 5984. But almost no firewall protects a computer from access from itself. They can, but almost never do.

like image 156
Omnifarious Avatar answered Jul 14 '26 16:07

Omnifarious


sudo vi /etc/couchdb/default.ini

Under [httpd], change

bind_address = 127.0.0.1

to that server's IP, then:

sudo service couchdb restart
like image 31
Wayne Avatar answered Jul 14 '26 18:07

Wayne



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!