4

I've managed to install CouchDB onto a remote instance running Ubuntu, and can see that the DB is responding to my calls using curl (via the command line). Now, if I wish to access futon, I have to make calls by typing the command:

ssh -i i_am_a_key.pem -L 5984:localhost:5984 ubuntu@1<the IP address of the remote instance>

Following which, I open my web browser and type:

http://127.0.0.1:5984/_utils/

to access the web interface. In this process, I am able to access Futon, if and only if, I ssh into the instance, which is highly inconvenient. I tried looking up ways to allow me to gain access to my instance via the IP address of the instance and found the following methods:

  1. Edit the local.ini and default.ini file in /etc/init.d/ where I set the bind_address from 127.0.0.1 to 0.0.0.0

Following which, I go to /etc/couchdb/ and type:

sudo couchdb stop

and

sudo couchdb restart

in hopes of restarting couchdb and ensuring that the changes are retained. Following this, I open a browser and type:

http://<IP address of my remote instance>:5984/_utils/

This did not work.

  1. Access Futon using http://127.0.0.1:5984/_utils/

and go to the Configuration tab on the right hand side.

Go to the bind address row and set it manually to 0.0.0.0 and then stop and restart the couchdb setup as stated in the previous point. This did not work.

  1. I've tried to set the bind address to the IP address of the instance as well and it did not work.

Notes:

I have unblocked port 5984 (both ingress and egress) in my firewall.

I am able to get a Welcome response from CouchDB when I type:

curl http://127.0.0.1:5984/

and also for:

curl http://<the IP address of my instance>:5984/

It would be highly appreciated if someone can provide clear step-by-step details as to how to go about solving this issue. Or jus refer to some resource which states this process in as detailed a manner as possible... I've been scouring the net for a few days now and its weird that not a single solution is working out.

Michael Westen
  • 169
  • 2
  • 10
  • Can you make PUT and DELETE request? – Alexis Côté Sep 15 '16 at 16:03
  • What's the response, when you execute `curl http://:5984/_utils` ? – pwagner Sep 15 '16 at 16:27
  • @AlexisCôté - Yes, I can use PUT and DELETE requests using Curl. The changes are being reflected on the Futon interface as well. – Michael Westen Sep 16 '16 at 03:31
  • @pwagner - If I try that Curl command on the terminal then I get nothing. – Michael Westen Sep 16 '16 at 03:32
  • Strange, can you please include the HTTP header: `curl -i http://:5984/_utils/` – pwagner Sep 16 '16 at 10:54
  • @pwagner - If I include -i then I get back an HTTP 200 OK response followed by a bunch of HTML depicting the rendering of the page. – Michael Westen Sep 18 '16 at 23:25
  • Good, this means that port 5984 is definitely not blocked by a firewall. When you open futon in a browser, is there any console output? Sometimes there are CORS issues. – pwagner Sep 19 '16 at 08:28
  • @pwagner - Sorry for the late response. I received a notification about your reply just now. When I access Futon via the browser I do not get any console output... The only way for me to access Futon is by using SSH to login to the remote node first specifying the port number. – Michael Westen Sep 23 '16 at 05:45
  • Are you sure that the response is the same with curl and in the browser? If the request just times out, it indicates a blocked port. – pwagner Sep 24 '16 at 08:52
  • @pwagner - I restarted couchdb and am now able to view the HTML rendering response using curl http://:5984/_utils/ However, typing http://:5984/_utils/ into the search bar of my browser is still showing me that the site cannot be reached... I checked the firewall rules and can see that the port 5984 has been unblocked for both ingress and egress. – Michael Westen Sep 25 '16 at 23:06
  • I guess it is the browser's fault then, I'm sorry I cannot provide more useful assistance. – pwagner Sep 28 '16 at 16:47
  • If not this, do you happen to know of any website which presents a detailed tutorial to go about doing this ? I can always uninstall the current version of Couchdb I spun up and start from scratch. – Michael Westen Sep 29 '16 at 04:15
  • Can you please login to server & execute following commands outputs : curl -X GET http://127.0.0.1:5984 & netstat -nap | grep 5984 and share the outputs here, – Nilaxan Satgunanantham Apr 20 '17 at 09:17

0 Answers0