-1

I have 2 VMs in the same "default" GCloud network: vm1 and vm2.

Inside vm1, I can:

vm1:~$ curl localhost:5984

{"couchdb":"Welcome","uuid":"121d13a07f68","version":"1.6.0","vendor":{"version":"16.10","name":"Ubuntu"}}

Inside vm2, I can:

vm2:~$ curl vm1-name

<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/1.10.1 (Ubuntu)</center>
</body>
</html>

But when I try to reach the 5984 port in vm1, I get:

vm2:~$ curl vm1-name:5984

curl: (7) Failed connect to vm1-name:5984; Connection refused

GCP adds a firewall rulle that let ingress all tcp:0-65535 traffic, so I don't understand what is going on here.

Fred Guth
  • 1,537
  • 1
  • 15
  • 27

1 Answers1

0

So... it wasn't a Gcloud problem after all. I found the clue here: https://serverfault.com/questions/79453/why-cant-i-access-my-couchdb-instance-externally-on-ubuntu-9-04-server

Just connect to vm1:5984/_utils/config.html (remember to login) and change bind_address to 0.0.0.0

Fred Guth
  • 1,537
  • 1
  • 15
  • 27