External access CouchDB in a windows server 2012 google-compute-engine instance

168 views
Skip to first unread message

Evemar Wernick

unread,
Sep 27, 2016, 12:43:47 AM9/27/16
to gce-discussion
Hi,

I am testing the Google Cloud Platform (trial) thinking in migrate from another VPN platform.

So, I created a new project and a Compute Engine VM Instance with Windows Server 2012.

I have installed CouchDB.

It works fine and I can access the databases locally (localhost:5984/_utils).

But when I try to access through the external IP, I've got 'This site can’t be reached... took too long to respond'... If I try only the IP address (without :5984) it returns IIS default page normally.

I have tried to put rules in firewall and even turn off firewall without success.

[BTW: What is the difference of set External IP 'Ephemeral' or static (srv name)? (I also have tried both without success)]

Thanks !!!
Evemar

Paul Nash

unread,
Sep 27, 2016, 2:39:41 AM9/27/16
to Evemar Wernick, gce-discussion
Hi Evemar, you said that you tried the firewall settings, but did you mean the GCE firewall? Some poking around online that I did confirms my suspicion that your problem may (also) be related to the Windows Firewall. Please check the settings in control panel and see if you can create a rule to allow this port inbound.

An ephemeral IP means that a Google IP address is assigned to your VM when it is started, and that same IP will remain assigned to that VM, as long as the VM is running. However if you stop that instance and restart it later, it may be assigned a different IP. If you need the server to remain at the same IP no matter what (for instance if you want to hardcode the IP from another client, or map it to a DNS record) then use a static IP instead. Note that a static IP incurs a small monthly fee when they are *not* actively in use, as these are a limited resource.

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/5407c74f-dcbb-4a1f-9ad0-0eacb072f00b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

Paul R. Nash | Product Manager, Compute Engine | paul...@google.com | 206-876-1620

Evemar Wernick

unread,
Sep 27, 2016, 7:36:47 AM9/27/16
to gce-discussion, eve...@gmail.com
Hi Paul! Thanks for your answer.

I only tried the windows (inside VM) firewall settings. How do I configure the GCE firewall rules to accept :5984 port (couchDB)? 

(Thanks also for clarifying about ephemeral / static IP!)




Em terça-feira, 27 de setembro de 2016 03:39:41 UTC-3, Paul Nash escreveu:
Hi Evemar, you said that you tried the firewall settings, but did you mean the GCE firewall? Some poking around online that I did confirms my suspicion that your problem may (also) be related to the Windows Firewall. Please check the settings in control panel and see if you can create a rule to allow this port inbound.

An ephemeral IP means that a Google IP address is assigned to your VM when it is started, and that same IP will remain assigned to that VM, as long as the VM is running. However if you stop that instance and restart it later, it may be assigned a different IP. If you need the server to remain at the same IP no matter what (for instance if you want to hardcode the IP from another client, or map it to a DNS record) then use a static IP instead. Note that a static IP incurs a small monthly fee when they are *not* actively in use, as these are a limited resource.
On Mon, Sep 26, 2016 at 6:05 PM, Evemar Wernick <eve...@gmail.com> wrote:
Hi,

I am testing the Google Cloud Platform (trial) thinking in migrate from another VPN platform.

So, I created a new project and a Compute Engine VM Instance with Windows Server 2012.

I have installed CouchDB.

It works fine and I can access the databases locally (localhost:5984/_utils).

But when I try to access through the external IP, I've got 'This site can’t be reached... took too long to respond'... If I try only the IP address (without :5984) it returns IIS default page normally.

I have tried to put rules in firewall and even turn off firewall without success.

[BTW: What is the difference of set External IP 'Ephemeral' or static (srv name)? (I also have tried both without success)]

Thanks !!!
Evemar

--
© 2016 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.

---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.

George (Google Cloud Support)

unread,
Sep 27, 2016, 10:39:39 AM9/27/16
to gce-discussion, eve...@gmail.com
Hello Evemar,

The following video shows you step by step how to create a firewall rule in GCE firewall. More information about this matter can be found in this Help Center article.

I hope this helps.

Sincerely,
George

Evemar Wernick

unread,
Sep 28, 2016, 2:31:42 PM9/28/16
to George (Google Cloud Support), gce-discussion
Hi Paul,

What I have tried:
- set up external IP to static (instead of ephemeral)
- tested couchDB locally (localhost:5984/_utils) => OK
- turned off windows firewall in VM
- created a rule in GCE firewall like this:

Firewall rules

Add firewall rule Delete
NameSource tag / IP rangeAllowed protocols / portsTarget tags
couch-udp0.0.0.0/0tcp:5984Apply to all targets


When I try to access couchDB externally (x.x.x.x:5984/_utils), I get this message:

This site can’t be reached

x.x.x.x refused to connect.

  • Search Google for x.x.x.x utils
ERR_CONNECTION_REFUSED



It seems that I am almost there, but it's still not working...

Thanks,
Evemar

Evemar Wernick

unread,
Sep 28, 2016, 3:23:46 PM9/28/16
to George (Google Cloud Support), gce-discussion
Excuse me George... I called you 'Paul' ;-)

George (Google Cloud Support)

unread,
Sep 29, 2016, 9:17:36 AM9/29/16
to gce-discussion, gra...@google.com
Hello Evemar,

From the error message that you sent, it looks like the service is listening on the localhost and not serving on the public IP. I was able to find this thread that might help you modify the configuration and fix the issue.

For future reference, this question is better suited on Stackexchange network (ServerFault, StackOverflow...) while adding the correct tags as community and Google's engineers are active as well.

I hope this helps.

Sincerely,
George

Evemar Wernick

unread,
Sep 30, 2016, 3:31:47 PM9/30/16
to gce-discussion, gra...@google.com
Hi George,

Thanks for your help. I already had seen that thread you send me (and another dozens of threads) before ask for help. Since that discussion is focused on linux solution, it didn't helped me on windows.

I created this discussion at gce-discussion group because I didn't get the solution in serverFault and stackOverflow...

But ok, I will try a little more for a few days. If I don't find the solution, I will give up.

Best regards,
Evemar

George (Google Cloud Support)

unread,
Sep 30, 2016, 4:58:06 PM9/30/16
to gce-discussion, gra...@google.com
Hello Evemar,

On Windows, you can change the configuration from the browser, as you mentioned you are able to access on the localhost IP. 

Changing the Bind address to 0.0.0.0 should fix the issue. Did you have the chance to do so?

I hope this helps.

Sincerely,
George

Evemar Wernick

unread,
Sep 30, 2016, 6:04:11 PM9/30/16
to gce-discussion, gra...@google.com
Hello George!

Thank you very much for your help.

I set the couch configuration bind_address to 0.0.0.0 and that worked. I reinstalled the couchDB and I have forgotten to change that setting again.... 
Thanks for your patience. Now I am going to be a Google customer for my apps.

I just have two more questions:

1. If I decide to use Static IP, how much I pay when the VM is turned off?

2. There is a way to change the VM Class from Preemptible to Regular without recreate it?

Thanks!!!
Evemar

George (Google Cloud Support)

unread,
Oct 3, 2016, 1:14:25 PM10/3/16
to gce-discussion, gra...@google.com
Hello Evemar,

I am glad to hear that your initial issue has been resolved. 

I will answer you questions inline:


On Friday, September 30, 2016 at 6:04:11 PM UTC-4, Evemar Wernick wrote:
Hello George!

Thank you very much for your help.

I set the couch configuration bind_address to 0.0.0.0 and that worked. I reinstalled the couchDB and I have forgotten to change that setting again.... 
Thanks for your patience. Now I am going to be a Google customer for my apps.

I just have two more questions:

1. If I decide to use Static IP, how much I pay when the VM is turned off?
Pricing information for Static IP is mentioned in this Help Center article.
 

2. There is a way to change the VM Class from Preemptible to Regular without recreate it?
Unfortunately not, you will have to take a snapshot and create a new instance using this snapshot, or just delete the VM without deleting the disk and recreate a regular VM using this disk.

I would suggest filing a feature request on this Public Issue Tracker in order to have this feature available in future releases.

Evemar Wernick

unread,
Oct 3, 2016, 7:36:17 PM10/3/16
to George (Google Cloud Support), gce-discussion
Ok George!!!

Thank you!!!

Regards,

Evemar

Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-discussion@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to a topic in the Google Groups "gce-discussion" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gce-discussion/XDx7J-9sg1Q/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gce-discussion+unsubscribe@googlegroups.com.
To post to this group, send email to gce-discussion@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/c09cb4fa-139c-4086-9433-35cefb2668c1%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages